Skip to content

Commit

Permalink
feat: tweak build script
Browse files Browse the repository at this point in the history
  • Loading branch information
xfl03 committed Oct 9, 2023
1 parent f707e15 commit 676309c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
32 changes: 8 additions & 24 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ group = "i18nupdatemod"
version = project.properties["version"].toString() + if ("false" == System.getenv("IS_SNAPSHOT")) "" else "-SNAPSHOT"

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
disableAutoTargetJvm()
}

tasks.compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.shadowJar {
Expand Down Expand Up @@ -52,18 +45,17 @@ configurations.configureEach {
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
implementation("net.runelite.archive-patcher:archive-patcher-applier:1.2")
compileOnly("org.jetbrains:annotations:24.0.0")

implementation("net.fabricmc:fabric-loader:0.14.12")
implementation("cpw.mods:modlauncher:8.1.3")
implementation("net.minecraft:launchwrapper:1.12")

implementation("commons-io:commons-io:2.11.0")
implementation("net.runelite.archive-patcher:archive-patcher-applier:1.2")
implementation("org.apache.logging.log4j:log4j-api:2.19.0")
implementation("commons-codec:commons-codec:1.15")
implementation("org.ow2.asm:asm:9.4")
implementation("org.jetbrains:annotations:24.0.0")
implementation("com.google.code.gson:gson:2.10.1")

}

tasks.test {
Expand All @@ -78,12 +70,7 @@ tasks.processResources {
}
}

val supportMinecraftVersions = listOf(
"1.6.1", "1.6.2", "1.6.4", "1.7.2", "1.7.10", "1.8", "1.8.8", "1.8.9", "1.9", "1.9.4", "1.10", "1.10.2", "1.11",
"1.11.2", "1.12", "1.12.1", "1.12.2", "1.13.2", "1.14", "1.14.1", "1.14.2", "1.14.3", "1.14.4", "1.15", "1.15.1",
"1.15.2", "1.16", "1.16.1", "1.16.2", "1.16.3", "1.16.4", "1.16.5", "1.17", "1.17.1", "1.18", "1.18.1", "1.18.2",
"1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", "1.20", "1.20.1", "1.20.2"
)
val supportMinecraftVersions = project.properties["minecraft"].toString().split(",")

modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
Expand All @@ -98,10 +85,7 @@ modrinth {
changelog.set(System.getenv("CHANGE_LOG"))
}

val curseForgeSpecialVersions = listOf(
"Forge", "Fabric", "Quilt", "Client", "Java 8", "Java 9", "Java 10", "Java 11", "Java 12", "Java 13", "Java 14",
"Java 15", "Java 16", "Java 17", "Java 18"
)
val curseForgeSpecialVersions = project.properties["curseforge"].toString().split(",")

curseforge {
apiKey = if (System.getenv("CURSE_TOKEN") != null) System.getenv("CURSE_TOKEN") else "dummy"
Expand All @@ -113,6 +97,6 @@ curseforge {
}
gameVersionStrings.addAll(supportMinecraftVersions)
gameVersionStrings.addAll(curseForgeSpecialVersions)
changelog = if (System.getenv("CHANGE_LOG") != null) System.getenv("CHANGE_LOG") else "dummy"
changelog = if (System.getenv("CHANGE_LOG") != null) System.getenv("CHANGE_LOG") else "No change log"
}
}
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
version=3.5.2
version=3.5.2
minecraft=1.6.1,1.6.2,1.6.4,1.7.2,1.7.10,1.8,1.8.8,1.8.9,1.9,1.9.4,1.10,1.10.2,1.11,1.11.2,1.12,1.12.1,1.12.2,1.13.2,1.14,1.14.1,1.14.2,1.14.3,1.14.4,1.15,1.15.1,1.15.2,1.16,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5,1.17,1.17.1,1.18,1.18.1,1.18.2,1.19,1.19.1,1.19.2,1.19.3,1.19.4,1.20,1.20.1,1.20.2
curseforge=NeoForge,Forge,Fabric,Quilt,Client,Java 8,Java 9,Java 10,Java 11,Java 12,Java 13,Java 14,Java 15,Java 16,Java 17,Java 18

0 comments on commit 676309c

Please sign in to comment.