Push forward
This commit is contained in:
+7
-7
@@ -18,15 +18,15 @@ plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
||||
}
|
||||
|
||||
rootProject.name = "camellia"
|
||||
rootProject.name = "shiroha"
|
||||
|
||||
for (name in listOf("camellia-api", "camellia-server")) {
|
||||
for (name in listOf("shiroha-api", "shiroha-server")) {
|
||||
include(name)
|
||||
file(name).mkdirs()
|
||||
}
|
||||
|
||||
optionalInclude("test-plugin")
|
||||
optionalInclude("camellia-generator")
|
||||
optionalInclude("shiroha-generator")
|
||||
|
||||
fun optionalInclude(name: String, op: (ProjectDescriptor.() -> Unit)? = null) {
|
||||
val settingsFile = file("$name.settings.gradle.kts")
|
||||
@@ -46,12 +46,12 @@ fun optionalInclude(name: String, op: (ProjectDescriptor.() -> Unit)? = null) {
|
||||
|
||||
gradle.lifecycle.beforeProject {
|
||||
val mcVersion = providers.gradleProperty("mcVersion").get().trim()
|
||||
val camelliaVersionChannel = providers.gradleProperty("channel").get().trim()
|
||||
val camelliaBuildNumber = providers.environmentVariable("BUILD_NUMBER").orNull?.trim()?.toInt()
|
||||
val versionString = if (camelliaBuildNumber == null) {
|
||||
val shirohaVersionChannel = providers.gradleProperty("channel").get().trim()
|
||||
val shirohaBuildNumber = providers.environmentVariable("BUILD_NUMBER").orNull?.trim()?.toInt()
|
||||
val versionString = if (shirohaBuildNumber == null) {
|
||||
"$mcVersion.local-SNAPSHOT"
|
||||
} else {
|
||||
"$mcVersion.build.$camelliaBuildNumber-${camelliaVersionChannel.lowercase()}"
|
||||
"$mcVersion.build.$shirohaBuildNumber-${shirohaVersionChannel.lowercase()}"
|
||||
}
|
||||
version = versionString
|
||||
}
|
||||
Reference in New Issue
Block a user