forked from Wheatley11/EmbeddiumPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (97 loc) · 3.49 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
plugins {
id 'java'
id 'idea'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.spongepowered.mixin' version '0.7.+'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}
version = "${mcversion}-v${modversion}"
group = "me.srrapero720"
archivesBaseName = modid
java {
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
minecraft {
mappings channel: "${mappingsch}", version: "${mappings_version}-${mcversion}"
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
copyIdeResources = true
runs {
client {
taskName "runClient-${mcversion}"
workingDirectory project.file('run')
arg '-mixin.config=' + String.valueOf(modid) + '.mixin.json'
//jvmArgs '-XX:+UnlockCommercialFeatures' // uncomment for profiling
property 'forge.logging.console.level', 'info'
property 'terminal.jline', 'true'
property 'fml.earlyprogresswindow', 'false'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods {
"${modid}" {
source sourceSets.main
}
}
}
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
mavenCentral()
maven { url "https://repo.spongepowered.org/maven" }
maven { url "https://maven.tterrag.com/" }
maven {
url 'https://www.cursemaven.com'
content {
includeGroup "curse.maven"
}
}
maven {
url "https://maven.blamejared.com"
}
maven { url 'https://jitpack.io' }
flatDir {
dirs 'libs'
}
}
dependencies {
minecraft "net.minecraftforge:forge:${mcversion}-${fgversion}"
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
// DEPENDENCIES
implementation fg.deobf("org.embeddedt:embeddium-${mcversion}:${embeddiumversion}")
implementation fg.deobf("curse.maven:jei-238222:${jeiversion}")
runtimeOnly fg.deobf("curse.maven:textrues-embeddium-options-910506:${embeddiumoptionsversion}")
runtimeOnly fg.deobf("curse.maven:oculus-581495:${oculusversion}")
// MOD SUPPORT
implementation fg.deobf("com.simibubi.create:create-${mcversion}:${createversion}:slim") { transitive = false }
implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${mcversion}:${flywheelversion}")
implementation fg.deobf("com.tterrag.registrate:Registrate:${registrateversion}")
}
mixin {
add sourceSets.main, "${modid}.mixin-refmap.json"
}
jar {
manifest {
attributes([
"Specification-Title": "${modid}",
"Specification-Vendor": "${modauthor}",
"Specification-Version": "${modversion}",
"Implementation-Title": "${modname}",
"Implementation-Version": "${modversion}",
"Implementation-Vendor" : "${modauthor}",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "${modid}.mixin.json"
])
}
}
// Process target resources with mod info
tasks.processResources.outputs.upToDateWhen { false }
processResources {
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand(rootProject.properties)
}
}
jar.finalizedBy('reobfJar')
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
}