[Gradle] Register default kapt classes dir as an output
#KT-59256 Fixed
This commit is contained in:
committed by
Space Team
parent
b23b9ab287
commit
ac79633590
-1
@@ -1272,7 +1272,6 @@ open class Kapt3IT : Kapt3BaseIT() {
|
||||
|
||||
@DisplayName("KT-59256: kapt generated files are included into the test runtime classpath")
|
||||
@GradleTest
|
||||
@Disabled("The fix is not yet provided")
|
||||
fun testKaptGeneratedInTestRuntimeClasspath(gradleVersion: GradleVersion) {
|
||||
project("kapt-in-test-runtime-classpath".withPrefix, gradleVersion) {
|
||||
build("test") {
|
||||
|
||||
+1
-2
@@ -382,8 +382,7 @@ class Kapt3GradleSubplugin @Inject internal constructor(private val registry: To
|
||||
// Workaround for changes in Gradle 7.3 causing eager task realization
|
||||
// For details check `KotlinSourceSetProcessor.prepareKotlinCompileTask()`
|
||||
if (kotlinCompilation is KotlinWithJavaCompilation<*, *>) {
|
||||
val kotlinSourceDirectorySet = kotlinCompilation.defaultSourceSet.kotlin
|
||||
kotlinSourceDirectorySet.compiledBy(taskProvider, KaptTask::classesDir)
|
||||
kotlinCompilation.output.classesDirs.from(classesOutputDir).builtBy(taskProvider)
|
||||
} else {
|
||||
kotlinCompilation.output.classesDirs.from(taskProvider.flatMap { it.classesDir })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user