-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
115 lines (96 loc) · 3.52 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
apply plugin: "idea"
def jcpluginVersion = "4.0.4"
subprojects {
apply plugin: "java"
apply plugin: "idea"
project.version = "4.0.8"
project.ext.relType = "release"
//Descending version order, Forge first; Fabric last
project.ext.jcplugin_versions = ["4430994", "4430992", "4430990", "4430988"] as String[]
project.ext.jcplugin_id = "659192"
rootProject.ext.setProperty("JCPluginVersion", jcpluginVersion);
if (!project.hasProperty('javaVersion') || project.property('javaVersion') == "8") {
java.toolchain {
project.logger.lifecycle("{}: configuring Java 8 toolchain", project.displayName)
languageVersion = JavaLanguageVersion.of(8)
}
it.sourceCompatibility = 1.8
it.targetCompatibility = 1.8
tasks.withType(JavaCompile).configureEach {
project.logger.lifecycle("{}: setting source/target compatibility to Java 8 on task {}", project.displayName, it.name)
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
} else if (project.hasProperty('javaVersion')) {
int ver = project.property('javaVersion') as int
it.sourceCompatibility = 1.8
it.targetCompatibility = 1.8
java.toolchain {
project.logger.lifecycle("{}: configuring Java {} toolchain", project.displayName, ver)
languageVersion = JavaLanguageVersion.of(ver)
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = 1.8
targetCompatibility = 1.8
project.logger.lifecycle("{}: setting release to {} on task {}", project.displayName, ver, it.name)
options.release = ver
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
}
//tasks.withType(GenerateModuleMetadata) {
// enabled = false //probably broken
//}
jar {
manifest {
attributes([
"Specification-Title" : "DefaultSettings",
"Specification-Vendor" : "Jomcraft Network",
"Specification-Version" : project.version,
"Implementation-Title" : "DefaultSettings",
"Implementation-Version" : project.version,
"Implementation-Vendor" : "Jomcraft Network",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd HH:mm:ssZ"),
"JCPluginVersion" : jcpluginVersion
])
}
}
repositories {
maven {
url = "https://repo.spongepowered.org/repository/maven-public/"
content {
includeGroup "org.spongepowered"
}
}
mavenCentral({
content {
includeGroup("org.jetbrains")
}
})
}
dependencies {
implementation "org.jetbrains:annotations:16.0.2"
}
}
/*task("copyRelease") {
subprojects {
dependsOn project.name + ":build"
}
doFirst {
println "Gathering builds"
copy {
subprojects {
if (project.name != "Core") {
def libDir = project.projectDir.toPath().resolve("build/libs")
from(libDir) {
include "*.jar"
exclude "*-dev.jar", "*-sources.jar"
}
into "build/libs/"
duplicatesStrategy DuplicatesStrategy.INCLUDE
}
}
}
}
}*/