File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
build-logic/src/main/kotlin Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,20 @@ val sourcesElements = project.configurations.register("sourcesElements") {
171171 outgoing.artifact(tasks.named(" sourcesJar" ))
172172}
173173
174+ val javadocElements = project.configurations.register(" javadocElements" ) {
175+ isVisible = false
176+ description = " Javadoc elements for libs"
177+ isCanBeResolved = false
178+ isCanBeConsumed = true
179+ attributes {
180+ attribute(Usage .USAGE_ATTRIBUTE , project.objects.named(Usage .JAVA_RUNTIME ))
181+ attribute(Category .CATEGORY_ATTRIBUTE , project.objects.named(Category .DOCUMENTATION ))
182+ attribute(Bundling .BUNDLING_ATTRIBUTE , project.objects.named(Bundling .SHADOWED ))
183+ attribute(DocsType .DOCS_TYPE_ATTRIBUTE , project.objects.named(DocsType .JAVADOC ))
184+ }
185+ outgoing.artifact(tasks.named(" javadocJar" ))
186+ }
187+
174188libsComponent.addVariantsFromConfiguration(apiElements.get()) {
175189 mapToMavenScope(" compile" )
176190}
@@ -182,6 +196,11 @@ libsComponent.addVariantsFromConfiguration(runtimeElements.get()) {
182196libsComponent.addVariantsFromConfiguration(sourcesElements.get()) {
183197 mapToMavenScope(" runtime" )
184198}
199+
200+ libsComponent.addVariantsFromConfiguration(javadocElements.get()) {
201+ mapToMavenScope(" runtime" )
202+ }
203+
185204val publishingExtension = the<PublishingExtension >()
186205
187206configure<SigningExtension > {
You can’t perform that action at this time.
0 commit comments