Update tests for Gradle 8

This commit is contained in:
Daz DeBoer 2023-02-18 13:25:58 -07:00
parent 96015f1e52
commit 6095a76664
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
2 changed files with 16 additions and 21 deletions

View file

@ -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 {
@ -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)
}
}

View file

@ -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'