Using Gradle Build Scans™ with Debian Gradle 4. 4.x

Sean Gilligan <[email protected]>
Newsgroups gmane.linux.debian.devel.java
Message-ID <[email protected]>
Although Build Scans™ are a proprietary add-on to Gradle, they are very 
useful in a FOSS CI environment. They make it very easy to find all the 
information you need to troubleshoot a failing build or find ways to 
optimize build scripts.

Unfortunately, the options for agreeing to the terms-of-service in a CI 
environment have been difficult to configure cleanly. (You also have to 
give them your email, which I don't mind doing but some may object.)

I opened an issue with Gradle about programmatically agreeing to the TOS 
and Stefan Wolf from Gradle provided an initialization script that 
solves the problem:

https://github.com/gradle/gradle/issues/26316#issuecomment-1739245349

The script works with Gradle 4.4.x (FrankenGradle) through 8.x (at 
least.) The nice thing about this solution is that the script lives in a 
separate file and is only activated with specific command line options:

`--init-script build-scan-agree.gradle --scan`

I've tested it with bitcoinj and created two PRs that use it. They 
provide examples of how to use it:

GitHub Actions: https://github.com/bitcoinj/bitcoinj/pull/3289
GitLab CI: https://github.com/bitcoinj/bitcoinj/pull/3290

Regards,


Sean
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.