[Gradle] Fix mpp+kapt tests on Windows

Previously expected paths were defined with forward slash, however, on Windows the paths are transformed to use backslash.
This commit is contained in:
Alexander.Likhachev
2023-09-19 15:42:22 +02:00
committed by Space Team
parent 2801db0e59
commit 33df94d96e
2 changed files with 7 additions and 5 deletions
@@ -966,10 +966,11 @@ open class Kapt3IT : Kapt3BaseIT() {
":dac:compileKotlinJvm"
)
val sourcesDir = subProject("dac").kotlinSourcesDir("commonMain")
// KT-61622: checking if kapt tasks are getting common sources in default configuration
val commonSources = arrayOf(
"src/commonMain/kotlin/DocumentationService.kt",
"src/commonMain/kotlin/Item.kt",
sourcesDir.resolve("DocumentationService.kt").toAbsolutePath().toString(),
sourcesDir.resolve("Item.kt").toAbsolutePath().toString(),
)
assertCompilerArguments(":dac:kaptGenerateStubsKotlinJvm", *commonSources)
}
@@ -217,7 +217,7 @@ open class Kapt3AndroidExternalIT : Kapt3BaseIT() {
fun testMppAndroidKapt(
gradleVersion: GradleVersion,
agpVersion: String,
jdkVersion: JdkVersions.ProvidedJdk
jdkVersion: JdkVersions.ProvidedJdk,
) {
project(
"mpp-android-kapt".withPrefix,
@@ -232,10 +232,11 @@ open class Kapt3AndroidExternalIT : Kapt3BaseIT() {
":shared:compileDebugKotlinAndroid",
)
val sourcesDir = subProject("shared").kotlinSourcesDir("commonMain")
assertCompilerArguments(
":shared:kaptGenerateStubsDebugKotlinAndroid",
"src/commonMain/kotlin/hilt/error/sampleapp/Annotations.kt",
"src/commonMain/kotlin/hilt/error/sampleapp/CommonMainViewModel.kt",
sourcesDir.resolve("hilt/error/sampleapp/Annotations.kt").toAbsolutePath().toString(),
sourcesDir.resolve("hilt/error/sampleapp/CommonMainViewModel.kt").toAbsolutePath().toString(),
)
}
}