From 8e8d5283f8b1d8e199f999c35336d9c888fe3c29 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Thu, 6 Apr 2023 15:24:00 -0400 Subject: [PATCH] Updated for upcoming RIFE2 1.5.18 --- .idea/libraries/bld.xml | 4 +- lib/bld/bld-wrapper.properties | 4 +- .../java/rife/bld/extension/Antlr4Build.java | 59 ++++++++++--------- .../rife/bld/extension/Antlr4Operation.java | 22 +++++++ 4 files changed, 57 insertions(+), 32 deletions(-) diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index e1e183f..2acbaf9 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,11 +2,11 @@ - + - + diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index c252da3..e84d58a 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -2,5 +2,5 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.extensions= bld.repositories=MAVEN_CENTRAL -rife2.downloadLocation= -rife2.version=1.5.17 +rife2.downloadLocation=https://uwyn.com +rife2.version=1.5.18-SNAPSHOT3 diff --git a/src/bld/java/rife/bld/extension/Antlr4Build.java b/src/bld/java/rife/bld/extension/Antlr4Build.java index a3ec385..43a3649 100644 --- a/src/bld/java/rife/bld/extension/Antlr4Build.java +++ b/src/bld/java/rife/bld/extension/Antlr4Build.java @@ -6,7 +6,6 @@ package rife.bld.extension; import rife.bld.Project; import rife.bld.publish.PublishDeveloper; -import rife.bld.publish.PublishInfo; import rife.bld.publish.PublishLicense; import rife.bld.publish.PublishScm; @@ -21,42 +20,46 @@ public class Antlr4Build extends Project { public Antlr4Build() { pkg = "rife.bld.extension"; name = "Antlr4"; - version = version(0,9,6); - javadocOptions - .docLint(NO_MISSING) - .link("https://rife2.github.io/rife2/"); - - publishRepository = version.isSnapshot() ? repository("rife2-snapshots") : repository("rife2-releases"); - publishInfo = new PublishInfo() - .groupId("com.uwyn.rife2") - .artifactId("bld-antlr4") - .description("bld extension for generating ANTLR4 grammars") - .url("https://github.com/rife2/bld-antlr4") - .developer(new PublishDeveloper() - .id("gbevin") - .name("Geert Bevin") - .email("gbevin@uwyn.com") - .url("https://github.com/gbevin")) - .license(new PublishLicense() - .name("The Apache License, Version 2.0") - .url("https://www.apache.org/licenses/LICENSE-2.0.txt")) - .scm(new PublishScm() - .connection("scm:git:https://github.com/rife2/bld-antlr4.git") - .developerConnection("scm:git:git@github.com:rife2/bld-antlr4.git") - .url("https://github.com/rife2/bld-antlr4")) - .signKey(property("sign.key")) - .signPassphrase(property("sign.passphrase")); + version = version(0,9,7,"SNAPSHOT"); javaRelease = 17; downloadSources = true; autoDownloadPurge = true; - repositories = List.of(MAVEN_CENTRAL,RIFE2); + + repositories = List.of(MAVEN_CENTRAL, repository("https://repo.rife2.com/snapshots"), RIFE2); scope(compile) - .include(dependency("com.uwyn.rife2", "rife2", version(1,5,17))) + .include(dependency("com.uwyn.rife2", "rife2", version(1,5,18,"SNAPSHOT"))) .include(dependency("org.antlr", "antlr4", version(4,11,1))); scope(test) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5,9,2))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1,9,2))); + + javadocOperation() + .javadocOptions() + .docLint(NO_MISSING) + .link("https://rife2.github.io/rife2/"); + + publishOperation() + .repository(version.isSnapshot() ? repository("rife2-snapshots") : repository("rife2-releases")) + .info() + .groupId("com.uwyn.rife2") + .artifactId("bld-antlr4") + .description("bld extension for generating ANTLR4 grammars") + .url("https://github.com/rife2/bld-antlr4") + .developer(new PublishDeveloper() + .id("gbevin") + .name("Geert Bevin") + .email("gbevin@uwyn.com") + .url("https://github.com/gbevin")) + .license(new PublishLicense() + .name("The Apache License, Version 2.0") + .url("https://www.apache.org/licenses/LICENSE-2.0.txt")) + .scm(new PublishScm() + .connection("scm:git:https://github.com/rife2/bld-antlr4.git") + .developerConnection("scm:git:git@github.com:rife2/bld-antlr4.git") + .url("https://github.com/rife2/bld-antlr4")) + .signKey(property("sign.key")) + .signPassphrase(property("sign.passphrase")); } @Override diff --git a/src/main/java/rife/bld/extension/Antlr4Operation.java b/src/main/java/rife/bld/extension/Antlr4Operation.java index f25ac58..620bc21 100644 --- a/src/main/java/rife/bld/extension/Antlr4Operation.java +++ b/src/main/java/rife/bld/extension/Antlr4Operation.java @@ -127,6 +127,17 @@ public class Antlr4Operation extends AbstractOperation { return this; } + /** + * Provides the source directories that will be used for the antlr operation. + * + * @param directories the source directories + * @return this operation instance + * @since 1.0 + */ + public Antlr4Operation sourceDirectories(File... directories) { + return sourceDirectories(Arrays.asList(directories)); + } + /** * Provides the source directories that will be used for the antlr operation. * @@ -139,6 +150,17 @@ public class Antlr4Operation extends AbstractOperation { return this; } + /** + * Provides the source files that will be used for the antlr operation. + * + * @param files the source files + * @return this operation instance + * @since 1.0 + */ + public Antlr4Operation sourceFiles(File... files) { + return sourceFiles(Arrays.asList(files)); + } + /** * Provides the source files that will be used for the antlr operation. *