You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/12/06 00:39:33 UTC

[groovy] 02/03: place javadoc and groovydoc jars into groovyLibrary component

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 0f931e1a0cee79c90e6ceed5b0fb056611175de6
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun Dec 6 10:36:53 2020 +1000

    place javadoc and groovydoc jars into groovyLibrary component
---
 buildSrc/src/main/groovy/org.apache.groovy-base.gradle | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/buildSrc/src/main/groovy/org.apache.groovy-base.gradle b/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
index ee33dd1..b4cc858 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
@@ -213,12 +213,6 @@ tasks.withType(Javadoc).configureEach {
     options.source = sharedConfiguration.targetJavaVersion.get()
 }
 
-components.java {
-    addVariantsFromConfiguration(configurations.groovydocElements) {
-        mapToOptional()
-    }
-}
-
 tasks.named("compileTestGroovy") {
     options.forkOptions.jvmArgs += ["-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true"]
 }
@@ -283,6 +277,18 @@ def factory = objects.newInstance(Services).softwareComponentFactory
 def component = factory.adhoc('groovyLibrary')
 components.add(component)
 
+components.groovyLibrary {
+    addVariantsFromConfiguration(configurations.groovydocElements) {
+        mapToOptional()
+    }
+    addVariantsFromConfiguration(configurations.javadocElements) {
+        mapToOptional()
+    }
+    addVariantsFromConfiguration(configurations.sourcesElements) {
+        mapToOptional()
+    }
+}
+
 // By declaring a codehaus capability we can tell Gradle that the user has to
 // choose between "old" groovy and "new" groovy
 List<String> capabilities = [