-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuild.gradle
176 lines (153 loc) · 6.12 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath group: 'org.mini2Dx', name: 'butler', version: '1.1.3'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = 'Alpha 8.1.20'
ext {
appName = 'undermount'
gdxVersion = '1.9.10'
roboVMVersion = '1.0.0-SNAPSHOT'
ashleyVersion = '1.3.1'
aiVersion = '1.8.0'
}
repositories {
mavenCentral()
mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":desktop") {
apply plugin: "java-library"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
dependencies {
implementation project(":core")
// implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" // Now part of core module (code smell)
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
api group: 'com.amazonaws', name: 'aws-java-sdk-translate', version: '1.11.708'
testImplementation "junit:junit:4.10"
testImplementation "org.mockito:mockito-core:3.5.13"
testImplementation "org.easytesting:fest-assert:1.4"
}
clean.doFirst {
file('../release_tools/win64_release').deleteDir()
file('../release_tools/linux64_release').deleteDir()
file('../release_tools/macosx_release').deleteDir()
}
task('packrWin', type: JavaExec, dependsOn: 'dist') {
workingDir '../release_tools'
main '-jar'
args=["packr.jar", "win-config.json"]
}
task('packrMac', type: JavaExec, dependsOn: 'dist') {
workingDir '../release_tools'
main '-jar'
args=["packr.jar", "mac-config.json"]
}
task('packrLinux', type: JavaExec, dependsOn: 'dist') {
workingDir '../release_tools'
main '-jar'
args=["packr.jar", "linux-config.json"]
}
task('iconWin', type: Exec, dependsOn: 'packrWin') {
workingDir '../release_tools'
commandLine 'cmd', '/c', 'rcedit-x64.exe', '"win64_release/King under the Mountain.exe"', '--set-icon', '"icon/favicon.ico"'
}
task('zipWin', type: Zip, dependsOn: 'iconWin') {
archiveFileName = "King under the Mountain $project.version win64.zip"
destinationDirectory = file("../release_tools")
from "../release_tools/win64_release"
}
task('zipMac', type: Zip, dependsOn: 'packrMac') {
archiveFileName = "King under the Mountain $project.version macosx.zip"
destinationDirectory = file("../release_tools")
from "../release_tools/macosx_release"
}
task('zipLinux', type: Zip, dependsOn: 'packrLinux') {
archiveFileName = "King under the Mountain $project.version linux64.zip"
destinationDirectory = file("../release_tools")
from "../release_tools/linux64_release"
}
task('butlerWin', type: Exec, dependsOn: 'iconWin') {
workingDir '../release_tools'
commandLine 'butler', 'push', 'win64_release', 'rocketjumptechnology/king-under-the-mountain:win', '--userversion', "$project.version"
}
task('butlerMac', type: Exec, dependsOn: 'packrMac') {
workingDir '../release_tools'
commandLine 'butler', 'push', 'macosx_release', 'rocketjumptechnology/king-under-the-mountain:osx', '--userversion', "$project.version"
}
task('butlerLinux', type: Exec, dependsOn: 'packrLinux') {
workingDir '../release_tools'
commandLine 'butler', 'push', 'linux64_release', 'rocketjumptechnology/king-under-the-mountain:linux', '--userversion', "$project.version"
}
task('zipAll') {
dependsOn 'zipLinux'
dependsOn 'zipMac'
dependsOn 'zipWin'
}
task('release') {
dependsOn 'butlerLinux'
dependsOn 'butlerMac'
dependsOn 'butlerWin'
}
}
project(":core") {
apply plugin: "java-library"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-ai:$aiVersion"
api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" // This is only here to multi-thread audio
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
api ("com.badlogicgames.gdx:gdx-tools:$gdxVersion") {
exclude group: 'com.badlogicgames.gdx', module: 'gdx-backend-lwjgl'
}
api 'com.google.inject:guice:4.2.3:no_aop'
api "com.kotcrab.vis:vis-ui:1.4.0"
api "commons-io:commons-io:2.4"
api "org.apache.commons:commons-csv:1.3"
api "org.apache.commons:commons-lang3:3.4"
api "org.apache.commons:commons-compress:1.20"
api "com.alibaba:fastjson:1.2.7"
api "com.fasterxml.jackson.core:jackson-databind:2.6.4"
api 'org.reflections:reflections:0.9.11'
api "org.tinylog:tinylog:1.3.4"
api 'com.squareup.okhttp3:okhttp:3.10.0'
api 'com.brsanthu:google-analytics-java:2.0.0' // comes with slf4j which is no-op below
api group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.25'
api 'net.openhft:zero-allocation-hashing:0.9'
api group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
testImplementation "junit:junit:4.10"
testImplementation "org.easytesting:fest-assert:1.4"
testImplementation "org.mockito:mockito-core:3.5.13"
testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
testImplementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
}
task createProperties {
def version = project.version.toString()
def file = new File("$projectDir/src/main/resources/version.txt")
file.write(version)
}
classes.dependsOn createProperties
}
tasks.eclipse.doLast {
delete ".project"
}