[Gradle] Add expected K2 Kapt fallback warning
#KT-60588 In Progress
This commit is contained in:
committed by
Space Team
parent
3177df9ad8
commit
c6b1d37476
+7
-2
@@ -69,7 +69,9 @@ class BuildCacheRelocationIT : KGPBaseTest() {
|
||||
secondProject,
|
||||
listOf(":classes", ":testClasses"),
|
||||
listOf(":kaptKotlin", ":kaptGenerateStubsKotlin", ":compileKotlin", ":compileTestKotlin", ":compileJava")
|
||||
)
|
||||
) {
|
||||
assertNoBuildWarnings(expectedK2KaptWarnings)
|
||||
}
|
||||
}
|
||||
|
||||
@JsGradlePluginTests
|
||||
@@ -294,16 +296,19 @@ class BuildCacheRelocationIT : KGPBaseTest() {
|
||||
firstProject: TestProject,
|
||||
secondProject: TestProject,
|
||||
tasksToExecute: List<String>,
|
||||
cacheableTasks: List<String>
|
||||
cacheableTasks: List<String>,
|
||||
additionalAssertions: BuildResult.() -> Unit = {},
|
||||
) {
|
||||
firstProject.build(*tasksToExecute.toTypedArray()) {
|
||||
assertTasksPackedToCache(*cacheableTasks.toTypedArray())
|
||||
additionalAssertions()
|
||||
}
|
||||
|
||||
firstProject.build("clean")
|
||||
|
||||
secondProject.build(*tasksToExecute.toTypedArray()) {
|
||||
assertTasksFromCache(*cacheableTasks.toTypedArray())
|
||||
additionalAssertions()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -76,6 +76,7 @@ class BuildServiceDeclarationIT : KGPBaseTest() {
|
||||
enableStableConfigurationCachePreview()
|
||||
build("build") {
|
||||
assertOutputDoesNotContainBuildServiceDeclarationWarnings()
|
||||
assertNoBuildWarnings(expectedK2KaptWarnings)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -70,6 +70,7 @@ class UnnamedTaskInputsIT : KGPBaseTest() {
|
||||
|
||||
build("assemble") {
|
||||
assertNoUnnamedInputsOutputs()
|
||||
assertNoBuildWarnings(expectedK2KaptWarnings)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -172,6 +172,11 @@ fun BuildResult.assertNoBuildWarnings(
|
||||
}
|
||||
}
|
||||
|
||||
val expectedK2KaptWarnings = setOf(
|
||||
"w: [InternalKotlinGradlePluginPropertiesUsed | WARNING] ATTENTION! This build uses the following Kotlin Gradle Plugin properties:",
|
||||
"w: Kapt currently doesn't support language version 2.0+. Falling back to 1.9."
|
||||
)
|
||||
|
||||
/**
|
||||
* Asserts compilation is running via Kotlin daemon with given jvm arguments.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -19,5 +19,5 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.named("compileKotlin", KotlinJvmCompile) {
|
||||
compilerOptions.allWarningsAsErrors = true
|
||||
compilerOptions.allWarningsAsErrors = false // compilation with LV=2.0 prints warning about kapt fallback
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user