Use language version 1.9 in KAPT3 tests to avoid 2.0 migration problems
This commit is contained in:
committed by
Space Team
parent
cedfdbdc66
commit
3547b404d5
+2
-1
@@ -36,7 +36,7 @@ import kotlin.io.path.deleteExisting
|
||||
import kotlin.io.path.outputStream
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
abstract class Kapt3BaseIT : KGPBaseTest() {
|
||||
abstract class Kapt3BaseIT(val languageVersion: String = "1.9") : KGPBaseTest() {
|
||||
companion object {
|
||||
private const val KAPT_SUCCESSFUL_MESSAGE = "Annotation processing complete, errors: 0"
|
||||
}
|
||||
@@ -44,6 +44,7 @@ abstract class Kapt3BaseIT : KGPBaseTest() {
|
||||
override val defaultBuildOptions: BuildOptions = super.defaultBuildOptions
|
||||
.copy(
|
||||
kaptOptions = this.kaptOptions(),
|
||||
languageVersion = languageVersion,
|
||||
)
|
||||
|
||||
protected open fun kaptOptions(): BuildOptions.KaptOptions = BuildOptions.KaptOptions(
|
||||
|
||||
+6
-4
@@ -181,6 +181,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
project(
|
||||
projectName = "simpleWithKapt".fullProjectName,
|
||||
gradleVersion = gradleVersion,
|
||||
buildOptions = defaultBuildOptions.copy(languageVersion = "1.9"),
|
||||
) {
|
||||
if (shouldUseToolchain(gradleVersion)) {
|
||||
useToolchainExtension(11)
|
||||
@@ -216,6 +217,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
project(
|
||||
projectName = "simpleWithKapt".fullProjectName,
|
||||
gradleVersion = gradleVersion,
|
||||
buildOptions = defaultBuildOptions.copy(languageVersion = "1.9"),
|
||||
) {
|
||||
build("assemble") {
|
||||
assertOutputContains("Using workers NONE isolation mode to run kapt")
|
||||
@@ -233,7 +235,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
projectName = "simpleWithKapt".fullProjectName,
|
||||
gradleVersion = gradleVersion,
|
||||
projectPathAdditionalSuffix = "1/cache-test",
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true)
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true, languageVersion = "1.9")
|
||||
) {
|
||||
enableLocalBuildCache(buildCache)
|
||||
if (shouldUseToolchain(gradleVersion)) {
|
||||
@@ -252,7 +254,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
projectName = "simpleWithKapt".fullProjectName,
|
||||
gradleVersion = gradleVersion,
|
||||
projectPathAdditionalSuffix = "2/cache-test",
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true),
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true, languageVersion = "1.9"),
|
||||
) {
|
||||
enableLocalBuildCache(buildCache)
|
||||
if (shouldUseToolchain(gradleVersion)) {
|
||||
@@ -283,7 +285,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
projectName = "simpleWithKapt".fullProjectName,
|
||||
gradleVersion = gradleVersion,
|
||||
projectPathAdditionalSuffix = "1/cache-test",
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true)
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true, languageVersion = "1.9")
|
||||
) {
|
||||
enableLocalBuildCache(buildCache)
|
||||
|
||||
@@ -294,7 +296,7 @@ class KotlinJavaToolchainTest : KGPBaseTest() {
|
||||
projectName = "simpleWithKapt".fullProjectName,
|
||||
gradleVersion = gradleVersion,
|
||||
projectPathAdditionalSuffix = "2/cache-test",
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true),
|
||||
buildOptions = defaultBuildOptions.copy(buildCacheEnabled = true, languageVersion = "1.9"),
|
||||
) {
|
||||
enableLocalBuildCache(buildCache)
|
||||
gradleProperties.append(
|
||||
|
||||
Reference in New Issue
Block a user