diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml
index cf75013..ca84ff0 100644
--- a/.idea/libraries/bld.xml
+++ b/.idea/libraries/bld.xml
@@ -6,6 +6,7 @@
+
@@ -14,4 +15,4 @@
-
\ No newline at end of file
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index cf5fb1d..805e7b4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -13,6 +13,12 @@
diff --git a/examples/.idea/libraries/bld.xml b/examples/.idea/libraries/bld.xml
index cf75013..ca84ff0 100644
--- a/examples/.idea/libraries/bld.xml
+++ b/examples/.idea/libraries/bld.xml
@@ -6,6 +6,7 @@
+
@@ -14,4 +15,4 @@
-
\ No newline at end of file
+
diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..e43d402
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,5 @@
+# Compile and Run Example
+
+```plain
+./bld compile run
+```
diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties
index 19f286f..acaab6c 100644
--- a/examples/lib/bld/bld-wrapper.properties
+++ b/examples/lib/bld/bld-wrapper.properties
@@ -1,6 +1,6 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
-bld.extensions=com.uwyn.rife2:bld-generated-version:0.9.2
+bld.extensions=com.uwyn.rife2:bld-generated-version:0.9.3-SNAPSHOT
bld.repositories=MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.downloadLocation=
bld.version=1.7.5
diff --git a/examples/src/bld/java/com/example/SampleBuild.java b/examples/src/bld/java/com/example/SampleBuild.java
index f3fae67..f910421 100644
--- a/examples/src/bld/java/com/example/SampleBuild.java
+++ b/examples/src/bld/java/com/example/SampleBuild.java
@@ -28,8 +28,8 @@ public class SampleBuild extends Project {
downloadSources = true;
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
scope(test)
- .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
- .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)));
+ .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
+ .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)));
}
public static void main(String[] args) {
@@ -50,4 +50,4 @@ public class SampleBuild extends Project {
// .classTemplate(new File(workDirectory, "myversion.txt"))
.execute();
}
-}
\ No newline at end of file
+}
diff --git a/src/bld/java/rife/bld/extension/GeneratedVersionOperationBuild.java b/src/bld/java/rife/bld/extension/GeneratedVersionOperationBuild.java
index e48ec08..b932825 100644
--- a/src/bld/java/rife/bld/extension/GeneratedVersionOperationBuild.java
+++ b/src/bld/java/rife/bld/extension/GeneratedVersionOperationBuild.java
@@ -18,6 +18,7 @@ package rife.bld.extension;
import rife.bld.BuildCommand;
import rife.bld.Project;
+import rife.bld.operations.JarOperation;
import rife.bld.publish.PublishDeveloper;
import rife.bld.publish.PublishLicense;
import rife.bld.publish.PublishScm;
@@ -35,7 +36,7 @@ public class GeneratedVersionOperationBuild extends Project {
public GeneratedVersionOperationBuild() {
pkg = "rife.bld.extension";
name = "GeneratedVersionOperation";
- version = version(0, 9, 2);
+ version = version(0, 9, 3, "SNAPSHOT");
javaRelease = 17;
downloadSources = true;
@@ -45,8 +46,8 @@ public class GeneratedVersionOperationBuild extends Project {
scope(compile)
.include(dependency("com.uwyn.rife2", "bld", version(1, 7, 5)));
scope(test)
- .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
- .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)))
+ .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
+ .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)))
.include(dependency("org.assertj", "assertj-core", version(3, 24, 2)));
precompileOperation()
@@ -54,6 +55,7 @@ public class GeneratedVersionOperationBuild extends Project {
javadocOperation()
.javadocOptions()
+ .author()
.docLint(NO_MISSING)
.link("https://rife2.github.io/bld/")
.link("https://rife2.github.io/rife2/")
diff --git a/src/main/java/rife/bld/extension/GeneratedVersion.java b/src/main/java/rife/bld/extension/GeneratedVersion.java
index 8da66e3..54fde92 100644
--- a/src/main/java/rife/bld/extension/GeneratedVersion.java
+++ b/src/main/java/rife/bld/extension/GeneratedVersion.java
@@ -30,6 +30,8 @@ import java.io.File;
public class GeneratedVersion {
private File classFile;
private String className;
+ private File directory;
+ private String extension = ".java";
private String packageName;
private BaseProject project;
private String projectName;
@@ -42,13 +44,6 @@ public class GeneratedVersion {
return classFile;
}
- /**
- * Sets the class file.
- */
- public void setClassFile(File classFile) {
- this.classFile = classFile;
- }
-
/**
* Returns the class name.
*/
@@ -57,10 +52,17 @@ public class GeneratedVersion {
}
/**
- * Sets the class name.
+ * Returns the destination directory.
*/
- public void setClassName(String className) {
- this.className = className;
+ public File getDirectory() {
+ return directory;
+ }
+
+ /**
+ * Returns the file extension.
+ */
+ public String getExtension() {
+ return extension;
}
/**
@@ -70,13 +72,6 @@ public class GeneratedVersion {
return packageName;
}
- /**
- * Sets the package name.
- */
- public void setPackageName(String packageName) {
- this.packageName = packageName;
- }
-
/**
* Returns the project.
*/
@@ -84,13 +79,6 @@ public class GeneratedVersion {
return project;
}
- /**
- * Sets the project.
- */
- public void setProject(BaseProject project) {
- this.project = project;
- }
-
/**
* Returns the project name.
*/
@@ -98,13 +86,6 @@ public class GeneratedVersion {
return projectName;
}
- /**
- * Sets the project name.
- */
- public void setProjectName(String projectName) {
- this.projectName = projectName;
- }
-
/**
* Returns the template.
*/
@@ -112,6 +93,55 @@ public class GeneratedVersion {
return template;
}
+ /**
+ * Sets the class file.
+ */
+ public void setClassFile(File classFile) {
+ this.classFile = classFile;
+ }
+
+ /**
+ * Sets the class name.
+ */
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ /**
+ * Set the destination directory.
+ */
+ public void setDirectory(File directory) {
+ this.directory = directory;
+ }
+
+ /**
+ * Sets the file extension. (e.g. {@code .java}
+ */
+ public void setExtension(String extension) {
+ this.extension = extension;
+ }
+
+ /**
+ * Sets the package name.
+ */
+ public void setPackageName(String packageName) {
+ this.packageName = packageName;
+ }
+
+ /**
+ * Sets the project.
+ */
+ public void setProject(BaseProject project) {
+ this.project = project;
+ }
+
+ /**
+ * Sets the project name.
+ */
+ public void setProjectName(String projectName) {
+ this.projectName = projectName;
+ }
+
/**
* Sets the template file.
*/
diff --git a/src/main/java/rife/bld/extension/GeneratedVersionOperation.java b/src/main/java/rife/bld/extension/GeneratedVersionOperation.java
index c528f1a..9d90d79 100644
--- a/src/main/java/rife/bld/extension/GeneratedVersionOperation.java
+++ b/src/main/java/rife/bld/extension/GeneratedVersionOperation.java
@@ -115,12 +115,13 @@ public class GeneratedVersionOperation extends AbstractOperation