Improved templates.
This commit is contained in:
parent
eb907c33fa
commit
77a1b1cf14
3 changed files with 71 additions and 5 deletions
36
examples/kotlin/example.mustache
Normal file
36
examples/kotlin/example.mustache
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
package {{packageName}}
|
||||
|
||||
import java.util.Date
|
||||
|
||||
/**
|
||||
* Provides semantic version information.
|
||||
*
|
||||
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
||||
*/
|
||||
object {{className}} {
|
||||
@JvmField
|
||||
val PROJECT = "{{project}}"
|
||||
@JvmField
|
||||
val BUILDDATE = Date({{epoch}}L)
|
||||
@JvmField
|
||||
val MAJOR = {{major}}
|
||||
@JvmField
|
||||
val MINOR = {{minor}}
|
||||
@JvmField
|
||||
val PATCH = {{patch}}
|
||||
@JvmField
|
||||
val PRERELEASE = "{{preRelease}}"
|
||||
@JvmField
|
||||
val BUILDMETA = "{{buildMeta}}"
|
||||
|
||||
/**
|
||||
* The full semantic version string.
|
||||
*/
|
||||
@JvmField
|
||||
val VERSION = ("$MAJOR.$MINOR.$PATCH" + if (PRERELEASE.isNotEmpty()) "-$PRERELEASE" else ""
|
||||
+ if (BUILDMETA.isNotEmpty()) "+$BUILDMETA" else "")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue