Semantic Version Annotation Processor 1.0
<1 min read
I've just released an annotation processor that automatically generates a class based on a Mustache template and containing the semantic version (major, minor, patch, etc.) that is read from a Properties file or defined in the annotation.
Using annotation elements:
import net.thauvin.erik.semver.Version;
@Version(major = 1, minor = 0, patch = 0, preRelease = "beta")
public class SemverExample {
// …
}
Or using a properties file:
import net.thauvin.erik.semver.Version;
@Version(properties = "version.properties")
public class SemverExample {
// …
}
# version.properties
version.major=1
version.minor=0
version.patch=0
version.prerelease=beta
Upon running the annotation processor, a source file is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable Mustache template.
import net.thauvin.erik.semver.Version;
@Version(template = "version.mustache")
public class SemverExample {
// …
}
The annotation processor also supports Kotlin.
Documentation and source are on GitHub.
Twits du Jour (May 9)
<1 min read
- I'm at @BurgerKing in Everett, WA swarmapp.com/c/9idJ4NoAMx1 #
- I just finished walking 4.26 miles in 1h:28m:23s with #Endomondo #endorphins goo.gl/8d5YMf #
- I'm at Everett Family History Center, LDS in Everett, WA swarmapp.com/c/hOdRO6sdxft #
- I'm at US Post Office in Everett, WA swarmapp.com/c/2ix8vo1PcED #
Twits du Jour (May 8)
<1 min read
- I'm at Buzz Inn Steakhouse - @BuzzInnWA in Everett, WA swarmapp.com/c/jaRiRbp4B4c #
Twits du Jour (May 7)
<1 min read
- I'm at wayback burgers in Bellevue, WA swarmapp.com/c/cEducupBA2Z #
- I'm at Preston-Snoqualmie Trail swarmapp.com/c/9YlRV9cRFSm #
- I'm at Brackett's Landing in Edmonds, WA swarmapp.com/c/kiDkojYctrG #
- I'm at Edmonds Ferry Terminal in Edmonds, WA swarmapp.com/c/aa6DNW4EGAV #
- Google Pixel International Giveaway @AndroidAuth #giveaway wn.nr/wSkwpp #