Skip to content

Commit b3a1347

Browse files
committed
Avoid implicit dependencies to custom source-generating task
1 parent f2e7dea commit b3a1347

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

plugin/android-junit5/build.gradle.kts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ val versionClassTask = tasks.register<Copy>("createVersionClass") {
9494
)
9595
outputs.upToDateWhen { false }
9696
}
97-
tasks.named("compileKotlin").configure {
98-
dependsOn(versionClassTask)
99-
}
10097
sourceSets {
10198
main {
10299
java.srcDir("build/generated/sources/plugin")
@@ -138,3 +135,10 @@ dependencies {
138135
}
139136

140137
project.configureDeployment(Artifacts.Plugin)
138+
139+
// Register source-processing tasks as dependants of the custom source generation task
140+
listOf("compileKotlin", "androidSourcesJar", "dokkaJavadoc").forEach { taskName ->
141+
tasks.named(taskName).configure {
142+
dependsOn(versionClassTask)
143+
}
144+
}

0 commit comments

Comments
 (0)