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 2021/12/21 07:20:32 UTC

[groovy] branch master updated: GROOVY-10418: Include `src/antlr` in the sources jar (probably a better way but this seems to work)

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 19ab735  GROOVY-10418: Include `src/antlr` in the sources jar (probably a better way but this seems to work)
19ab735 is described below

commit 19ab735db0ada15e210444fea864df021f62f26a
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue Dec 21 15:37:07 2021 +1000

    GROOVY-10418: Include `src/antlr` in the sources jar (probably a better way but this seems to work)
---
 build.gradle                                           |  2 +-
 buildSrc/src/main/groovy/org.apache.groovy-base.gradle | 12 ++++++++++++
 subprojects/groovy-all/build.gradle                    |  1 +
 subprojects/groovy-binary/build.gradle                 |  1 +
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/build.gradle b/build.gradle
index 575c54e..1aac17d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -98,7 +98,7 @@ groovyCore {
             'org.codehaus.groovy.classgen.Verifier',
             'org.codehaus.groovy.ast.tools.GeneralUtils'
 
-    excludeFromJavadoc '**/GroovyRecognizer.java' // generated file
+    excludeFromJavadoc '**/GroovyRecognizer.java', '*.g4' // generated file
 }
 
 dependencies {
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-base.gradle b/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
index b4da24e..a8d9a0e 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-base.gradle
@@ -29,6 +29,7 @@ import org.apache.groovy.gradle.CheckstyleHtmlReport
 plugins {
     id 'java-library'
     id 'groovy'
+    id 'antlr'
     id 'checkstyle'
     id 'codenarc'
     id 'com.github.spotbugs'
@@ -53,6 +54,14 @@ java {
     withJavadocJar()
 }
 
+sourceSets {
+    main {
+        antlr {
+            srcDirs = ['src/antlr']
+        }
+    }
+}
+
 def generateReleaseInfo = tasks.register("generateReleaseInfo", ReleaseInfoGenerator)
 
 def groovydocJar = tasks.register("groovydocJar", Jar) {
@@ -93,6 +102,9 @@ configurations {
             sourceSets.main.groovy.srcDirs.each {
                 artifact(it)
             }
+            sourceSets.main.antlr.srcDirs.each {
+                artifact(it)
+            }
         }
     }
     javadocClasspath {
diff --git a/subprojects/groovy-all/build.gradle b/subprojects/groovy-all/build.gradle
index e322f30..817b346 100644
--- a/subprojects/groovy-all/build.gradle
+++ b/subprojects/groovy-all/build.gradle
@@ -24,6 +24,7 @@ plugins {
 docAggregation {
     excludeFromJavadoc '**/*.html',
             '**/*.groovy',
+            '*.g4',
             '**/GroovyRecognizer.java' // generated file
 }
 
diff --git a/subprojects/groovy-binary/build.gradle b/subprojects/groovy-binary/build.gradle
index 61b82c5..44f6ce1 100644
--- a/subprojects/groovy-binary/build.gradle
+++ b/subprojects/groovy-binary/build.gradle
@@ -27,6 +27,7 @@ plugins {
 docAggregation {
     excludeFromJavadoc '**/*.html',
             '**/*.groovy',
+            '*.g4',
             '**/GroovyRecognizer.java' // generated file
 }