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 2022/01/01 13:02:54 UTC
[groovy] branch master updated: GROOVY-10418: Include `src/antlr` in the sources jar (improved solution)
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
The following commit(s) were added to refs/heads/master by this push:
new a3ae4ff GROOVY-10418: Include `src/antlr` in the sources jar (improved solution)
a3ae4ff is described below
commit a3ae4ff7ed0e9b55a403b60aa303d0615d91be98
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Jan 1 23:02:47 2022 +1000
GROOVY-10418: Include `src/antlr` in the sources jar (improved solution)
---
.../src/main/groovy/org.apache.groovy-base.gradle | 12 -----------
.../src/main/groovy/org.apache.groovy-core.gradle | 25 ++++++++++++++++++++++
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-base.gradle b/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
index a8d9a0e..b4da24e 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
@@ -29,7 +29,6 @@ import org.apache.groovy.gradle.CheckstyleHtmlReport
plugins {
id 'java-library'
id 'groovy'
- id 'antlr'
id 'checkstyle'
id 'codenarc'
id 'com.github.spotbugs'
@@ -54,14 +53,6 @@ java {
withJavadocJar()
}
-sourceSets {
- main {
- antlr {
- srcDirs = ['src/antlr']
- }
- }
-}
-
def generateReleaseInfo = tasks.register("generateReleaseInfo", ReleaseInfoGenerator)
def groovydocJar = tasks.register("groovydocJar", Jar) {
@@ -102,9 +93,6 @@ configurations {
sourceSets.main.groovy.srcDirs.each {
artifact(it)
}
- sourceSets.main.antlr.srcDirs.each {
- artifact(it)
- }
}
}
javadocClasspath {
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-core.gradle b/buildSrc/src/main/groovy/org.apache.groovy-core.gradle
index 6ce573d..7a1fd01 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-core.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-core.gradle
@@ -217,3 +217,28 @@ tasks.named("generateGrammarSource") {
}
}
}
+
+configurations {
+ sourcesForAggregation {
+ canBeConsumed = true
+ canBeResolved = false
+ extendsFrom implementation, runtimeOnly
+ attributes {
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category, Category.DOCUMENTATION))
+ attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling, Bundling.EXTERNAL))
+ attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, DocsType.SOURCES))
+ attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, "aggregation"))
+ }
+ outgoing {
+ sourceSets.main.java.srcDirs.each {
+ artifact(it)
+ }
+ sourceSets.main.groovy.srcDirs.each {
+ artifact(it)
+ }
+ sourceSets.main.antlr.srcDirs.each {
+ artifact(it)
+ }
+ }
+ }
+}
\ No newline at end of file