fix(lom): adjust to new SemanticVersion signature
This commit is contained in:
parent
0e40cc68fe
commit
2c801ceceb
@ -7,6 +7,9 @@ package io.gitlab.jfronny.scripts
|
|||||||
* Parsing also supports legacy version strings like v1.2.3, b1.2.3, a1.2.3, rc1.2.3.
|
* Parsing also supports legacy version strings like v1.2.3, b1.2.3, a1.2.3, rc1.2.3.
|
||||||
*/
|
*/
|
||||||
data class SemanticVersion(val major: Int, val minor: Int, val patch: Int, val type: VersionType, val typeSupplement: Int?, val build: String?): Comparable<SemanticVersion> {
|
data class SemanticVersion(val major: Int, val minor: Int, val patch: Int, val type: VersionType, val typeSupplement: Int?, val build: String?): Comparable<SemanticVersion> {
|
||||||
|
constructor(major: Int, minor: Int, patch: Int, versionType: VersionType) : this(major, minor, patch, versionType, null, null)
|
||||||
|
constructor(major: Int, minor: Int, patch: Int) : this(major, minor, patch, VersionType.RELEASE)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
require(build == null || buildPattern.matches(build)) { "Illegal build string" }
|
require(build == null || buildPattern.matches(build)) { "Illegal build string" }
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ afterEvaluate {
|
|||||||
// from fabric-example-mod, enforces modern java
|
// from fabric-example-mod, enforces modern java
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
options.release.set(if (SemanticVersion.parse(args.minecraftVersion.get()) > SemanticVersion(1, 20, 4, VersionType.RELEASE, null)) 21 else 17)
|
options.release.set(if (SemanticVersion.parse(args.minecraftVersion.get()) > SemanticVersion(1, 20, 4, VersionType.RELEASE)) 21 else 17)
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise we can't easily overwrite the artifacts to publish while keeping dependency metadata
|
// otherwise we can't easily overwrite the artifacts to publish while keeping dependency metadata
|
||||||
|
Loading…
Reference in New Issue
Block a user