mirror of
https://github.com/ethauvin/version-processor.git
synced 2025-04-24 23:47:11 -07:00
Minor improvements.
This commit is contained in:
parent
ae6392aafd
commit
30f767f45a
7 changed files with 152 additions and 91 deletions
|
@ -4,24 +4,25 @@ import com.beust.apt.processor.Version;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
@Version("1.3")
|
||||
@Version(fileName = "example/src/main/properties/version.properties", propertyName = "example.version")
|
||||
class Example {
|
||||
public Example() {
|
||||
System.out.println("Instantiating Example");
|
||||
}
|
||||
|
||||
public static void main(String[] argv) throws Exception {
|
||||
// Uncomment these lines and launch this class to debug the annotation processor.
|
||||
// String[] args = new String[] {
|
||||
//// "-proc:only",
|
||||
// "-classpath", "/Users/beust/home/java/java-apt-example/processor/kobaltBuild/libs/processor-0.1.jar",
|
||||
// "-processor", "com.beust.apt.processor.MainProcessor",
|
||||
// "/Users/beust/java/java-apt-example/example/src/main/java/com/beust/apt/example/Example.java"
|
||||
// };
|
||||
String root = "/Users/cbeust/java/java-apt-example/";
|
||||
String[] args = new String[] {
|
||||
"-classpath",
|
||||
root + "processor/kobaltBuild/libs/processor-0.1.jar",
|
||||
"-processor", "com.beust.apt.processor.VersionProcessor",
|
||||
root + "example/src/main/java/com/beust/apt/example/Example.java"
|
||||
};
|
||||
// Uncomment this line and launch this class to debug the annotation processor.
|
||||
// com.sun.tools.javac.Main.main(args);
|
||||
|
||||
File file = new File(".");
|
||||
System.out.println("Version generated: " + GeneratedVersion.VERSION);
|
||||
new Example();
|
||||
// new Example();
|
||||
}
|
||||
}
|
1
example/src/main/properties/version.properties
Normal file
1
example/src/main/properties/version.properties
Normal file
|
@ -0,0 +1 @@
|
|||
example.version=1.4
|
Loading…
Add table
Add a link
Reference in a new issue