Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (75 loc) · 2.54 KB
/
Copy pathbuild.gradle
File metadata and controls
86 lines (75 loc) · 2.54 KB
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
plugins {
id 'java'
id 'net.kyori.blossom' version "1.1.0" apply false
id "com.github.johnrengelman.shadow" version "4.0.4" apply false
}
version = modVersion
group = modGroup
archivesBaseName = modBaseName
subprojects {
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: "net.kyori.blossom"
apply plugin: "com.github.johnrengelman.shadow"
version = rootProject.getVersion()
group = rootProject.getGroup()
archivesBaseName = rootProject.getArchivesBaseName()
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven { url 'https://jitpack.io/' }
maven {
name = "Forge"
url = "http://files.minecraftforge.net/maven"
}
}
configurations {
ship
compile.extendsFrom ship
}
shadowJar {
classifier ''
configurations = [project.configurations.ship]
from sourceSets.main.output
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude('dummyThing')
exclude('META-INF/maven/')
exclude('META-INF/nar/')
exclude('module-info.class')
exclude('META-INF/versions/')
}
artifacts {
archives shadowJar
}
jar {
manifest {
attributes([
"ModSide" : "CLIENT",
"Specification-Title" : rootProject.getName(),
"Specification-Vendor" : "ijo42",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : rootProject.getName(),
"Implementation-Version" : rootProject.getVersion(),
"Implementation-Vendor" : "ijo42",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
options.incremental = true // one flag, and things will get so MUCH faster
}
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
apply from: "https://gist.githubusercontent.com/ijo42/6b215e76269a72f37194b924ddda038e/raw/signjar.groovy"
}
tasks.getByPath(':jar').enabled = false
defaultTasks 'build'