-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
55 lines (45 loc) · 1.58 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
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
version = '0.7.1'
repositories {
mavenCentral()
maven {
name = 'minecraft'
url = 'https://libraries.minecraft.net/'
}
maven {
name = 'forge'
url = 'http://files.minecraftforge.net/maven/'
}
}
sourceSets {
lib
}
dependencies {
compile 'net.minecraft:launchwrapper:1.12'
compile 'org.apache.logging.log4j:log4j-core:2.0-beta9'
compile 'net.minecraftforge:forge:1.12.2-14.23.0.2486:universal'
}
project.ext.supportedVersions = ["1.11.2", "1.12", "1.12.1", "1.12.2"]
task setSupportedVersions(type: Copy) {
from(sourceSets.main.java.srcDirs)
into 'build/sources/java'
filter(org.apache.tools.ant.filters.ReplaceTokens,
tokens: ['supportedVersions': project.ext.supportedVersions.join(",")])
}
compileJava.source = setSupportedVersions.outputs.files
compileJava.dependsOn setSupportedVersions
compileJava.classpath += sourceSets.lib.output
jar {
manifest {
attributes(
"Main-Class": "com.simon816.sponge.bootstrap.Bootstrap",
"Class-Path": "libraries/net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar"
+ " libraries/net/sf/jopt-simple/jopt-simple/5.0.3/jopt-simple-5.0.3.jar"
+ " libraries/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar "
+ project.ext.supportedVersions.collect{ "minecraft_server.${it}.jar" }.join(" ")
)
}
}