Clean up build.gradle.kts w/ jfmods scripts
This commit is contained in:
parent
ab81759d4d
commit
ef986fab05
|
@ -1,4 +1,4 @@
|
|||
import org.gradle.internal.os.OperatingSystem
|
||||
import io.gitlab.jfronny.scripts.*
|
||||
|
||||
plugins {
|
||||
id("org.ajoberstar.grgit") version "5.0.0" apply false
|
||||
|
@ -14,17 +14,9 @@ val lwjglVersion by extra("3.3.1")
|
|||
val imguiVersion by extra("1.86.4")
|
||||
val jfCommonsVersion by extra("2022.9.18+16-50-22")
|
||||
val jlhttpVersion by extra("2.6")
|
||||
val flavorProp: String by extra(if (project.hasProperty("flavor")) "${project.property("flavor")}" else "custom")
|
||||
if (flavorProp != "custom" && flavorProp != "maven" && flavorProp != "fat" && flavorProp != "windows" && flavorProp != "linux" && flavorProp != "macos")
|
||||
throw IllegalStateException("Unsupported flavor: $flavorProp")
|
||||
val flavor: String by extra(
|
||||
if (flavorProp != "custom") flavorProp else when (OperatingSystem.current()) {
|
||||
OperatingSystem.WINDOWS -> "windows"
|
||||
OperatingSystem.LINUX -> "linux"
|
||||
OperatingSystem.MAC_OS -> "macos"
|
||||
else -> throw IllegalStateException("Unsupported OS: ${OperatingSystem.current()}")
|
||||
}
|
||||
)
|
||||
val flavorProp: String by extra(prop("flavor", "custom"))
|
||||
if (!setOf("custom", "maven", "fat", "windows", "linux", "macos").contains(flavorProp)) throw IllegalStateException("Unsupported flavor: $flavorProp")
|
||||
val flavor: String by extra(if (flavorProp != "custom") flavorProp else OS.TYPE.codename)
|
||||
val isPublic by extra(project.hasProperty("public"))
|
||||
val isRelease by extra(project.hasProperty("release"))
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ pluginManagement {
|
|||
gradlePluginPortal()
|
||||
}
|
||||
plugins {
|
||||
id("jf.codegen") version "1.0-SNAPSHOT"
|
||||
id("jf.autoversion") version "1.0-SNAPSHOT"
|
||||
id("jf.codegen") version "1.1-SNAPSHOT"
|
||||
id("jf.autoversion") version "1.1-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue