-
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathbuild.neoforge.gradle.kts
More file actions
58 lines (50 loc) · 1.61 KB
/
build.neoforge.gradle.kts
File metadata and controls
58 lines (50 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
plugins {
kotlin("jvm")
id("automodpack.common")
id("automodpack.utils")
id("net.neoforged.moddev")
}
version = "${property("mod_version")}"
group = "${property("mod.group")}"
base.archivesName.set("${property("mod_name")}-mc${property("deps.minecraft")}-neoforge".lowercase())
neoForge {
validateAccessTransformers = true
enable {
version = property("deps.neoforge") as String
isDisableRecompilation = true
}
}
repositories {
maven("https://maven.su5ed.dev/releases") { name = "FFAPI" }
}
dependencies {
implementation(project(":core")) { isTransitive = false }
implementation(project(":loader-core")) { isTransitive = false }
implementation("org.sinytra.forgified-fabric-api:forgified-fabric-api:0.115.6+2.1.4+1.21.1")
}
tasks {
processResources {
exclude("**/fabric.mod.json", "**/automodpack*.accesswidener", "**/mods.toml")
if (sc.current.parsed >= "1.21.9") {
exclude("**/pack.mcmeta")
rename("new-pack.mcmeta", "pack.mcmeta")
} else {
exclude("**/new-pack.mcmeta")
}
}
named("createMinecraftArtifacts") {
dependsOn("stonecutterGenerate")
}
}
java {
if (sc.current.parsed >= "26.1") {
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
} else {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
}