Skip to content

Commit

Permalink
Add missing apiElements attributes to javadocLinks configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Jan 30, 2024
1 parent 2c5e21a commit f77b997
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.gradle.api.Project
import org.gradle.api.attributes.Bundling
import org.gradle.api.attributes.Category
import org.gradle.api.attributes.DocsType
import org.gradle.api.attributes.LibraryElements
import org.gradle.api.attributes.Usage
import org.gradle.api.tasks.SourceSet
import org.gradle.api.tasks.SourceSetContainer
Expand Down Expand Up @@ -37,6 +38,13 @@ abstract class JavadocLinksPlugin : Plugin<Project> {
extendsFrom(target.configurations.named(apiElementsConfigurationName).get())
isCanBeResolved = true
isCanBeConsumed = false

attributes {
attribute(Category.CATEGORY_ATTRIBUTE, target.objects.named(Category.LIBRARY))
attribute(Bundling.BUNDLING_ATTRIBUTE, target.objects.named(Bundling.EXTERNAL))
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, target.objects.named(LibraryElements.JAR))
attribute(Usage.USAGE_ATTRIBUTE, target.objects.named(Usage.JAVA_API))
}
}

val javadocView = target.configurations.register(linkDependencies.name + "Javadoc") {
Expand Down

0 comments on commit f77b997

Please sign in to comment.