Skip to content

Commit 06aa10e

Browse files
committed
[Gradle] Register default kapt classes dir as an output
#KT-59256 Fixed (cherry picked from commit ac79633)
1 parent e4d77b7 commit 06aa10e

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
@@ -1274,7 +1274,6 @@ open class Kapt3IT : Kapt3BaseIT() {
12741274

12751275
@DisplayName("KT-59256: kapt generated files are included into the test runtime classpath")
12761276
@GradleTest
1277-
@Disabled("The fix is not yet provided")
12781277
fun testKaptGeneratedInTestRuntimeClasspath(gradleVersion: GradleVersion) {
12791278
project("kapt-in-test-runtime-classpath".withPrefix, gradleVersion) {
12801279
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
@@ -387,8 +387,7 @@ class Kapt3GradleSubplugin @Inject internal constructor(private val registry: To
387387
// Workaround for changes in Gradle 7.3 causing eager task realization
388388
// For details check `KotlinSourceSetProcessor.prepareKotlinCompileTask()`
389389
if (kotlinCompilation is KotlinWithJavaCompilation<*, *>) {
390-
val kotlinSourceDirectorySet = kotlinCompilation.defaultSourceSet.kotlin
391-
kotlinSourceDirectorySet.compiledBy(taskProvider, KaptTask::classesDir)
390+
kotlinCompilation.output.classesDirs.from(classesOutputDir).builtBy(taskProvider)
392391
} else {
393392
kotlinCompilation.output.classesDirs.from(taskProvider.flatMap { it.classesDir })
394393
}

0 commit comments

Comments
 (0)