Bump advanced Gradle version to 7.0-milestone-3.
Fixed test setup that causes test failures. ^KT-44949 In Progress
This commit is contained in:
committed by
TeamCityServer
parent
c38a793352
commit
6473d2a7c8
@@ -81,7 +81,7 @@ fun Test.includeNative(include: Boolean) {
|
||||
}
|
||||
|
||||
fun Test.advanceGradleVersion() {
|
||||
val gradleVersionForTests = "7.0-milestone-2"
|
||||
val gradleVersionForTests = "7.0-milestone-3"
|
||||
systemProperty("kotlin.gradle.version.for.tests", gradleVersionForTests)
|
||||
}
|
||||
|
||||
|
||||
+10
-3
@@ -48,7 +48,11 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
|
||||
val (firstProject, secondProject) = (0..1).map { id ->
|
||||
workingDir = workingDirs[id]
|
||||
Project(projectName, directoryPrefix = projectDirectoryPrefix).apply {
|
||||
Project(
|
||||
projectName,
|
||||
directoryPrefix = projectDirectoryPrefix,
|
||||
gradleVersionRequirement = gradleVersionRequirement
|
||||
).apply {
|
||||
setupWorkingDir()
|
||||
initProject()
|
||||
prepareLocalBuildCache(localBuildCacheDirectory)
|
||||
@@ -90,6 +94,7 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
|
||||
class TestCase(
|
||||
val projectName: String,
|
||||
val gradleVersionRequirement: GradleVersionRequired = GradleVersionRequired.None,
|
||||
val cacheableTaskNames: List<String>,
|
||||
val projectDirectoryPrefix: String? = null,
|
||||
val outputRootPaths: List<String> = listOf("build"),
|
||||
@@ -148,6 +153,7 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
outputRootPaths = listOf("lib", "libJvm", "libJs").map { "$it/build" }
|
||||
),
|
||||
TestCase("AndroidProject",
|
||||
gradleVersionRequirement = GradleVersionRequired.AtLeast("6.6.1"),
|
||||
taskToExecute = arrayOf("assembleDebug"),
|
||||
cacheableTaskNames = listOf("Lib", "Android").flatMap { module ->
|
||||
listOf("Flavor1", "Flavor2").flatMap { flavor ->
|
||||
@@ -157,9 +163,10 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
}
|
||||
},
|
||||
outputRootPaths = listOf("Lib", "Android", "Test").map { "$it/build" },
|
||||
androidGradlePluginVersion = AGPVersion.v3_6_0
|
||||
androidGradlePluginVersion = AGPVersion.v4_2_0
|
||||
),
|
||||
TestCase("android-dagger",
|
||||
gradleVersionRequirement = GradleVersionRequired.AtLeast("6.6.1"),
|
||||
taskToExecute = arrayOf("assembleDebug"),
|
||||
projectDirectoryPrefix = "kapt2",
|
||||
cacheableTaskNames = listOf("Debug").flatMap { buildType ->
|
||||
@@ -169,7 +176,7 @@ class BuildCacheRelocationIT : BaseGradleIT() {
|
||||
},
|
||||
outputRootPaths = listOf("app/build"),
|
||||
initProject = { File(projectDir, "app/build.gradle").appendText("\nkapt.useBuildCache = true") },
|
||||
androidGradlePluginVersion = AGPVersion.v3_6_0
|
||||
androidGradlePluginVersion = AGPVersion.v4_2_0
|
||||
),
|
||||
TestCase("native-build-cache",
|
||||
taskToExecute = arrayOf("build-cache-lib:publish", "build-cache-app:assemble"),
|
||||
|
||||
+5
-2
@@ -264,10 +264,13 @@ class KaptIncrementalWithIsolatingApt : KaptIncrementalIT() {
|
||||
//https://youtrack.jetbrains.com/issue/KTI-405
|
||||
if (System.getProperty("os.name")?.toLowerCase()?.contains("windows") == true) return
|
||||
|
||||
val project = Project("kaptIncrementalWithParceler", GradleVersionRequired.None).apply {
|
||||
val project = Project(
|
||||
projectName = "kaptIncrementalWithParceler",
|
||||
gradleVersionRequirement = GradleVersionRequired.AtLeast("6.6.1")
|
||||
).apply {
|
||||
setupWorkingDir()
|
||||
}
|
||||
val options = defaultBuildOptions().copy(androidGradlePluginVersion = AGPVersion.v3_6_0)
|
||||
val options = defaultBuildOptions().copy(androidGradlePluginVersion = AGPVersion.v4_2_0)
|
||||
project.build("clean", ":mylibrary:assembleDebug", options = options) {
|
||||
assertSuccessful()
|
||||
}
|
||||
|
||||
+5
-2
@@ -1117,12 +1117,15 @@ class KotlinGradleIT : BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun testKtKt35942InternalsFromMainInTestViaTransitiveDepsAndroid() = with(
|
||||
Project("kt-35942-android", GradleVersionRequired.FOR_MPP_SUPPORT)
|
||||
Project(
|
||||
projectName = "kt-35942-android",
|
||||
gradleVersionRequirement = GradleVersionRequired.AtLeast("6.6.1")
|
||||
)
|
||||
) {
|
||||
build(
|
||||
":lib1:compileDebugUnitTestKotlin",
|
||||
options = defaultBuildOptions().copy(
|
||||
androidGradlePluginVersion = AGPVersion.v3_6_0,
|
||||
androidGradlePluginVersion = AGPVersion.v4_2_0,
|
||||
androidHome = KtTestUtil.findAndroidSdk(),
|
||||
),
|
||||
) {
|
||||
|
||||
+1
-1
@@ -1408,7 +1408,7 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
(Regex.escape(">> :app:testNonTransitiveStringNotationApiDependenciesMetadata") + " .*").toRegex().findAll(output).count()
|
||||
)
|
||||
|
||||
assertContains(">> :app:testNonTransitiveDependencyNotationApiDependenciesMetadata --> kotlin-reflect-${defaultBuildOptions().kotlinVersion}.jar")
|
||||
assertContains(">> :app:testNonTransitiveDependencyNotationApiDependenciesMetadata --> kotlin-reflect-${defaultBuildOptions().kotlinVersion}.jar")
|
||||
assertEquals(
|
||||
1,
|
||||
(Regex.escape(">> :app:testNonTransitiveStringNotationApiDependenciesMetadata") + " .*").toRegex().findAll(output)
|
||||
|
||||
+5
-1
@@ -134,9 +134,13 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
|
||||
|
||||
//Proguard corrupts RuntimeInvisibleParameterAnnotations/RuntimeVisibleParameterAnnotations tables:
|
||||
// https://sourceforge.net/p/proguard/bugs/735/
|
||||
// Gradle 7 compatibility issue: https://github.com/Guardsquare/proguard/issues/136
|
||||
@Test
|
||||
fun testInteropWithProguarded() {
|
||||
Project("interopWithProguarded").build("build") {
|
||||
Project(
|
||||
projectName = "interopWithProguarded",
|
||||
gradleVersionRequirement = GradleVersionRequired.Until("6.8.4")
|
||||
).build("build") {
|
||||
assertSuccessful()
|
||||
assertTasksExecuted(":test")
|
||||
assertContains("InteropWithProguardedTest PASSED")
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ class SubpluginsIT : BaseGradleIT() {
|
||||
build(
|
||||
":app:compileDebugKotlin",
|
||||
options = defaultBuildOptions().copy(
|
||||
androidGradlePluginVersion = AGPVersion.v3_4_1,
|
||||
androidGradlePluginVersion = AGPVersion.v4_2_0,
|
||||
androidHome = KtTestUtil.findAndroidSdk()
|
||||
)
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user