File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 uses : gradle/gradle-build-action@v2.8.0
2828 with :
2929 gradle-version : ${{ matrix.gradle }}
30- arguments : test nativeCompile --info --stacktrace
30+ arguments : test nativeCompile --init-script build-scan-agree.gradle --scan -- info --stacktrace
3131 - name : Upload wallet-tool as artifact
3232 uses : actions/upload-artifact@v3
3333 with :
Original file line number Diff line number Diff line change 3232 uses : gradle/gradle-build-action@v2.8.0
3333 with :
3434 gradle-version : ${{ matrix.gradle }}
35- arguments : -PtestJdk8=true build --info --stacktrace
35+ arguments : -PtestJdk8=true build --init-script build-scan-agree.gradle --scan -- info --stacktrace
3636 - name : Upload Test Results and Reports
3737 uses : actions/upload-artifact@v3
3838 if : always()
Original file line number Diff line number Diff line change 1+ /* Gradle Init Script to non-interactively agree to the Gradle Build Scan terms of service
2+ * Provided by Stefan Wolf via GitHub Issues
3+ * See: https://github.com/gradle/gradle/issues/26316#issuecomment-1739245349
4+ * To use add `--scan --init-script build-scan-agree.gradle` to your Gradle command-line
5+ * Works with Gradle 4.4 - Gradle 8.4 (at least)
6+ */
7+ def isTopLevelBuild = gradle. getParent() == null
8+
9+ if (isTopLevelBuild) {
10+ def gradleVersion = GradleVersion . current(). baseVersion
11+ def atLeastGradle6 = gradleVersion >= GradleVersion . version(" 6.0" )
12+ if (atLeastGradle6) {
13+ settingsEvaluated { settings ->
14+ settings. pluginManager. withPlugin(" com.gradle.enterprise" ) {
15+ configureExtension(settings. extensions[" gradleEnterprise" ]. buildScan)
16+ }
17+ }
18+ } else {
19+ rootProject { root ->
20+ root. pluginManager. withPlugin(" com.gradle.build-scan" ) {
21+ configureExtension(root. extensions[" buildScan" ])
22+ }
23+ }
24+ }
25+ }
26+
27+ void configureExtension (extension ) {
28+ extension. with {
29+ if (delegate. metaClass. respondsTo(delegate, ' setTermsOfServiceUrl' )) {
30+ termsOfServiceUrl = " https://gradle.com/terms-of-service"
31+ termsOfServiceAgree = " yes"
32+ } else {
33+ licenseAgreementUrl = " https://gradle.com/terms-of-service"
34+ licenseAgree = " yes"
35+ }
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments