Kobalt 1.0.71 update.

This commit is contained in:
Erik C. Thauvin 2017-04-19 10:21:47 -07:00
parent b471f6208d
commit 23eff89645
27 changed files with 622 additions and 834 deletions

9
.idea/compiler.xml generated Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="semver_main" target="1.8" />
<module name="semver_test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

View file

@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="&amp;#36;file.fileName&#10;&#10;Copyright (c) 2016-&amp;#36;today.year, Erik C. Thauvin (erik@thauvin.net)&#10;All rights reserved.&#10;&#10;Redistribution and use in source and binary forms, with or without&#10;modification, are permitted provided that the following conditions are met:&#10;&#10; Redistributions of source code must retain the above copyright notice, this&#10; list of conditions and the following disclaimer.&#10;&#10; Redistributions in binary form must reproduce the above copyright notice,&#10; this list of conditions and the following disclaimer in the documentation&#10; and/or other materials provided with the distribution.&#10;&#10; Neither the name of this project nor the names of its contributors may be&#10; used to endorse or promote products derived from this software without&#10; specific prior written permission.&#10;&#10;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;&#10;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&#10;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&#10;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE&#10;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&#10;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR&#10;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER&#10;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,&#10;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&#10;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
<option name="myName" value="Erik's Copyright Notice" />
</copyright>
</component>

11
.idea/copyright/profiles_settings.xml generated Normal file
View file

@ -0,0 +1,11 @@
<component name="CopyrightManager">
<settings>
<module2copyright>
<element module="Source" copyright="Erik's Copyright Notice" />
</module2copyright>
<LanguageOptions name="JAVA">
<option name="fileTypeOverride" value="3" />
<option name="addBlankAfter" value="false" />
</LanguageOptions>
</settings>
</component>

6
.idea/encodings.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View file

@ -0,0 +1,53 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<option name="myLocal" value="true" />
<inspection_tool class="FieldMayBeFinal" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
<option name="TOP_LEVEL_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="INNER_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="METHOD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
</value>
</option>
<option name="FIELD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="IGNORE_DEPRECATED" value="false" />
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
<option name="myAdditionalJavadocTags" value="created" />
</inspection_tool>
<inspection_tool class="LocalCanBeFinal" enabled="true" level="WARNING" enabled_by_default="true">
<option name="REPORT_VARIABLES" value="true" />
<option name="REPORT_PARAMETERS" value="false" />
<option name="REPORT_CATCH_PARAMETERS" value="false" />
</inspection_tool>
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
<inspection_tool class="UnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="WeakerAccess" enabled="true" level="WARNING" enabled_by_default="true">
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="false" />
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
</inspection_tool>
</profile>
</component>

17
.idea/kobalt.xml generated Normal file
View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KobaltSettings">
<option name="linkedExternalProjectsSettings">
<KobaltProjectSettings>
<option name="autoDownloadKobalt" value="true" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.66" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</KobaltProjectSettings>
</option>
</component>
</project>

7
.idea/kotlinc.xml generated Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinCommonCompilerArguments">
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
</component>
</project>

44
.idea/misc.xml generated Normal file
View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ClientPropertiesManager">
<properties class="javax.swing.AbstractButton">
<property name="hideActionText" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JComponent">
<property name="html.disable" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JEditorPane">
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
<property name="charset" class="java.lang.String" />
</properties>
<properties class="javax.swing.JList">
<property name="List.isFileList" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JPasswordField">
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JSlider">
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
<property name="JSlider.isFilled" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTable">
<property name="Table.isFileList" class="java.lang.Boolean" />
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JToolBar">
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTree">
<property name="JTree.lineStyle" class="java.lang.String" />
</properties>
<properties class="javax.swing.text.JTextComponent">
<property name="caretAspectRatio" class="java.lang.Double" />
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" project-jdk-name="1.8.x" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/kobaltBuild/classes" />
</component>
</project>

12
.idea/modules.xml generated Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/kobalt/Build.kt.iml" />
<module fileurl="file://$PROJECT_DIR$/example/example.iml" filepath="$PROJECT_DIR$/example/example.iml" />
<module fileurl="file://$PROJECT_DIR$/semver.iml" filepath="$PROJECT_DIR$/semver.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/semver_main.iml" filepath="$PROJECT_DIR$/.idea/modules/semver_main.iml" group="semver" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/semver_test.iml" filepath="$PROJECT_DIR$/.idea/modules/semver_test.iml" group="semver" />
</modules>
</component>
</project>

View file

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="example" external.linked.project.path="$MODULE_DIR$/../../example" external.root.project.path="$MODULE_DIR$/../../example" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="3.1.49-beta" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../../example/build/classes/main" />
<output-test url="file://$MODULE_DIR$/../../example/build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../example">
<sourceFolder url="file://$MODULE_DIR$/../../example/src/generated/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../example/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../example/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../example/src/annotationProcessor/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/../../example/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/../../example/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/../../example/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/../../example/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="PROVIDED">
<library name="Gradle: semver-0.9.7:7">
<CLASSES />
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="semver" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.9.6-beta" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/../../build/classes/main" />
<output-test url="file://$MODULE_DIR$/../../build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$/../..">
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/../../.gradle" />
<excludeFolder url="file://$MODULE_DIR$/../../build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.apache.ant:ant-launcher:1.7.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.apache.ant:ant:1.7.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.beust:jcommander:1.48" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.beanshell:bsh:2.0b4" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.testng:testng:6.9.12" level="project" />
<orderEntry type="library" name="Gradle: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Gradle: commons-collections:commons-collections:3.2.1" level="project" />
</component>
</module>

14
.idea/modules/semver_main.iml generated Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="semver:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.9.7" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/../../build/classes/main" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/main">
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: com.github.spullara.mustache.java:compiler:0.9.4" level="project" />
</component>
</module>

19
.idea/modules/semver_test.iml generated Normal file
View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="semver:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.9.7" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output-test url="file://$MODULE_DIR$/../../build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/test">
<sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="semver_main" />
<orderEntry type="library" name="Gradle: com.github.spullara.mustache.java:compiler:0.9.4" level="project" />
<orderEntry type="library" name="Gradle: org.testng:testng:6.11" level="project" />
<orderEntry type="library" name="Gradle: com.beust:jcommander:1.64" level="project" />
<orderEntry type="library" name="Gradle: org.yaml:snakeyaml:1.17" level="project" />
</component>
<component name="TestModuleProperties" production-module="semver_main" />
</module>

3
.idea/scopes/Source.xml generated Normal file
View file

@ -0,0 +1,3 @@
<component name="DependencyValidationManager">
<scope name="Source" pattern="file[semver_main]:java//*.java||file[semver_test]:java//*.java" />
</component>

6
.idea/vcs.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View file

