-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
120 lines (96 loc) · 4.28 KB
/
build.gradle
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//file:noinspection GroovyAssignabilityCheck
import java.time.Instant
import java.time.temporal.ChronoUnit
buildscript {
repositories {
maven { url = "https://files.minecraftforge.net/maven" }
maven { url = "https://maven.parchmentmc.org" }
mavenCentral()
}
dependencies {
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "5.1.+", changing: true
classpath group: "org.parchmentmc", name: "librarian", version: "1.+"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
classpath "org.spongepowered:mixingradle:0.7.+"
}
}
System.setProperty("net.minecraftforge.gradle.check.certs", "false")
apply plugin: "net.minecraftforge.gradle"
apply plugin: "org.parchmentmc.librarian.forgegradle"
apply plugin: "kotlin"
// 天天连不上,直接放本地拉倒了。
// apply from: 'https://raw.githubusercontent.com/thedarkcolour/KotlinForForge/site/thedarkcolour/kotlinforforge/gradle/kff-3.3.2.gradle'
apply from: './kff-3.3.2.gradle'
apply plugin: "org.spongepowered.mixin"
def modId = "fire_protection_equipment"
version = "1.0"
group = "com.github.teamrestricted"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
minecraft {
mappings channel: "parchment", version: "2022.07.17-1.18.2"
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file("run_client")
property "forge.logging.markers", "REGISTRIES"
property "forge.logging.console.level", "debug"
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods.create(modId) { it.source sourceSets.main }
}
server {
workingDirectory project.file("run_server")
property "forge.logging.markers", "REGISTRIES"
property "forge.logging.console.level", "debug"
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods.create(modId) { it.source sourceSets.main }
}
data {
workingDirectory project.file("run_data")
property "forge.logging.markers", "REGISTRIES"
property "forge.logging.console.level", "debug"
mods.create(modId) { it.source sourceSets.main }
args "--mod", modId, "--existing-mod", modId, "--all", "--output", file("src/generated/resources/")
}
}
}
sourceSets.main.resources {
srcDir "src/generated/resources"
}
repositories {
maven { url = "https://files.minecraftforge.net/maven" }
maven { url = "https://maven.parchmentmc.org" }
maven { url "https://cursemaven.com"; content {includeGroup("curse.maven") } }
maven { url = "https://maven.blamejared.com" }
maven { url = "https://dvs1.progwml6.com/files/maven/" } // JEI
}
dependencies {
minecraft "net.minecraftforge:forge:1.18.2-40.1.0"
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
implementation fg.deobf("curse.maven:jade-324717:3761542")
implementation fg.deobf("curse.maven:neat-238372:3593906")
compileOnly("com.blamejared.crafttweaker:CraftTweaker-forge-1.18.2:${project.ctVersion}")
runtimeOnly(fg.deobf("com.blamejared.crafttweaker:CraftTweaker-forge-1.18.2:${project.ctVersion}"))
compileOnly fg.deobf("mezz.jei:jei-1.18.2:${project.jeiVersion}:api")
runtimeOnly fg.deobf("mezz.jei:jei-1.18.2:${project.jeiVersion}")
compileOnly fg.deobf("vazkii.patchouli:Patchouli:${project.patchouliVersion}")
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${project.patchouliVersion}")
}
jar {
manifest {
attributes([
"Specification-Title" : "${modId}",
"Specification-Vendor" : "TeamRestricted",
"Specification-Version" : "1",
"Implementation-Title" : "${modId}",
"Implementation-Version" : "${project.version}",
"Implementation-Vendor" : "TeamRestricted",
"Implementation-Timestamp": "${Instant.now().truncatedTo(ChronoUnit.SECONDS)}"
])
}
}
jar.finalizedBy("reobfJar")
mixin {
config("mixin.fpe.json")
}