forked from InnovativeOnlineIndustries/Industrial-Foregoing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
244 lines (222 loc) · 6.72 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url = "https://files.minecraftforge.net/maven" }
maven {
url "https://plugins.gradle.org/m2/"
}
}
configurations {
classpath.resolutionStrategy {
cacheDynamicVersionsFor 10, 'seconds'
cacheChangingModulesFor 0, 'seconds'
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.1.0"
//classpath 'com.selesse:gradle-git-changelog:0.2.+'
}
}
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id 'java'
id 'maven-publish'
id "com.matthewprenger.cursegradle" version "1.1.0"
}
//apply plugin: 'com.selesse.git.changelog'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
def BUILD_NUMBER = System.getenv("COMMIT") ? "${project.api_version}-${System.getenv("COMMIT")}" : "${project.api_version}"
group = "com.buuz135"
archivesBaseName = "industrial-foregoing"
version = "${minecraftVersion}-$BUILD_NUMBER"
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
mappings channel: 'snapshot', version: '20200129-1.15.1'
runs {
client = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
server = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
data {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'info'
args '--mod', 'industrialforegoing', '--all', '--output', '"' + rootProject.file('src/generated/resources/') + '"', '--existing', '"' + sourceSets.main.resources.srcDirs[0] + '"'
source sourceSets.main
}
}
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
repositories {
mavenCentral()
jcenter()
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
url "https://maven.tterrag.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
maven {
url 'https://cdn.hrzn.studio/maven/'
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.15.2-31.0.14'
if (findProject(':titanium') != null) {
compile project(':titanium')
} else {
compile fg.deobf (project.dependencies.create('com.hrznstudio:titanium:1.15.1-2.3.+'))
}
//if (findProject(':workspace') == null) {
compileOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2:api")
// at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2")
//}
}
afterEvaluate {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "2000"
}
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property 'version', project.version
inputs.property 'mcversion', '1.13'
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'META_INF/mods.toml'
// replace version and mcversion
expand 'version':project.version, 'mcversion': '1.13'
}
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'META_INF/mods.toml'
}
}
task apiJar(type: Jar, dependsOn: 'classes') {
classifier = 'api'
from(sourceSets.main.output) {
include 'com/buuz135/industrial/api/**'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task deobfJar(type:Jar) {
from sourceSets.main.output
classifier 'deobf'
}
artifacts {
archives sourcesJar
archives deobfJar
archives apiJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
artifact deobfJar
artifact apiJar
}
}
repositories {
maven {
url "s3://cdn.hrzn.studio/maven"
authentication {
awsIm(AwsImAuthentication)
}
}
}
}
tasks.curseforge.enabled = project.hasProperty('curse_api')
curseforge {
if (project.hasProperty('curse_api')) {
apiKey = project.curse_api
}
project {
id = '266515'
changelog = file('CHANGELOG.md')
changelogType = 'markdown'
releaseType = 'alpha'
mainArtifact(jar){
relations {
requiredLibrary 'titanium'
}
}
addArtifact sourcesJar
addArtifact deobfJar
addArtifact apiJar
}
}
license {
header rootProject.file('HEADER')
include "**/*.java"
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = 'Buuz135'
ext.project = "Industrial Foregoing"
ignoreFailures = true
mapping {
java='SLASHSTAR_STYLE'
}
}
jar {
manifest {
attributes([
"Specification-Title": "Industrial Foregoing",
"Specification-Vendor": "Buuz135",
"Specification-Version": "2.0", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${project.api_version}",
"Implementation-Vendor" :"Buuz135",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
//changelog {
// title = "Industrial Foregoing"
// fileName = "CHANGELOG.md"
// outputDirectory = file("$projectDir")
//
// commitFormat = '%s (%an)'
// markdown {
// commitFormat = '* %s (%an)'
// }
// includeLines = {
// !it.contains("Merge")
// }
// processLines = {
// String input = it as String
// if (input.contains('[ci skip] ')) {
// input = input.minus('[ci skip] ')
// }
// input
// }
//}