Skip to content

Commit ac79633

Browse files
ALikhachevSpace Team
authored andcommitted
[Gradle] Register default kapt classes dir as an output
#KT-59256 Fixed
1 parent b23b9ab commit ac79633

File tree

2 files changed

+1
-3
lines changed
  • libraries/tools
    • kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/internal/kapt
    • kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle

2 files changed

+1
-3
lines changed

libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,6 @@ open class Kapt3IT : Kapt3BaseIT() {
12721272

12731273
@DisplayName("KT-59256: kapt generated files are included into the test runtime classpath")
12741274
@GradleTest
1275-
@Disabled("The fix is not yet provided")
12761275
fun testKaptGeneratedInTestRuntimeClasspath(gradleVersion: GradleVersion) {
12771276
project("kapt-in-test-runtime-classpath".withPrefix, gradleVersion) {
12781277
build("test") {

libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/internal/kapt/Kapt3KotlinGradleSubplugin.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ class Kapt3GradleSubplugin @Inject internal constructor(private val registry: To
382382
// Workaround for changes in Gradle 7.3 causing eager task realization
383383
// For details check `KotlinSourceSetProcessor.prepareKotlinCompileTask()`
384384
if (kotlinCompilation is KotlinWithJavaCompilation<*, *>) {
385-
val kotlinSourceDirectorySet = kotlinCompilation.defaultSourceSet.kotlin
386-
kotlinSourceDirectorySet.compiledBy(taskProvider, KaptTask::classesDir)
385+
kotlinCompilation.output.classesDirs.from(classesOutputDir).builtBy(taskProvider)
387386
} else {
388387
kotlinCompilation.output.classesDirs.from(taskProvider.flatMap { it.classesDir })
389388
}

0 commit comments

Comments
 (0)