File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1+ import com.android.build.gradle.LibraryExtension
12import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
23import com.vanniktech.maven.publish.MavenPublishBaseExtension
34import org.jetbrains.dokka.gradle.DokkaTask
@@ -34,6 +35,16 @@ libraryProjects {
3435 if (name != Libraries .HIKAGE_COMPILER )
3536 configure(AndroidSingleVariantLibrary (publishJavadocJar = false ))
3637 }
38+ // Only apply to publishable tasks.
39+ if (gradle.startParameter.taskNames.any { it.startsWith(" publish" ) })
40+ if (name != Libraries .HIKAGE_COMPILER )
41+ configure<LibraryExtension > {
42+ sourceSets.forEach {
43+ // Add KSP generated sources to the source set.
44+ val kspSources = file(layout.buildDirectory.dir(" generated/ksp/release" ).get())
45+ if (kspSources.exists()) it.kotlin.srcDir(kspSources)
46+ }
47+ }
3748 }
3849 tasks.withType<DokkaTask >().configureEach {
3950 val configuration = """ { "footerMessage": "Hikage | Apache-2.0 License | Copyright (C) 2019 HighCapable" }"""
You can’t perform that action at this time.
0 commit comments