This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
118 lines (91 loc) · 2.59 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
buildscript {
apply from: "https://raw.githubusercontent.com/HyCraftHD/Blank-Forge-Project/master/build.methods"
setup()
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
maven { url = "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:${config.forge.gradle}"
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.10"
}
}
apply from: "https://raw.githubusercontent.com/HyCraftHD/Blank-Forge-Project/master/build.methods"
apply from: "https://raw.githubusercontent.com/HyCraftHD/Blank-Forge-Project/master/git.methods"
setup()
info()
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "com.matthewprenger.cursegradle"
repositories {
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
}
}
getBuildNumber()
version = "${config.mod.version}.${config.buildnumber}"
archivesBaseName = "${config.mod.filename}-${config.forge.mcversion}"
sourceCompatibility = targetCompatibility = "1.8"
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
}
minecraft {
version = config.forge.version
runDir = "run"
mappings = config.forge.mapping
makeObfSourceJar = false
replace "@VERSION@", "${project.version}"
}
jar {
classifier = ""
from "LICENSE"
manifest.mainAttributes(
"Implementation-Title": config.mod.name,
"Implementation-Version": project.version,
"Built-On": minecraft.version
)
}
task deobfJar(type: Jar) {
classifier = "dev"
from sourceSets.main.output
from "LICENSE"
manifest.mainAttributes(
"Implementation-Title": config.mod.name,
"Implementation-Version": project.version,
"Built-On": minecraft.version
)
}
artifacts {
archives deobfJar
archives jar
}
sourceSets {
main {
java
resources
}
}
dependencies {
compile "u-team-core:u_team_core-${minecraft.version}:${config.uteamcore.version}:dev"
}
curseforge {
apiKey = project.properties["token"]
tasks.curseforge.dependsOn build
tasks.curseforge.dependsOn setBuildNumber
project {
id = config.curse.id
releaseType = config.curse.type
addGameVersion minecraft.version
relations {
requiredLibrary "u-team-core"
}
mainArtifact(jar) {
displayName = "${config.curse.display}-${minecraft.version}-${version}"
}
addArtifact(deobfJar) {
displayName = "${config.curse.display}-${minecraft.version}-${version}-dev"
changelog = "Mappings: " + config.forge.mapping
}
}
}