Fixed projectName setter
This commit is contained in:
parent
2fa5864c21
commit
eef391e90c
4 changed files with 7 additions and 17 deletions
|
@ -12,6 +12,6 @@ public final class {{v className/}} {
|
||||||
public static final String VERSION = "{{v version/}}";
|
public static final String VERSION = "{{v version/}}";
|
||||||
|
|
||||||
private {{v className/}}() {
|
private {{v className/}}() {
|
||||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
// no-op
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -39,6 +39,7 @@ public class SampleBuild extends Project {
|
||||||
public void genver() throws Exception {
|
public void genver() throws Exception {
|
||||||
new GeneratedVersionOperation()
|
new GeneratedVersionOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
|
// .projectName("My App")
|
||||||
// .classTemplate(new File(workDirectory, "myversion.txt"))
|
// .classTemplate(new File(workDirectory, "myversion.txt"))
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,17 @@
|
||||||
/*
|
|
||||||
* This file is automatically generated.
|
|
||||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.example;
|
package com.example;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides project version information.
|
|
||||||
*/
|
|
||||||
public final class GeneratedVersion {
|
public final class GeneratedVersion {
|
||||||
public static final String PROJECT = "Sample";
|
public static final String PROJECT = "My App";
|
||||||
public static final Date BUILD_DATE = new Date(1682736440919L);
|
public static final Date BUILD_DATE = new Date(1682802935888L);
|
||||||
public static final int MAJOR = 1;
|
public static final int MAJOR = 1;
|
||||||
public static final int MINOR = 0;
|
public static final int MINOR = 0;
|
||||||
public static final int REVISION = 1;
|
public static final int REVISION = 1;
|
||||||
public static final String QUALIFIER = "rc1";
|
public static final String QUALIFIER = "rc1";
|
||||||
public static final String VERSION = "1.0.1-rc1";
|
public static final String VERSION = "1.0.1-rc1";
|
||||||
|
|
||||||
/**
|
|
||||||
* Disables the default constructor.
|
|
||||||
*/
|
|
||||||
private GeneratedVersion() {
|
private GeneratedVersion() {
|
||||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
// no-op
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -194,7 +194,7 @@ public class GeneratedVersionOperation extends AbstractOperation<GeneratedVersio
|
||||||
* Sets the project name.
|
* Sets the project name.
|
||||||
*/
|
*/
|
||||||
public GeneratedVersionOperation projectName(String projectName) {
|
public GeneratedVersionOperation projectName(String projectName) {
|
||||||
generatedVersion.setPackageName(projectName);
|
generatedVersion.setProjectName(projectName);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue