Skip to content

Commit

Permalink
Update tests for Gradle 8
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Feb 18, 2023
1 parent 96015f1 commit 6095a76
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
3 changes: 1 addition & 2 deletions src/resources/init-scripts/build-result-capture.init.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if (isTopLevelBuild) {
captureUsingBuildScanPublished(settings.extensions["gradleEnterprise"].buildScan, settings.rootProject, invocationId)
}
// We also need to add hooks in case the plugin is applied but no build scan is published
// The `buildScanPublished` results will NOT be overwritten by these calls
if (useBuildService) {
captureUsingBuildService(settings, invocationId)
} else {
Expand Down Expand Up @@ -71,9 +72,7 @@ def captureUsingBuildFinished(gradle, invocationId) {
gradle.buildFinished { result ->
def buildResults = new BuildResults(invocationId, gradle, gradle.rootProject)
buildResults.setBuildResult(result)

buildResults.writeToResultsFile(false)

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,26 @@ import java.util.zip.GZIPOutputStream

class BaseInitScriptTest extends Specification {

static final TestGradleVersion GRADLE_3_5 = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
static final TestGradleVersion GRADLE_4_0 = new TestGradleVersion(GradleVersion.version('4.0.2'), 7, 9)
static final TestGradleVersion GRADLE_4_10 = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
static final TestGradleVersion GRADLE_5_0 = new TestGradleVersion(GradleVersion.version('5.0'), 8, 11)
static final TestGradleVersion GRADLE_5_6 = new TestGradleVersion(GradleVersion.version('5.6.4'), 8, 12)
static final TestGradleVersion GRADLE_6_0 = new TestGradleVersion(GradleVersion.version('6.0.1'), 8, 13)
static final TestGradleVersion GRADLE_6_7 = new TestGradleVersion(GradleVersion.version('6.7'), 8, 15)
static final TestGradleVersion GRADLE_7_0 = new TestGradleVersion(GradleVersion.version('7.0.2'), 8, 16)
static final TestGradleVersion GRADLE_7_4 = new TestGradleVersion(GradleVersion.version('7.4.2'), 8, 17)
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
static final TestGradleVersion GRADLE_5_X = new TestGradleVersion(GradleVersion.version('5.6.4'), 8, 12)
static final TestGradleVersion GRADLE_6_NO_BUILD_SERVICE = new TestGradleVersion(GradleVersion.version('6.5.1'), 8, 14)
static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.3'), 8, 15)
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6'), 8, 19)
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.0.1'), 8, 19)

static final List<TestGradleVersion> ALL_VERSIONS = [
GRADLE_3_5, // First version where TestKit supports environment variables
GRADLE_4_0,
GRADLE_4_10,
GRADLE_5_0,
GRADLE_5_6,
GRADLE_6_0,
GRADLE_6_7,
GRADLE_7_0,
GRADLE_7_4,
GRADLE_3_X, // First version where TestKit supports environment variables
GRADLE_4_X,
GRADLE_5_X,
GRADLE_6_NO_BUILD_SERVICE, // Last version without build service support
GRADLE_6_X,
GRADLE_7_X,
GRADLE_8_X,
]

static final List<TestGradleVersion> CONFIGURATION_CACHE_VERSIONS =
[GRADLE_7_0, GRADLE_7_4]
[GRADLE_7_X, GRADLE_8_X]

static final String PUBLIC_BUILD_SCAN_ID = 'i2wepy2gr7ovw'
static final String DEFAULT_SCAN_UPLOAD_TOKEN = 'scan-upload-token'
Expand Down

0 comments on commit 6095a76

Please sign in to comment.