forked from lvyitian/CatServer-Pro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
157 lines (145 loc) · 5.31 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
import gradle.task.ReobfuscateTask
import gradle.task.ShrinkJarTask
plugins {
id 'java'
id 'maven'
id 'idea'
id 'net.nemerosa.versioning' version '2.4.0'
}
repositories {
clear()
mavenLocal()
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = 'minecraft'
url = 'https://libraries.minecraft.net/'
}
maven {
name = 'spigotmc-public'
url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
name = 'nuiton'
url = 'http://maven.nuiton.org/release/'
}
}
group = 'luohuayu.CatServer'
version = versioning {
full { it.tag ?: it.branch + '-' + it.abbreviated }
branchEnv = ['CI_BUILD_REF_NAME', 'GIT_LOCAL_BRANCH']
dirty = { t -> t }
}.info.full
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
dependencies {
compile 'com.google.code.findbugs:jsr305:3.0.1'
compile 'com.mojang:patchy:1.1'
compile 'oshi-project:oshi-core:1.1'
compile 'net.java.dev.jna:jna:4.4.0'
compile 'net.java.dev.jna:platform:3.4.0'
compile 'com.ibm.icu:icu4j-core-mojang:51.2'
compile 'net.sf.jopt-simple:jopt-simple:5.0.3'
compile 'com.paulscode:codecjorbis:20101023'
compile 'com.paulscode:codecwav:20101023'
compile 'com.paulscode:libraryjavasound:20101123'
compile 'com.paulscode:librarylwjglopenal:20100824'
compile 'com.paulscode:soundsystem:20120107'
compile 'io.netty:netty-all:4.1.9.Final'
compile 'com.google.guava:guava:21.0'
compile 'org.apache.commons:commons-lang3:3.5'
compile 'commons-io:commons-io:2.5'
compile 'commons-codec:commons-codec:1.10'
compile 'net.java.jinput:jinput:2.0.5'
compile 'net.java.jutils:jutils:1.0.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.mojang:authlib:1.5.25'
compile 'com.mojang:realms:1.10.21'
compile 'org.apache.commons:commons-compress:1.8.1'
compile 'org.apache.httpcomponents:httpclient:4.3.3'
compile 'commons-logging:commons-logging:1.1.3'
compile 'org.apache.httpcomponents:httpcore:4.3.2'
compile 'it.unimi.dsi:fastutil:7.1.0'
compile 'org.apache.logging.log4j:log4j-api:2.8.1'
annotationProcessor 'org.apache.logging.log4j:log4j-core:2.8.1' // log4j uses annotation processors
compile 'org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209'
compile 'org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209'
compile 'com.mojang:text2speech:1.10.3'
compile 'net.minecraft:launchwrapper:1.12'
compile 'jline:jline:2.13'
compile 'org.ow2.asm:asm-debug-all:5.2'
compile 'com.typesafe.akka:akka-actor_2.11:2.3.3'
compile 'com.typesafe:config:1.2.1'
compile 'lzma:lzma:0.0.1'
compile 'java3d:vecmath:1.5.2'
compile 'net.sf.trove4j:trove4j:3.0.3'
compile 'org.apache.maven:maven-artifact:3.5.3'
compile 'org.yaml:snakeyaml:1.19'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'commons-lang:commons-lang:2.6' // Is needed for plugin compatibility
compile 'net.md-5:SpecialSource:1.7.4'
compile 'org.xerial:sqlite-jdbc:3.21.0.1'
compile 'mysql:mysql-connector-java:5.1.45'
compile 'net.md-5:bungeecord-chat:1.12-SNAPSHOT'
compile 'org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2'
compile 'org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2'
compile 'org.scala-lang:scala-actors-migration_2.11:1.1.0'
compile 'org.scala-lang:scala-compiler:2.11.1'
compile 'org.scala-lang:scala-library:2.11.1'
compile 'org.scala-lang:scala-parser-combinators_2.11:1.0.1'
compile 'org.scala-lang:scala-reflect:2.11.1'
compile 'org.scala-lang:scala-swing_2.11:1.0.1'
compile 'org.scala-lang:scala-xml_2.11:1.0.2'
}
jar {
classifier = 'dev'
}
task reobfuscate(type: ReobfuscateTask) {
dependsOn(tasks.jar)
classpath = sourceSets.main.compileClasspath
srg = new File('conf/mcp-notch.srg')
inputJar = (File) tasks.jar.archivePath
}
task shrinkJar(type: ShrinkJarTask) {
dependsOn(tasks.reobfuscate)
outputs.upToDateWhen { false }
inputJar = (File) tasks.reobfuscate.outputJar
}
task processServerResources(type: ProcessResources) {
from sourceSets.main.resources.srcDirs
into new File(buildDir, 'resources_server')
exclude 'assets/minecraft/font'
exclude 'assets/minecraft/shaders'
exclude 'assets/minecraft/texts'
exclude 'assets/minecraft/textures'
exclude 'assets/fml/textures'
}
task jar_server(type: Jar) {
dependsOn(tasks.shrinkJar, tasks.processServerResources)
from fileTree(tasks.shrinkJar.classesServer), tasks.processServerResources
classifier = 'server'
manifest {
attributes(
"Implementation-Title": rootProject.name,
"Implementation-Version": "git-CatServer-" + version,
"Main-Class": "catserver.server.CatServerLaunch",
"TweakClass": "net.minecraftforge.fml.common.launcher.FMLTweaker",
"Class-Path": configurations.compile.collect { 'libraries/' + it.getName() }.join(' '),
)
}
}
artifacts {
archives jar_server
}
task dumpLibs(type: Copy) {
into "$buildDir/libraries"
from configurations.compile
}