1
0
Fork 0
mirror of https://github.com/ethauvin/version-processor.git synced 2025-04-24 15:37:12 -07:00

Change package name.

This commit is contained in:
Cedric Beust 2015-11-14 08:41:40 -08:00
parent 465d145f1d
commit 135bd465e1
6 changed files with 28 additions and 33 deletions

2
.idea/.name generated
View file

@ -1 +1 @@
apt-example version-processor

View file

@ -1,29 +0,0 @@
package com.beust.apt.example;
import com.beust.apt.processor.Version;
import java.io.File;
@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 {
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.
// You need $JDK_HOME/lib/tools.jar for this
// com.sun.tools.javac.Main.main(args);
File file = new File(".");
System.out.println("Version generated: " + GeneratedVersion.VERSION);
// new Example();
}
}

View file

@ -0,0 +1,24 @@
package com.beust.version.example;
import com.beust.version.Version;
@Version(fileName = "example/src/main/properties/version.properties", propertyName = "example.version")
class Example {
public static void main(String[] argv) throws Exception {
// Set this to true and launch this class if you want to debug the annotation processor.
boolean debug = false;
if (debug) {
String root = "/Users/cbeust/java/java-apt-example/";
String[] args = new String[]{
"-classpath",
root + "processor/kobaltBuild/libs/processor-0.1.jar",
"-processor", "com.beust.version.VersionProcessor",
root + "example/src/main/java/com/beust/apt/example/Example.java"
};
// You need $JDK_HOME/lib/tools.jar for this
// com.sun.tools.javac.Main.main(args);
}
System.out.println("Version generated: " + GeneratedVersion.VERSION);
}
}

View file

@ -1,4 +1,4 @@
package com.beust.apt.processor; package com.beust.version;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View file

@ -1,4 +1,4 @@
package com.beust.apt.processor; package com.beust.version;
import javax.annotation.processing.*; import javax.annotation.processing.*;
import javax.lang.model.SourceVersion; import javax.lang.model.SourceVersion;

View file

@ -1 +1 @@
com.beust.apt.processor.VersionProcessor com.beust.version.VersionProcessor