groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] branch master updated: Mark antlr source folders as optional
Date Tue, 04 Jun 2019 06:00:52 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan 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 3c24c9d  Mark antlr source folders as optional
3c24c9d is described below

commit 3c24c9d57d9d3f917fbaf321ff71d99f4a904bb7
Author: Eric Milles <eric.milles@thomsonreuters.com>
AuthorDate: Mon Jun 3 14:43:19 2019 -0500

    Mark antlr source folders as optional
    
    Generate the grammar source folders with:
    >gradlew antlr2classes generateGrammarSource eclipse
---
 gradle/eclipse.gradle                                      |  5 +++++
 src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gradle/eclipse.gradle b/gradle/eclipse.gradle
index 2a6a3a8..207142e 100644
--- a/gradle/eclipse.gradle
+++ b/gradle/eclipse.gradle
@@ -126,4 +126,9 @@ allprojects {
 
 eclipse.classpath.file.whenMerged {
     entries.removeAll { entry -> entry.path == '/groovy-groovydoc' }
+
+    entries.findAll { entry -> entry.path =~ '^target/generated/sources/antlr' }.each
{ entry ->
+        entry.entryAttributes['ignore_optional_problems'] = 'true'
+        entry.entryAttributes['optional'] = 'true'
+    }
 }
diff --git a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
index 0b88246..c2c0f16 100644
--- a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
+++ b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
@@ -32,11 +32,11 @@ import picocli.CommandLine.Unmatched
 @SuppressWarnings('Println')
 @Command(name = 'grape', description = 'Allows for the inspection and management of the local
grape cache.',
         subcommands = [
-                Install,
-                Uninstall,
-                ListCommand,
-                Resolve,
-                picocli.CommandLine.HelpCommand])
+                GrapeMain.Install,
+                GrapeMain.Uninstall,
+                GrapeMain.ListCommand,
+                GrapeMain.Resolve,
+                CommandLine.HelpCommand])
 class GrapeMain implements Runnable {
     @Option(names = ['-D', '--define'], description = 'define a system property', paramLabel
= '<name=value>')
     private final Map<String, String> properties = new LinkedHashMap<String, String>()


Mime
View raw message