-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
73 lines (62 loc) · 1.77 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
import java.nio.file.Paths
plugins {
id 'java'
id 'java-library'
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
group = 'com.nhn.gameanvil'
version = '1.4.1'
java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11
repositories {
mavenLocal()
mavenCentral()
}
configurations {
quasar
api.setCanBeResolved(true)
all {
resolutionStrategy {
force 'com.esotericsoftware:kryo:4.0.2'
}
}
}
// standalone jar 을 생성합니다.
jar {
baseName = "sample_game_server"
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
manifest {
attributes 'Main-Class': 'com.nhn.gameanvil.sample.Main'
}
from {
configurations.compileClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
// GameAnvil 서버를 실행합니다
task runMain(dependsOn: build, type: JavaExec) {
jvmArgs = [
"-Xms6g",
"-Xmx6g",
"-XX:+UseG1GC"]
main = 'com.nhn.gameanvil.sample.Main'
classpath = sourceSets.main.runtimeClasspath
}
compileJava {
dependsOn.processResources
doLast {
ant.taskdef(name: 'instrumentation', classname: 'co.paralleluniverse.fibers.instrument.InstrumentationTask', classpath: configurations.api.asPath)
ant.instrumentation(verbose: 'true', check: 'true', debug: 'true') {
fileset(dir: 'build/classes/') {
include(name: '**/*.class')
}
}
}
}
dependencies {
api files(Paths.get(project.projectDir.absolutePath, './src/main/resources/META-INF/quasar-core-0.8.0-jdk11.jar').toString())
api 'org.mybatis:mybatis:3.5.3'
api 'mysql:mysql-connector-java:8.0.23'
api 'com.nhn.gameanvil:gameanvil:1.4.1-jdk11'
}