Added pmd extension

Added fromProject instead of using the constructor
Improved tests
This commit is contained in:
Erik C. Thauvin 2023-04-15 20:31:13 -07:00
parent b5af26c074
commit 9dfde85473
18 changed files with 573 additions and 401 deletions

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.19.jar!/" />
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.20.jar!/" />
<root url="file://$PROJECT_DIR$/lib/bld" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.19-sources.jar!/" />
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.20-sources.jar!/" />
<root url="file://$PROJECT_DIR$/lib/bld" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />

View file

@ -7,7 +7,7 @@
],
"java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [
"${HOME}/.rife2/dist/rife2-1.5.19.jar",
"${HOME}/.rife2/dist/rife2-1.5.20.jar",
"lib/compile/*.jar",
"lib/runtime/*.jar",
"lib/test/*.jar"

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Sun Apr 02 10:32:44 PDT 2023
bld.extension=com.uwyn.rife2:bld-property-file:0.9.1
bld.repositories=MAVEN_LOCAL,RIFE2_RELEASES
bld.extension=com.uwyn.rife2:bld-property-file:0.9.2-SNAPSHOT
bld.repositories=MAVEN_LOCAL,MAVEN_LOCAL,RIFE2_RELEASES,RIFE2_SNAPSHOTS
bld.downloadExtensionSources=true
rife2.downloadLocation=
rife2.version=1.5.19
rife2.version=1.5.20

View file

@ -39,7 +39,8 @@ public class PropertyFileExampleBuild extends Project {
@BuildCommand(summary = "Updates major version")
public void updateMajor() throws Exception {
new PropertyFileOperation(this)
new PropertyFileOperation()
.fromProject(this)
.file("version.properties")
// set the major version to 1 if it doesn't exist, increase by 1
.entry(new EntryInt("version.major").defaultValue(0).calc(ADD))
@ -54,7 +55,8 @@ public class PropertyFileExampleBuild extends Project {
@BuildCommand(summary = "Updates minor version")
public void updateMinor() throws Exception {
new PropertyFileOperation(this)
new PropertyFileOperation()
.fromProject(this)
.file("version.properties")
// set the major version to 1 if it doesn't exist
.entry(new EntryInt("version.major").defaultValue(1))
@ -69,7 +71,8 @@ public class PropertyFileExampleBuild extends Project {
@BuildCommand(summary = "Updates patch version")
public void updatePatch() throws Exception {
new PropertyFileOperation(this)
new PropertyFileOperation()
.fromProject(this)
.file("version.properties")
// set the major version to 1 if it doesn't exist
.entry(new EntryInt("version.major").defaultValue(1))
@ -84,7 +87,8 @@ public class PropertyFileExampleBuild extends Project {
@BuildCommand(summary = "Updates the release")
public void updateRelease() throws Exception {
new PropertyFileOperation(this)
new PropertyFileOperation()
.fromProject(this)
.file("version.properties")
// set the release to current date/time
.entry(new EntryDate("release").now().pattern("yyyyMMddHHmmss"))
@ -95,7 +99,8 @@ public class PropertyFileExampleBuild extends Project {
@BuildCommand(summary = "Delete version properties")
public void deleteVersion() throws Exception {
new PropertyFileOperation(this)
new PropertyFileOperation()
.fromProject(this)
.file("version.properties")
.entry(new Entry("version.major").delete())
.entry(new Entry("version.minor").delete())