LoginSignup
8
0

More than 3 years have passed since last update.

私は普段Androidの開発をしていますが、Gradleの機能でBuild Scanが便利そうだったので最近使い始めました。

で、QiitaにBuild Scan紹介記事が1件もなかった(※当社調べ)ので、まだ使ってる人あまりいないのでは?と思って記事にしました。

Build Scanとは?

一言で言うと、「ビルドが通らない!」と他の人に相談したいとき、エラーログとか環境設定とか諸々をURLひとつで共有できる機能です。

How to use

Creating Build Scans
Get started with build scans
この辺を読んで、Project rootのbuild.gradleに必要な記述をします。
Gradle 4.3以上なら不要らしいです。

build.gradle
buildscript {
    ....
}

plugins {
    id 'com.gradle.build-scan' version '2.4.1'
}

buildScan {
    termsOfServiceUrl = 'https://gradle.com/terms-of-service'
    termsOfServiceAgree = 'yes'
    publishAlways()
}

あとはコマンドラインでProject rootに移動して、

./gradlew build --scan

を実行します。

BUILD FAILED in 4m 33s
341 actionable tasks: 302 executed, 39 up-to-date

Publishing build scan...
https://gradle.com/s/abcde1fghij2k

と出るのでURLにアクセスすると...

Getting started with build scans | Gradle Inc.


続きはご自身の目でお確かめください(丸投げ)

もっと詳しく知りたい/プライバシーとかどうなの?

Gradle Terms of Service
Gradle Build Scan Plugin User Manual
Removing published build scans from scans.gradle.com
この辺に書いてあるらしいですが、まだしっかり読んでいないので、わかり次第追記します。

その他参考サイト

The one Gradle trick that supersedes all the others

8
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
0