@ -51,19 +51,23 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
<body>
<h1 id="semantic-version-annotation-processor">Semantic Version Annotation Processor</h1>
<p><a href="http://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square" alt="License (3-Clause BSD)" /></a> <a href="https://www.versioneye.com/user/projects/56a680101b78fd00390001d2"><img src="https://www.versioneye.com/user/projects/56a680101b78fd00390001d2/badge.svg?style=flat" alt="Dependency Status" /></a> <a href="https://travis-ci.org/ethauvin/semver"><img src="https://travis-ci.org/ethauvin/semver.svg?branch=master" alt="Build Status" /></a> <a href="https://ci.appveyor.com/project/ethauvin/semver"><img src="https://ci.appveyor.com/api/projects/status/nbv4mxd1gpxtx69o?svg=true" alt="Build status" /></a> <a href="https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver"><img src="https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver/badge.svg" alt="Maven Central" /></a> <a href="https://bintray.com/ethauvin/maven/SemVer/_latestVersion"><img src="https://api.bintray.com/packages/ethauvin/maven/SemVer/images/download.svg" alt="Download" /></a></p>
<p>An <a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html">annotation processor</a> that automatically generates a <code>GeneratedVersion</code> class containing the <a href="http://semver.org/">semantic version</a> (major, minor, patch, etc.) that is read from a <code>Properties</code> file or defined in the <a href="https://docs.oracle.com/javase/tutorial/java/annotations/basics.html">annotation</a>.</p>
<p>An <a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html">annotation processor</a> that automatically generates a <code>GeneratedVersion</code> class based on a <a href="https://mustache.github.io/">Mustache</a> template and containing the <a href="http://semver.org/">semantic version</a> (major, minor, patch, etc.) that is read from a <code>Properties</code> file or defined in the <a href="https://docs.oracle.com/javase/tutorial/java/annotations/basics.html">annotation</a>.</p>
<p>This processor was inspired by Cédric Beust's <a href="https://github.com/cbeust/version-processor">version-processor</a>.</p>
<h2 id="examples">Examples</h2>
<ul>
<li>Using annotation elements:</li>
</ul>
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="fu">@Version</span>(major = <span class="dv">1</span>, minor = <span class="dv">0</span>, patch = <span class="dv">0</span>, prerelease = <span class="st">&quot;beta&quot;</span>)
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="kw">import net.thauvin.erik.semver.Version;</span>
<span class="fu">@Version</span>(major = <span class="dv">1</span>, minor = <span class="dv">0</span>, patch = <span class="dv">0</span>, preRelease = <span class="st">&quot;beta&quot;</span>)
<span class="kw">public</span> <span class="kw">class</span> A {
<span class="co">// ...</span></code></pre></div>
<ul>
<li>Or using a <a href="https://docs.oracle.com/javase/tutorial/essential/environment/properties.html">properties</a> file:</li>
</ul>
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="fu">@Version</span>(properties = <span class="st">&quot;version.properties&quot;</span>)
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="kw">import net.thauvin.erik.semver.Version;</span>
<span class="fu">@Version</span>(properties = <span class="st">&quot;version.properties&quot;</span>)
<span class="kw">public</span> <span class="kw">class</span> A {
<span class="co">// ...</span></code></pre></div>
<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co"># version.properties</span>
@ -72,146 +76,237 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
<span class="dt">version.patch</span><span class="ot">=</span><span class="dv">0</span>
<span class="dt">version.prerelease</span><span class="ot">=</span><span class="st">beta</span></code></pre></div>
<h2 id="template">Template</h2>
<p>Upon running the annotator processor, a source file <a href="https://github.com/ethauvin/semver/blob/master/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java"><code>GeneratedVersion.java</code></a> is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable <a href="http://velocity.apache.org/">Velocity</a> template.</p>
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="fu">@Version</span>(template = <span class="st">&quot;myversion.vm&quot;</span>)
<p>Upon running the annotation processor, a source file <a href="https://github.com/ethauvin/semver/blob/master/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java"><code>GeneratedVersion.java</code></a> is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable <a href="https://mustache.github.io/">Mustache</a> template.</p>
<p>To use your own template, simply create a <code>version.mustache</code> file. The processor will automatically look for it.</p>
<p>To specify your own template name, use:</p>
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="fu">@Version</span>(template = <span class="st">&quot;myversion.mustache&quot;</span>)
<span class="kw">public</span> <span class="kw">class</span> A {
<span class="co">// ...</span></code></pre></div>
<h3 id="default-template">Default Template</h3>
<p>The <a href="https://github.com/ethauvin/semver/blob/master/src/main/resources/version.vm">default template</a> implements the following static methods:</p>
<p>The <a href="https://github.com/ethauvin/semver/blob/master/src/main/resources/semver.mustache">default template</a> implements the following static fields:</p>
<table>
<thead>
<tr class="header">
<th>Method</th>
<th>Description</th>
<th>Example</th>
<th style="text-align: left;">Field</th>
<th style="text-align: left;">Description</th>
<th style="text-align: left;">Example</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>getProject</code></td>
<td>The project name, if any.</td>
<td><code>MyProject</code></td>
<td style="text-align: left;"><code>project</code></td>
<td style="text-align: left;">The project name, if any.</td>
<td style="text-align: left;"><code>MyProject</code></td>
</tr>
<tr class="even">
<td><code>getBuildDate</code></td>
<td>The build date.</td>
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html"><code>java.util.Date</code></a></td>
<td style="text-align: left;"><code>buildDate</code></td>
<td style="text-align: left;">The build date.</td>
<td style="text-align: left;"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html"><code>java.util.Date</code></a></td>
</tr>
<tr class="odd">
<td><code>getVersion</code></td>
<td>The full version string.</td>
<td><code>1.0.0-alpha+001</code></td>
<td style="text-align: left;"><code>version</code></td>
<td style="text-align: left;">The full version string.</td>
<td style="text-align: left;"><code>1.0.0-alpha+001</code></td>
</tr>
<tr class="even">
<td><code>getMajor</code></td>
<td>The major version.</td>
<td><code>1</code></td>
<td style="text-align: left;"><code>major</code></td>
<td style="text-align: left;">The major version.</td>
<td style="text-align: left;"><code>1</code></td>
</tr>
<tr class="odd">
<td><code>getMinor</code></td>
<td>The minor version.</td>
<td><code>0</code></td>
<td style="text-align: left;"><code>minor</code></td>
<td style="text-align: left;">The minor version.</td>
<td style="text-align: left;"><code>0</code></td>
</tr>
<tr class="even">
<td><code>getPatch</code></td>
<td>The patch version.</td>
<td><code>0</code></td>
<td style="text-align: left;"><code>patch</code></td>
<td style="text-align: left;">The patch version.</td>
<td style="text-align: left;"><code>0</code></td>
</tr>
<tr class="odd">
<td><code>getPreRelease</code></td>
<td>The pre-release version, if any.</td>
<td><code>alpha</code></td>
<td style="text-align: left;"><code>preRelease</code></td>
<td style="text-align: left;">The pre-release version, if any.</td>
<td style="text-align: left;"><code>alpha</code></td>
</tr>
<tr class="even">
<td><code>getBuildMetadata</code></td>
<td>The build metadata, if any.</td>
<td><code>001</code></td>
<td style="text-align: left;"><code>buildMeta</code></td>
<td style="text-align: left;">The build metadata, if any.</td>
<td style="text-align: left;"><code>001</code></td>
</tr>
</tbody>
</table>
<p>And the following methods/functions:</p>
<table style="width:100%;">
<colgroup>
<col style="width: 27%" />
<col style="width: 62%" />
<col style="width: 10%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;">Method</th>
<th style="text-align: left;">Description</th>
<th style="text-align: left;">Example</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>preReleaseWithPrefix()</code></td>
<td style="text-align: left;">Returns the pre-release with a prefix, <code>-</code> by default.</td>
<td style="text-align: left;"><code>-alpha</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>buildMetaWithPrefix()</code></td>
<td style="text-align: left;">Returns the build metadata with a prefix, <code>+</code> by default.</td>
<td style="text-align: left;"><code>+001</code></td>
</tr>
</tbody>
</table>
<h3 id="custom-template">Custom Template</h3>
<p>A very simple custom template might look something like:</p>
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="co">/* myversion.vm */</span>
<span class="kw">package</span> ${packageName}
<div class="sourceCode"><pre class="sourceCode java"><code class="sourceCode java"><span class="co">/* version.mustache */</span>
<span class="kw">package</span> {{packageName}}
<span class="kw">import java.util.Date;</span>
<span class="kw">public</span> <span class="dt">final</span> <span class="kw">class</span> ${className} {
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> String BUILDMETA = <span class="st">&quot;${buildmeta}&quot;</span>;
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> Date DATE = <span class="kw">new</span> Date(${epoch}L);
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> <span class="dt">int</span> MAJOR = ${major};
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> <span class="dt">int</span> MINOR = ${minor};
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> <span class="dt">int</span> PATCH = ${patch};
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> String PRERELEASE = <span class="st">&quot;${prerelease}&quot;</span>;
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> String PROJECT = <span class="st">&quot;${project}&quot;</span>;
<span class="kw">public</span> <span class="dt">final</span> <span class="kw">class</span> {{className}} {
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> String PROJECT = <span class="st">&quot;{{project}}&quot;</span>;
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> Date DATE = <span class="kw">new</span> Date({{epoch}}L);
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> <span class="dt">int</span> MAJOR = {{major}};
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> <span class="dt">int</span> MINOR = {{minor}};
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> <span class="dt">int</span> PATCH = {{patch}};
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> String PRERELEASE = <span class="st">&quot;{{preRelease}}&quot;</span>;
<span class="kw">public</span> <span class="dt">final</span> <span class="dt">static</span> String BUILDMETA = <span class="st">&quot;{{buildMeta}}&quot;</span>;
}</code></pre></div>
<p>The Velocity variables are automatically filled in by the processor.</p>
<p>Please also look at this <a href="https://github.com/ethauvin/mobibot/blob/master/version.vm">example</a> using <a href="https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html"><code>java.time</code></a></p>
<p>The mustache variables automatically filled in by the processor are:</p>
<table>
<thead>
<tr class="header">
<th style="text-align: left;">Variable</th>
<th style="text-align: left;">Description</th>
<th style="text-align: left;">Type</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>{{packageName}}</code></td>
<td style="text-align: left;">The package name.</td>
<td style="text-align: left;"><code>String</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>{{className}}</code></td>
<td style="text-align: left;">The class name.</td>
<td style="text-align: left;"><code>String</code></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>{{project}}</code></td>
<td style="text-align: left;">The project name.</td>
<td style="text-align: left;"><code>String</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>{{epoch}}</code></td>
<td style="text-align: left;">The build epoch/unix time.</td>
<td style="text-align: left;"><code>long</code></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>{{major}}</code></td>
<td style="text-align: left;">The major version.</td>
<td style="text-align: left;"><code>int</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>{{minor}}</code></td>
<td style="text-align: left;">The minor version.</td>
<td style="text-align: left;"><code>int</code></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>{{patch}}</code></td>
<td style="text-align: left;">The patch version.</td>
<td style="text-align: left;"><code>int</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>{{preRelease}}</code></td>
<td style="text-align: left;">The pre/release version.</td>
<td style="text-align: left;"><code>String</code></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>{{buildMeta}}</code></td>
<td style="text-align: left;">The build metadata version.</td>
<td style="text-align: left;"><code>String</code></td>
</tr>
</tbody>
</table>
<p>Please also look at this <a href="https://github.com/ethauvin/mobibot/blob/master/version.mustache">example</a> using <a href="https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html"><code>java.time</code></a></p>
<h2 id="elements-properties">Elements &amp; Properties</h2>
<p>The following annotation elements and properties are available:</p>
<table>
<thead>
<tr class="header">
<th>Element</th>
<th>Property</th>
<th>Description</th>
<th>Default</th>
<th style="text-align: left;">Element</th>
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Description</th>
<th style="text-align: left;">Default</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>project</code></td>
<td><code>version.project</code></td>
<td>The project name.</td>
<td></td>
<td style="text-align: left;"><code>project</code></td>
<td style="text-align: left;"><code>version.project</code></td>
<td style="text-align: left;">The project name.</td>
<td style="text-align: left;"></td>
</tr>
<tr class="even">
<td><code>major</code></td>
<td><code>version.major</code></td>
<td>The major version number.</td>
<td><code>1</code></td>
<td style="text-align: left;"><code>major</code></td>
<td style="text-align: left;"><code>version.major</code></td>
<td style="text-align: left;">The major version number.</td>
<td style="text-align: left;"><code>1</code></td>
</tr>
<tr class="odd">
<td><code>minor</code></td>
<td><code>version.major</code></td>
<td>The minor version number.</td>
<td><code>0</code></td>
<td style="text-align: left;"><code>minor</code></td>
<td style="text-align: left;"><code>version.major</code></td>
<td style="text-align: left;">The minor version number.</td>
<td style="text-align: left;"><code>0</code></td>
</tr>
<tr class="even">
<td><code>patch</code></td>
<td><code>version.patch</code></td>
<td>The patch version number.</td>
<td><code>0</code></td>
<td style="text-align: left;"><code>patch</code></td>
<td style="text-align: left;"><code>version.patch</code></td>
<td style="text-align: left;">The patch version number.</td>
<td style="text-align: left;"><code>0</code></td>
</tr>
<tr class="odd">
<td><code>prerelease</code></td>
<td><code>version.prerelease</code></td>
<td>The pre-release version.</td>
<td></td>
<td style="text-align: left;"><code>preRelease</code></td>
<td style="text-align: left;"><code>version.prerelease</code></td>
<td style="text-align: left;">The pre-release version.</td>
<td style="text-align: left;"></td>
</tr>
<tr class="even">
<td><code>buildmeta</code></td>
<td><code>version.buildmeta</code></td>
<td>The build metadata version.</td>
<td></td>
<td style="text-align: left;"><code>buildMeta</code></td>
<td style="text-align: left;"><code>version.buildmeta</code></td>
<td style="text-align: left;">The build metadata version.</td>
<td style="text-align: left;"></td>
</tr>
<tr class="odd">
<td><code>className</code></td>
<td></td>
<td>The name of the generated class.</td>
<td><code>GeneratedVersion</code></td>
<td style="text-align: left;"><code>className</code></td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The name of the generated class.</td>
<td style="text-align: left;"><code>GeneratedVersion</code></td>
</tr>
<tr class="even">
<td><code>properties</code></td>
<td></td>
<td>The properties file.</td>
<td></td>
<td style="text-align: left;"><code>properties</code></td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The properties file.</td>
<td style="text-align: left;"></td>
</tr>
<tr class="odd">
<td><code>template</code></td>
<td></td>
<td>The template file.</td>
<td><code>version.vm</code></td>
<td style="text-align: left;"><code>template</code></td>
<td style="text-align: left;"></td>
<td style="text-align: left;">The template file.</td>
<td style="text-align: left;"><code>version.mustache</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>type</code></td>
<td style="text-align: left;"></td>
<td style="text-align: left;">Either <code>java</code> or <code>kt</code> for Kotlin.</td>
<td style="text-align: left;"><code>java</code></td>
</tr>
</tbody>
</table>
@ -221,8 +316,8 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
majorKey = <span class="st">&quot;example.major&quot;</span>,
minorKey = <span class="st">&quot;example.minor&quot;</span>,
patchKey = <span class="st">&quot;example.patch&quot;</span>,
prereleaseKey = <span class="st">&quot;example.prerelease&quot;</span>,
buildmetaKey = <span class="st">&quot;example.buildmeta&quot;</span>,
preReleaseKey = <span class="st">&quot;example.prerelease&quot;</span>,
buildMetaKey = <span class="st">&quot;example.buildmeta&quot;</span>,
projectKey = <span class="st">&quot;example.project&quot;</span>
)
<span class="kw">public</span> <span class="kw">class</span> Example {
@ -233,39 +328,39 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
<span class="dt">example.minor</span><span class="ot">=</span><span class="dv">0</span>
<span class="dt">example.patch</span><span class="ot">=</span><span class="dv">0</span>
<span class="co"># ...</span></code></pre></div>
<h2 id="usage-with-maven-grail-and-kobalt">Usage with Maven, Grail and Kobalt</h2>
<h2 id="usage-with-maven-grail-kobalt-and-kotlin">Usage with Maven, Grail, Kobalt and Kotlin</h2>
<h3 id="maven">Maven</h3>
<p>To install and run from <a href="http://maven.apache.org/">Maven</a>, configure an artifact as follows:</p>
<div class="sourceCode"><pre class="sourceCode xml"><code class="sourceCode xml"><span class="kw">&lt;dependency&gt;</span>
<span class="kw">&lt;groupId&gt;</span>net.thauvin.erik<span class="kw">&lt;/groupId&gt;</span>
<span class="kw">&lt;artifactId&gt;</span>semver<span class="kw">&lt;/artifactId&gt;</span>
<span class="kw">&lt;version&gt;</span>0.9.6-beta<span class="kw">&lt;/version&gt;</span>
<span class="kw">&lt;version&gt;</span>1.0<span class="kw">&lt;/version&gt;</span>
<span class="kw">&lt;/dependency&gt;</span></code></pre></div>
<h3 id="gradle">Gradle</h3>
<h4 id="class-generation">Class Generation</h4>
<p>To install and run from <a href="https://gradle.org/">Gradle</a>, add the following to the <code>build.gradle</code> file:</p>
<pre class="gradle"><code>dependencies {
compile &#39;net.thauvin.erik:semver:0.9.6-beta&#39;
compileOnly &#39;net.thauvin.erik:semver:1.0&#39;
}</code></pre>
<p>The <code>GeneratedVersion</code> class will be automatically created in the <code>build</code> directory upon compiling.</p>
<p>The <code>GeneratedVersion</code> class will be automatically created in the <code>build/generated</code> directory upon compiling.</p>
<h4 id="class-source-generation">Class &amp; Source Generation</h4>
<p>In order to also incorporate the generated source code into the <code>source tree</code>, use the <a href="https://github.com/ewerk/gradle-plugins/tree/master/annotation-processor-plugin">EWERK Annotation Processor Plugin</a>. Start by addding the following to the very top of the <code>build.gradle</code> file:</p>
<p>In order to also incorporate the generated source code into the <code>source tree</code>, use the <a href="https://github.com/ewerk/gradle-plugins/tree/master/annotation-processor-plugin">EWERK Annotation Processor Plugin</a>. Start by adding the following to the very top of the <code>build.gradle</code> file:</p>
<pre class="gradle"><code>plugins {
id &quot;com.ewerk.gradle.plugins.annotation-processor&quot; version &quot;1.0.3&quot;
}</code></pre>
<p>Then add the following to the <code>build.gradle</code> file:</p>
<pre class="gradle"><code>dependencies {
compileOnly &#39;net.thauvin.erik:semver:0.9.6-beta&#39;
compileOnly &#39;net.thauvin.erik:semver:1.0&#39;
}
annotationProcessor {
library &#39;net.thauvin.erik:semver:0.9.6-beta&#39;
library &#39;net.thauvin.erik:semver:1.0&#39;
processor &#39;net.thauvin.erik.semver.VersionProcessor&#39;
// sourcesDir &#39;src/generated/java&#39;
}
compileJava {
// Disable the classpath procesor
// Disable the classpath processor
options.compilerArgs &lt;&lt; &#39;-proc:none&#39;
}</code></pre>
<p>The plugin implements a separate compile task that only runs the annotation processor and is executed during the build phase.</p>
@ -273,10 +368,20 @@ compileJava {
<h3 id="kobalt">Kobalt</h3>
<p>To install and run from <a href="http://beust.com/kobalt/">Kobalt</a>, add the following to the <code>Build.kt</code> file:</p>
<pre class="gradle"><code>dependencies {
apt(&quot;net.thauvin.erik:semver:0.9.6-beta&quot;)
compile(&quot;net.thauvin.erik:semver:0.9.6-beta&quot;)
apt(&quot;net.thauvin.erik:semver:1.0&quot;)
compileOnly(&quot;net.thauvin.erik:semver:1.0&quot;)
}</code></pre>
<p>Please look at the <a href="https://github.com/ethauvin/semver/blob/master/example/kobalt/src/Build.kt">Build.kt</a> file in the <a href="https://github.com/ethauvin/semver/tree/master/example">example</a> module directory for a sample.</p>
<h3 id="kotlin">Kotlin</h3>
<p>The annotation processor also supports <a href="https://kotlinlang.org/">Kotlin</a>.</p>
<p>To generate a Kotlin version file, simply specify the <code>type</code> as follows:</p>
<div class="sourceCode"><pre class="sourceCode kotlin"><code class="sourceCode kotlin"><span class="kw">import</span> net.<span class="fu">thauvin</span>.<span class="fu">erik</span>.<span class="fu">semver</span>.<span class="fu">Version</span>
@<span class="fu">Version</span>(properties = <span class="st">&quot;version.properties&quot;</span>, type=<span class="st">&quot;kt&quot;</span>)
<span class="kw">open</span> <span class="kw">class</span> Main {
<span class="co">// ...</span></code></pre></div>
<p>The <a href="https://github.com/ethauvin/semver/blob/master/src/main/resources/semver-kt.mustache">Kotlin default template</a> implements the same static fields and functions as the <a href="#default-template">Java template</a>.</p>
<p>Please look at the <a href="https://github.com/ethauvin/semver-example-kotlin">Example for Kotlin</a> project for samples on using <a href="https://gradle.org/">Gradle</a> and <a href="http://beust.com/kobalt/">Kobalt</a>.</p>
<h3 id="auto-increment">Auto-Increment</h3>
<p>Incrementing the version is best left to your favorite build system.</p>
<p>For a solution using <a href="https://gradle.org/">Gradle</a>, please have a look at the <a href="https://github.com/ethauvin/semver/blob/master/example/build.gradle">build.gradle</a> file in the <a href="https://github.com/ethauvin/semver/tree/master/example">example</a> module directory. To run the example with patch version auto-incrementing, issue the following command:</p>

145
README.md
View file

@ -2,7 +2,7 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![Dependency Status](https://www.versioneye.com/user/projects/56a680101b78fd00390001d2/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56a680101b78fd00390001d2) [![Build Status](https://travis-ci.org/ethauvin/semver.svg?branch=master)](https://travis-ci.org/ethauvin/semver) [![Build status](https://ci.appveyor.com/api/projects/status/nbv4mxd1gpxtx69o?svg=true)](https://ci.appveyor.com/project/ethauvin/semver) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/semver) [ ![Download](https://api.bintray.com/packages/ethauvin/maven/SemVer/images/download.svg) ](https://bintray.com/ethauvin/maven/SemVer/_latestVersion)
An [annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) that automatically generates a `GeneratedVersion` class containing the [semantic version](http://semver.org/) (major, minor, patch, etc.) that is read from a `Properties` file or defined in the [annotation](https://docs.oracle.com/javase/tutorial/java/annotations/basics.html).
An [annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) that automatically generates a `GeneratedVersion` class based on a [Mustache](https://mustache.github.io/) template and containing the [semantic version](http://semver.org/) (major, minor, patch, etc.) that is read from a `Properties` file or defined in the [annotation](https://docs.oracle.com/javase/tutorial/java/annotations/basics.html).
This processor was inspired by Cédric Beust's [version-processor](https://github.com/cbeust/version-processor).
@ -11,7 +11,9 @@ This processor was inspired by Cédric Beust's [version-processor](https://githu
* Using annotation elements:
```java
@Version(major = 1, minor = 0, patch = 0, prerelease = "beta")
import net.thauvin.erik.semver.Version;
@Version(major = 1, minor = 0, patch = 0, preRelease = "beta")
public class A {
// ...
```
@ -19,6 +21,8 @@ public class A {
* Or using a [properties](https://docs.oracle.com/javase/tutorial/essential/environment/properties.html) file:
```java
import net.thauvin.erik.semver.Version;
@Version(properties = "version.properties")
public class A {
// ...
@ -34,68 +38,92 @@ version.prerelease=beta
## Template
Upon running the annotator processor, a source file [`GeneratedVersion.java`](https://github.com/ethauvin/semver/blob/master/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java) is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable [Velocity](http://velocity.apache.org/) template.
Upon running the annotation processor, a source file [`GeneratedVersion.java`](https://github.com/ethauvin/semver/blob/master/example/src/generated/java/net/thauvin/erik/semver/example/GeneratedVersion.java) is automatically generated with static methods to access the semantic version data. The source is based on a fully customizable [Mustache](https://mustache.github.io/) template.
To use your own template, simply create a `version.mustache` file. The processor will automatically look for it.
To specify your own template name, use:
```java
@Version(template = "myversion.vm")
@Version(template = "myversion.mustache")
public class A {
// ...
```
### Default Template
The [default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/version.vm) implements the following static methods:
The [default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver.mustache) implements the following static fields:
Method | Description | Example
------------------|----------------------------------|------------------
`getProject` | The project name, if any. | `MyProject`
`getBuildDate` | The build date. | [`java.util.Date`](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html)
`getVersion` | The full version string. | `1.0.0-alpha+001`
`getMajor` | The major version. | `1`
`getMinor` | The minor version. | `0`
`getPatch` | The patch version. | `0`
`getPreRelease` | The pre-release version, if any. | `alpha`
`getBuildMetadata`| The build metadata, if any. | `001`
Field | Description | Example
:--------------|:---------------------------------|:-----------------
`project` | The project name, if any. | `MyProject`
`buildDate` | The build date. | [`java.util.Date`](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html)
`version` | The full version string. | `1.0.0-alpha+001`
`major` | The major version. | `1`
`minor` | The minor version. | `0`
`patch` | The patch version. | `0`
`preRelease` | The pre-release version, if any. | `alpha`
`buildMeta` | The build metadata, if any. | `001`
And the following methods/functions:
Method | Description | Example
:------------------------|:----------------------------------------------------------|:--------
`preReleaseWithPrefix()` | Returns the pre-release with a prefix, `-` by default. | `-alpha`
`buildMetaWithPrefix()` | Returns the build metadata with a prefix, `+` by default. | `+001`
### Custom Template
A very simple custom template might look something like:
```java
/* myversion.vm */
package ${packageName}
/* version.mustache */
package {{packageName}}
import java.util.Date;
public final class ${className} {
public final static String BUILDMETA = "${buildmeta}";
public final static Date DATE = new Date(${epoch}L);
public final static int MAJOR = ${major};
public final static int MINOR = ${minor};
public final static int PATCH = ${patch};
public final static String PRERELEASE = "${prerelease}";
public final static String PROJECT = "${project}";
public final class {{className}} {
public final static String PROJECT = "{{project}}";
public final static Date DATE = new Date({{epoch}}L);
public final static int MAJOR = {{major}};
public final static int MINOR = {{minor}};
public final static int PATCH = {{patch}};
public final static String PRERELEASE = "{{preRelease}}";
public final static String BUILDMETA = "{{buildMeta}}";
}
```
The Velocity variables are automatically filled in by the processor.
The mustache variables automatically filled in by the processor are:
Please also look at this [example](https://github.com/ethauvin/mobibot/blob/master/version.vm) using [`java.time`](https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html)
Variable | Description | Type
:-----------------|:----------------------------|:--------
`{{packageName}}` | The package name. | `String`
`{{className}}` | The class name. | `String`
`{{project}}` | The project name. | `String`
`{{epoch}}` | The build epoch/unix time. | `long`
`{{major}}` | The major version. | `int`
`{{minor}}` | The minor version. | `int`
`{{patch}}` | The patch version. | `int`
`{{preRelease}}` | The pre/release version. | `String`
`{{buildMeta}}` | The build metadata version. | `String`
Please also look at this [example](https://github.com/ethauvin/mobibot/blob/master/version.mustache) using [`java.time`](https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html)
## Elements & Properties
The following annotation elements and properties are available:
Element | Property | Description | Default
-------------|----------------------|----------------------------------|-------------
`project` | `version.project` | The project name. |
`major` | `version.major` | The major version number. | `1`
`minor` | `version.major` | The minor version number. | `0`
`patch` | `version.patch` | The patch version number. | `0`
`prerelease` | `version.prerelease` | The pre-release version. |
`buildmeta` | `version.buildmeta` | The build metadata version. |
`className` | | The name of the generated class. | `GeneratedVersion`
`properties` | | The properties file. |
`template` | | The template file. | `version.vm`
Element | Property | Description | Default
:------------|:---------------------|:----------------------------------|:----------------
`project` | `version.project` | The project name. |
`major` | `version.major` | The major version number. | `1`
`minor` | `version.major` | The minor version number. | `0`
`patch` | `version.patch` | The patch version number. | `0`
`preRelease` | `version.prerelease` | The pre-release version. |
`buildMeta` | `version.buildmeta` | The build metadata version. |
`className` | | The name of the generated class. | `GeneratedVersion`
`properties` | | The properties file. |
`template` | | The template file. | `version.mustache`
`type` | | Either `java` or `kt` for Kotlin. | `java`
In order to easily incorporate with existing projects, the property keys may be assigned custom values:
@ -105,8 +133,8 @@ In order to easily incorporate with existing projects, the property keys may be
majorKey = "example.major",
minorKey = "example.minor",
patchKey = "example.patch",
prereleaseKey = "example.prerelease",
buildmetaKey = "example.buildmeta",
preReleaseKey = "example.prerelease",
buildMetaKey = "example.buildmeta",
projectKey = "example.project"
)
public class Example {
@ -121,7 +149,7 @@ example.minor=0
example.patch=0
# ...
```
## Usage with Maven, Grail and Kobalt
## Usage with Maven, Grail, Kobalt and Kotlin
### Maven
@ -131,7 +159,7 @@ To install and run from [Maven](http://maven.apache.org/), configure an artifact
<dependency>
<groupId>net.thauvin.erik</groupId>
<artifactId>semver</artifactId>
<version>0.9.6-beta</version>
<version>1.0</version>
</dependency>
```
@ -143,15 +171,15 @@ To install and run from [Gradle](https://gradle.org/), add the following to the
```gradle
dependencies {
compile 'net.thauvin.erik:semver:0.9.6-beta'
compileOnly 'net.thauvin.erik:semver:1.0'
}
```
The `GeneratedVersion` class will be automatically created in the `build` directory upon compiling.
The `GeneratedVersion` class will be automatically created in the `build/generated` directory upon compiling.
#### Class & Source Generation
In order to also incorporate the generated source code into the `source tree`, use the [EWERK Annotation Processor Plugin](https://github.com/ewerk/gradle-plugins/tree/master/annotation-processor-plugin). Start by addding the following to the very top of the `build.gradle` file:
In order to also incorporate the generated source code into the `source tree`, use the [EWERK Annotation Processor Plugin](https://github.com/ewerk/gradle-plugins/tree/master/annotation-processor-plugin). Start by adding the following to the very top of the `build.gradle` file:
```gradle
plugins {
@ -163,17 +191,17 @@ Then add the following to the `build.gradle` file:
```gradle
dependencies {
compileOnly 'net.thauvin.erik:semver:0.9.6-beta'
compileOnly 'net.thauvin.erik:semver:1.0'
}
annotationProcessor {
library 'net.thauvin.erik:semver:0.9.6-beta'
library 'net.thauvin.erik:semver:1.0'
processor 'net.thauvin.erik.semver.VersionProcessor'
// sourcesDir 'src/generated/java'
}
compileJava {
// Disable the classpath procesor
// Disable the classpath processor
options.compilerArgs << '-proc:none'
}
```
@ -188,13 +216,30 @@ To install and run from [Kobalt](http://beust.com/kobalt/), add the following to
```gradle
dependencies {
apt("net.thauvin.erik:semver:0.9.6-beta")
compile("net.thauvin.erik:semver:0.9.6-beta")
apt("net.thauvin.erik:semver:1.0")
compileOnly("net.thauvin.erik:semver:1.0")
}
```
Please look at the [Build.kt](https://github.com/ethauvin/semver/blob/master/example/kobalt/src/Build.kt) file in the [example](https://github.com/ethauvin/semver/tree/master/example) module directory for a sample.
### Kotlin
The annotation processor also supports [Kotlin](https://kotlinlang.org/).
To generate a Kotlin version file, simply specify the `type` as follows:
```kotlin
import net.thauvin.erik.semver.Version
@Version(properties = "version.properties", type="kt")
open class Main {
// ...
```
The [Kotlin default template](https://github.com/ethauvin/semver/blob/master/src/main/resources/semver-kt.mustache) implements the same static fields and functions as the [Java template](#default-template).
Please look at the [Example for Kotlin](https://github.com/ethauvin/semver-example-kotlin) project for samples on using [Gradle](https://gradle.org/) and [Kobalt](http://beust.com/kobalt/).
### Auto-Increment
Incrementing the version is best left to your favorite build system.

45
example/example.iml Normal file
View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="example" external.linked.project.path="$MODULE_DIR$/.." external.root.project.path="$MODULE_DIR$/.." external.system.id="KOBALT" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/../kobaltBuild/classes" />
<output-test url="file://$MODULE_DIR$/../kobaltBuild/test-classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/kobaltBuild" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="semver" />
<orderEntry type="module-library">
<library name="Kobalt: org.apache.velocity:velocity:jar:1.7">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/org/apache/velocity/velocity/1.7/velocity-1.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: commons-collections:commons-collections:jar:3.2.1">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Kobalt: commons-lang:commons-lang:jar:2.4">
<CLASSES>
<root url="jar://$USER_HOME$/.kobalt/cache/commons-lang/commons-lang/2.4/commons-lang-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

View file

@ -1,14 +1,13 @@
import com.beust.kobalt.plugin.application.application
import com.beust.kobalt.plugin.apt.apt
import com.beust.kobalt.plugin.packaging.assemble
import com.beust.kobalt.plugin.packaging.install
import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.project
import java.io.FileInputStream
import java.util.*
fun StringBuilder.prepend(s: String): StringBuilder {
if (this.length > 0) {
if (this.isNotEmpty()) {
this.insert(0, s)
}
return this
@ -40,15 +39,15 @@ val example = project {
dependencies {
apt(processorJar)
compile(processorJar)
compileOnly(processorJar)
}
apt {
outputDir = "/src/generated/java/"
outputDir = "../src/generated/java/"
}
install {
libDir = "deploy"
target = "deploy"
}
assemble {

View file

@ -1 +1 @@
kobalt.version=1.0.26
kobalt.version=1.0.71

View file

@ -1,157 +0,0 @@
/*
* This file is automatically generated.
* Do not modify! -- ALL CHANGES WILL BE ERASED!
*/
package net.thauvin.erik.semver.example;
import java.util.Date;
/**
* Provides semantic version information.
*
* @author <a href="https://github.com/ethauvin/semver">Semantic Version
* Annotation Processor</a>
*/
public final class GeneratedVersion {
private final static String buildmeta = "";
private final static Date date = new Date(1490396459441L);
private final static int major = 3;
private final static int minor = 1;
private final static int patch = 49;
private final static String prerelease = "beta";
private final static String project = "Example";
/**
* Disables the default constructor.
*
* @throws UnsupportedOperationException If the constructor is called.
*/
private GeneratedVersion()
throws UnsupportedOperationException {
throw new UnsupportedOperationException("Illegal constructor call.");
}
/**
* Returns the build date.
*
* @return The build date.
*/
public static Date getBuildDate() {
return date;
}
/**
* Returns the project name.
*
* @return The project name, if any.
*/
public static String getProject() {
return project;
}
/**
* Returns the full version string.
* <p>
* Formatted as:
* <blockquote>
* <code>MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA]</code>
* </blockquote>
* <p>
* For example:
* <ul>
* <li><code>1.0.0</code></li>
* <li><code>1.0.0-beta</code></li>
* <li><code>1.0.0+20160124144700</code></li>
* <li><code>1.0.0-alpha+001</code></li>
* </ul>
*
* @return The version string.
*/
public static String getVersion() {
return Integer.toString(getMajor()) + '.'
+ Integer.toString(getMinor()) + '.'
+ Integer.toString(getPatch())
+ getPreRelease(true) + getBuildMetadata(true);
}
/**
* Returns the major version.
*
* @return The major version.
*/
public static int getMajor() {
return major;
}
/**
* Returns the minor version.
*
* @return The minor version.
*/
public static int getMinor() {
return minor;
}
/**
* Returns the patch version.
*
* @return The patch version.
*/
public static int getPatch() {
return patch;
}
/**
* Returns the pre-release version.
*
* @param isHyphen Prepend a hyphen, if <code>true</code>.
* @return The pre-release version, if any.
*/
public static String getPreRelease(final boolean isHyphen) {
if (prerelease.length() > 0) {
if (isHyphen) {
return '-' + prerelease;
} else {
return prerelease;
}
}
return "";
}
/**
* Returns the pre-release version.
*
* @return The pre-release version, if any.
*/
public static String getPreRelease() {
return getPreRelease(false);
}
/**
* Returns the build metadata.
*
* @param isPlus Prepend a plus sign, if <code>true</code>.
* @return The build metadata, if any.
*/
public static String getBuildMetadata(final boolean isPlus) {
if (buildmeta.length() > 0) {
if (isPlus) {
return '+' + buildmeta;
} else {
return buildmeta;
}
}
return "";
}
/**
* Returns the build metadata.
*
* @return The build metadata, if any.
*/
public static String getBuildMetadata() {
return getBuildMetadata(false);
}
}

View file

@ -1,7 +1,7 @@
#Mon, 18 Jul 2016 17:33:54 -0700
version.prerelease=beta
version.project=Example
version.minor=1
version.buildmeta=
version.patch=49
version.major=3
version.major=2
version.minor=17
version.patch=52
version.prerelease=beta
version.buildmeta=007

View file

@ -1,23 +1,20 @@
import com.beust.kobalt.file
import com.beust.kobalt.localMaven
import com.beust.kobalt.plugin.application.application
import com.beust.kobalt.plugin.apt.apt
import com.beust.kobalt.plugin.java.javaCompiler
import com.beust.kobalt.plugin.packaging.assemble
import com.beust.kobalt.plugin.packaging.install
import com.beust.kobalt.plugins
import com.beust.kobalt.project
import com.beust.kobalt.repos
import java.io.FileInputStream
import java.util.*
import com.beust.kobalt.*
import com.beust.kobalt.plugin.application.*
import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.publish.*
import net.thauvin.erik.kobalt.plugin.exec.*
import org.apache.maven.model.*
import java.io.*
import java.util.*
val bs = buildScript {
plugins("net.thauvin.erik:kobalt-maven-local:")
plugins("net.thauvin.erik:kobalt-exec:")
repos(localMaven())
}
fun StringBuilder.prepend(s: String): StringBuilder {
if (this.length > 0) {
if (this.isNotEmpty()) {
this.insert(0, s)
}
return this
@ -45,8 +42,27 @@ val semver = project {
artifactId = name
version = versionFor()
pom = Model().apply {
description = "Semantic Version Annotation Processor"
url = "https://github.com/ethauvin/semver"
licenses = listOf(License().apply {
name = "BSD 3-Clause"
url = "https://opensource.org/licenses/BSD-3-Clause"
})
scm = Scm().apply {
url = "https://github.com/ethauvin/semver"
connection = "https://github.com/ethauvin/semver.git"
developerConnection = "git@github.com:ethauvin/semver.git"
}
developers = listOf(Developer().apply {
id = "ethauvin"
name = "Erik C. Thauvin"
email = "erik@thauvin.net"
})
}
dependencies {
compile("org.apache.velocity:velocity:1.7")
compile("com.github.spullara.mustache.java:compiler:0.9.4")
}
dependenciesTest {
@ -54,17 +70,29 @@ val semver = project {
}
install {
libDir = "deploy"
target = "deploy"
}
assemble {
jar {}
jar {
fatJar = true
}
mavenJars {}
}
application {
mainClass = "com.example.Main"
autoGitTag {
enabled = true
message = "Version $version"
}
bintray {
publish = true
description = "Release version $version"
vcsTag = version
sign = true
}
exec {
val args = listOf("--from", "markdown_github", "--to", "html5", "-s", "-c", "github-pandoc.css", "-o", "README.html", "README.md")
commandLine(listOf("pandoc") + args, os = setOf(Os.LINUX))
@ -72,7 +100,7 @@ val semver = project {
}
}
val example = project(semver){
val example = project(semver) {
name = "example"
directory = "example"
@ -80,26 +108,6 @@ val example = project(semver){
val mainClassName = "net.thauvin.erik.semver.example.Example"
sourceDirectories {
path("src/main/java")
}
sourceDirectoriesTest {
path("src/test/java")
}
dependencies {
compile("org.apache.velocity:velocity:1.7")
}
dependenciesTest {
}
install {
libDir = "example/deploy"
}
assemble {
jar {
manifest {

View file

@ -1 +1 @@
kobalt.version=1.0.26
kobalt.version=1.0.71

13
semver.iml Normal file
View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="semver" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.9.7" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/kobaltBuild" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -1,425 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ClientPropertiesManager">
<properties class="javax.swing.AbstractButton">
<property name="hideActionText" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JComponent">
<property name="html.disable" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JEditorPane">
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
<property name="charset" class="java.lang.String" />
</properties>
<properties class="javax.swing.JList">
<property name="List.isFileList" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JPasswordField">
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JSlider">
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
<property name="JSlider.isFilled" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTable">
<property name="Table.isFileList" class="java.lang.Boolean" />
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JToolBar">
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTree">
<property name="JTree.lineStyle" class="java.lang.String" />
</properties>
<properties class="javax.swing.text.JTextComponent">
<property name="caretAspectRatio" class="java.lang.Double" />
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
<component name="CopyrightManager" default="">
<copyright>
<option name="myName" value="Erik's Copyright Notice" />
<option name="notice" value="&amp;#36;file.fileName&#10;&#10;Copyright (c) &amp;#36;today.year, Erik C. Thauvin (erik@thauvin.net)&#10;All rights reserved.&#10;&#10;Redistribution and use in source and binary forms, with or without&#10;modification, are permitted provided that the following conditions are met:&#10;&#10; Redistributions of source code must retain the above copyright notice, this&#10; list of conditions and the following disclaimer.&#10;&#10; Redistributions in binary form must reproduce the above copyright notice,&#10; this list of conditions and the following disclaimer in the documentation&#10; and/or other materials provided with the distribution.&#10;&#10; Neither the name of this project nor the names of its contributors may be&#10; used to endorse or promote products derived from this software without&#10; specific prior written permission.&#10;&#10;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;&#10;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&#10;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&#10;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE&#10;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&#10;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR&#10;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER&#10;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,&#10;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&#10;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
</copyright>
<module2copyright>
<element module="Source" copyright="Erik's Copyright Notice" />
</module2copyright>
<LanguageOptions name="__TEMPLATE__">
<option name="addBlankAfter" value="false" />
</LanguageOptions>
</component>
<component name="DependencyValidationManager">
<scope name="Source" pattern="file[example]:src/main/java//*.java||file[semver]:src/main/java//*.java" />
</component>
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="GradleLocalSettings">
<option name="modificationStamps">
<map>
<entry key="K:/GitHub/CompileOnlyPlugin" value="2933943731758" />
<entry key="K:/ect/groovy/SshotCleaner" value="2892856534549" />
<entry key="K:/ect/java/Captcha" value="2894636758390" />
<entry key="K:/ect/java/FileSplitter" value="2846829504112" />
<entry key="K:/ect/java/GZIPFilter" value="2894567636586" />
<entry key="K:/ect/java/Lotto" value="2894619520256" />
<entry key="K:/ect/java/SshotCleaner" value="1446415498070" />
<entry key="K:/ect/java/TorrentCleaner" value="2894593616839" />
<entry key="K:/ect/java/click" value="2894595659515" />
<entry key="K:/ect/java/iFit2Workout" value="2894645931218" />
<entry key="K:/imacination/jtalk" value="2865986493991" />
<entry key="$PROJECT_DIR$/../DataProviderTest" value="2935655621669" />
<entry key="$PROJECT_DIR$/../HttpStatus" value="2906561643260" />
<entry key="$PROJECT_DIR$/../SemanticVersion" value="2905451385982" />
<entry key="$PROJECT_DIR$/../mobibot" value="2865248599040" />
<entry key="$PROJECT_DIR$" value="2921872379706" />
</map>
</option>
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="C:/gradle" />
<option name="gradleJvm" value="#JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useAutoImport" value="true" />
</GradleProjectSettings>
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$/example" />
<option name="gradleHome" value="C:/gradle" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$/example" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useAutoImport" value="true" />
</GradleProjectSettings>
</option>
</component>
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<option name="myLocal" value="true" />
<inspection_tool class="FieldMayBeFinal" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
<option name="TOP_LEVEL_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="INNER_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="METHOD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
</value>
</option>
<option name="FIELD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="IGNORE_DEPRECATED" value="false" />
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
<option name="myAdditionalJavadocTags" value="created" />
</inspection_tool>
<inspection_tool class="LocalCanBeFinal" enabled="true" level="WARNING" enabled_by_default="true">
<option name="REPORT_VARIABLES" value="true" />
<option name="REPORT_PARAMETERS" value="false" />
<option name="REPORT_CATCH_PARAMETERS" value="false" />
</inspection_tool>
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
<inspection_tool class="UnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="WeakerAccess" enabled="true" level="WARNING" enabled_by_default="true">
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="false" />
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
</inspection_tool>
</profile>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="mavenHome" value="Bundled (Maven 3)" />
</MavenGeneralSettings>
</option>
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>Android Lint</id>
</State>
<State>
<id>Java</id>
</State>
<State>
<id>Portability issuesJava</id>
</State>
</expanded-state>
</profile-state>
</entry>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/example.iml" filepath="$PROJECT_DIR$/.idea/modules/example.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/semver.iml" filepath="$PROJECT_DIR$/.idea/modules/semver.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8.x" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="PropertiesComponent">
<property name="GoToClass.includeLibraries" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="MemberChooser.copyJavadoc" value="false" />
<property name="settings.editor.selected.configurable" value="Errors" />
<property name="settings.editor.splitter.proportion" value="0.2" />
</component>
<component name="RunManager">
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
<option name="PROGRAM_PARAMETERS" />
<method />
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<module />
<method />
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method />
</configuration>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
<component name="libraryTable">
<library name="Gradle: com.beust:jcommander:1.48">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.48/bfcb96281ea3b59d626704f74bc6d625ff51cbce/jcommander-1.48.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.48/6deefcf90f144dfca29d4950c665a592ba029d42/jcommander-1.48-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: commons-collections:commons-collections:3.2.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2.1/761ea405b9b37ced573d2df0d1e3a4e0f9edc668/commons-collections-3.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2.1/fa095ef874374e5b2a11f8b06c26a5d68c7cb3a4/commons-collections-3.2.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: commons-lang:commons-lang:2.4">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.4/16313e02a793435009f1e458fa4af5d879f6fb11/commons-lang-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.4/2b8c4b3035e45520ef42033e823c7d33e4b4402c/commons-lang-2.4-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: org.apache.ant:ant-launcher:1.7.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-launcher/1.7.0/e7e30789211e074aa70ef3eaea59bd5b22a7fa7a/ant-launcher-1.7.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
<library name="Gradle: org.apache.ant:ant:1.7.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant/1.7.0/9746af1a485e50cf18dcb232489032a847067066/ant-1.7.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant/1.7.0/58ec0e378f1d33cb72a92ee3a9442909789090db/ant-1.7.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: org.apache.velocity:velocity:1.7">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/2ceb567b8f3f21118ecdec129fe1271dbc09aa7a/velocity-1.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/eb11eb70171ed64842b2e5216d5904e21ed162ac/velocity-1.7-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: org.beanshell:bsh:2.0b4">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.beanshell/bsh/2.0b4/a05f0a0feefa8d8467ac80e16e7de071489f0d9c/bsh-2.0b4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
<library name="Gradle: org.testng:testng:6.9.12">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.testng/testng/6.9.12/354eba9b34737190bad0a72dd5671683cfbae24d/testng-6.9.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.testng/testng/6.9.12/b8aff7a935f6bc0332cb5dc5fff57a16a7964db6/testng-6.9.12-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8.x</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.19944212" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View file

@ -1,4 +1,5 @@
#Thu, 06 Oct 2016 11:49:46 -0700
version.project=semver
version.major=0
version.minor=9
version.patch=7