diff --git a/decomat-examples/build.gradle.kts b/decomat-examples/build.gradle.kts index ee2ab68..8f63228 100644 --- a/decomat-examples/build.gradle.kts +++ b/decomat-examples/build.gradle.kts @@ -160,9 +160,11 @@ if (project.hasProperty("platform") && project.property("platform") == "linux") } } -// find every task ending with SourcesJar and make it depend on kspCommonMainKotlinMetadata -tasks.matching { name.endsWith("SourcesJar") }.configureEach { - dependsOn("kspCommonMainKotlinMetadata") +afterEvaluate { + // find every task ending with SourcesJar and make it depend on kspCommonMainKotlinMetadata + tasks.matching { name.endsWith("SourcesJar") }.configureEach { + dependsOn("kspCommonMainKotlinMetadata") + } } // Add the kspCommonMainKotlinMetadata dependency to sourcesJar tasks if needed