Fix templates indentation
This commit is contained in:
parent
4961829fcd
commit
3a767ddcb2
3 changed files with 81 additions and 81 deletions
|
@ -1,38 +1,38 @@
|
|||
/*
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
* 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>
|
||||
*/
|
||||
* 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 PRERELEASE_PREFIX = "{{preReleasePrefix}}"
|
||||
@JvmField
|
||||
val BUILDMETA = "{{buildMeta}}"
|
||||
@JvmField
|
||||
val BUILDMEATA_PREFIX = "{{buildMetaPrefix}}"
|
||||
@JvmField
|
||||
val SEPARATOR = "{{separator}}"
|
||||
@JvmField
|
||||
val VERSION = "{{version}}"
|
||||
@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 PRERELEASE_PREFIX = "{{preReleasePrefix}}"
|
||||
@JvmField
|
||||
val BUILDMETA = "{{buildMeta}}"
|
||||
@JvmField
|
||||
val BUILDMEATA_PREFIX = "{{buildMetaPrefix}}"
|
||||
@JvmField
|
||||
val SEPARATOR = "{{separator}}"
|
||||
@JvmField
|
||||
val VERSION = "{{version}}"
|
||||
}
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
/*
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
* 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>
|
||||
*/
|
||||
* Provides semantic version information.
|
||||
*
|
||||
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
||||
*/
|
||||
public final class {{className}} {
|
||||
public static final String PROJECT = "{{project}}";
|
||||
public static final Date BUILDDATE = new Date({{epoch}}L);
|
||||
public static final int MAJOR = {{major}};
|
||||
public static final int MINOR = {{minor}};
|
||||
public static final int PATCH = {{patch}};
|
||||
public static final String PRERELEASE = "{{preRelease}}";
|
||||
public static final String PRERELEASE_PREFIX = "{{preReleasePrefix}}";
|
||||
public static final String BUILDMETA = "{{buildMeta}}";
|
||||
public static final String BUILDMETA_PREFIX = "{{buildMetaPrefix}}";
|
||||
public static final String SEPARATOR = "{{separator}}";
|
||||
public static final String VERSION = "{{version}}";
|
||||
public static final String PROJECT = "{{project}}";
|
||||
public static final Date BUILDDATE = new Date({{epoch}}L);
|
||||
public static final int MAJOR = {{major}};
|
||||
public static final int MINOR = {{minor}};
|
||||
public static final int PATCH = {{patch}};
|
||||
public static final String PRERELEASE = "{{preRelease}}";
|
||||
public static final String PRERELEASE_PREFIX = "{{preReleasePrefix}}";
|
||||
public static final String BUILDMETA = "{{buildMeta}}";
|
||||
public static final String BUILDMETA_PREFIX = "{{buildMetaPrefix}}";
|
||||
public static final String SEPARATOR = "{{separator}}";
|
||||
public static final String VERSION = "{{version}}";
|
||||
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*/
|
||||
private {{className}}() {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
}
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*/
|
||||
private {{className}}() {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,42 +71,42 @@ class VersionProcessorTest {
|
|||
mustache.execute(writer, version).flush();
|
||||
assertEquals(String.format("""
|
||||
/*
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
* This file is automatically generated.
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
|
||||
package %s;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Provides semantic version information.
|
||||
*
|
||||
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
||||
*/
|
||||
public final class MyTest {
|
||||
public static final String PROJECT = "%s";
|
||||
public static final Date BUILDDATE = new Date(L);
|
||||
public static final int MAJOR = %d;
|
||||
public static final int MINOR = %d;
|
||||
public static final int PATCH = %d;
|
||||
public static final String PRERELEASE = "%s";
|
||||
public static final String PRERELEASE_PREFIX = "%s";
|
||||
public static final String BUILDMETA = "%s";
|
||||
public static final String BUILDMETA_PREFIX = "%s";
|
||||
public static final String SEPARATOR = "%s";
|
||||
public static final String VERSION = "";
|
||||
* Provides semantic version information.
|
||||
*
|
||||
* @author <a href="https://github.com/ethauvin/semver">Semantic Version Annotation Processor</a>
|
||||
*/
|
||||
public final class %s {
|
||||
public static final String PROJECT = "%s";
|
||||
public static final Date BUILDDATE = new Date(L);
|
||||
public static final int MAJOR = %d;
|
||||
public static final int MINOR = %d;
|
||||
public static final int PATCH = %d;
|
||||
public static final String PRERELEASE = "%s";
|
||||
public static final String PRERELEASE_PREFIX = "%s";
|
||||
public static final String BUILDMETA = "%s";
|
||||
public static final String BUILDMETA_PREFIX = "%s";
|
||||
public static final String SEPARATOR = "%s";
|
||||
public static final String VERSION = "";
|
||||
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*/
|
||||
private MyTest() {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
/**
|
||||
* Disables the default constructor.
|
||||
*/
|
||||
private %s() {
|
||||
throw new UnsupportedOperationException("Illegal constructor call.");
|
||||
}
|
||||
}
|
||||
}
|
||||
""", version.packageName(), version.project(), version.major(), version.minor(), version.patch(),
|
||||
version.preRelease(), version.preReleasePrefix(), version.buildMeta(),
|
||||
version.buildMetaPrefix(), version.separator()),
|
||||
""", version.packageName(), version.className(), version.project(), version.major(),
|
||||
version.minor(), version.patch(), version.preRelease(), version.preReleasePrefix(),
|
||||
version.buildMeta(), version.buildMetaPrefix(), version.separator(), version.className()),
|
||||
writer.toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue