-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
85 lines (70 loc) · 2.03 KB
/
build.gradle.kts
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
import net.minecraftforge.gradle.tasks.SignJar
plugins {
id("net.minecraftforge.gradle.forge") version "2.3-SNAPSHOT"
id("signing")
}
version = "2.1.1"
group = "dev.sapphic"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = sourceCompatibility
}
minecraft {
version = "1.12.2-14.23.5.2847"
mappings = "stable_39"
runDir = "run"
}
signing {
sign(configurations.archives)
}
repositories {
maven("https://cursemaven.com")
maven("https://dvs1.progwml6.com/files/maven")
}
dependencies {
implementation("curse.maven:hwyla-253449:2568751")
implementation("mezz.jei:jei_1.12.2:4.16.1.302")
implementation("org.checkerframework:checker-qual:3.8.0")
}
tasks {
named<JavaCompile>("compileJava") {
with(options) {
isFork = true
isDeprecation = true
encoding = "UTF-8"
compilerArgs.addAll(listOf("-Xlint:all", "-parameters"))
}
}
named<ProcessResources>("processResources") {
filesMatching(setOf("/mcmod.info", "/pack.mcmeta", "/version.properties")) {
expand("version" to project.version)
}
}
named<Jar>("jar") {
from("/LICENSE")
manifest.attributes(mapOf(
"Specification-Title" to "MinecraftMod",
"Specification-Vendor" to project.group,
"Specification-Version" to "1.0.0",
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to project.group
))
}
named<Sign>("signArchives") {
onlyIf { project.hasProperty("signing.keyId") }
}
create<SignJar>("signJar") {
onlyIf { project.hasProperty("signing.mods.keyalias") }
dependsOn("reobfJar")
setAlias("${project.property("signing.mods.keyalias")}")
setKeyStore("${project.property("signing.mods.keystore")}")
setKeyPass("${project.property("signing.mods.password")}")
setStorePass("${project.property("signing.mods.password")}")
setInputFile(named<Jar>("jar").get().archivePath)
setOutputFile(inputFile)
}
named</*Assemble*/Task>("assemble") {
dependsOn("signJar")
}
}