forked from jsettlers/settlers-remake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
38 lines (30 loc) · 1001 Bytes
/
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
apply plugin: 'java'
sourceSets {
main {
output.dir('src/gen/java', buildBy: 'generateLayouts')
java.srcDirs = ['src/main/java', 'src/gen/java']
}
}
compileJava {
dependsOn 'generateLayouts'
}
clean {
delete 'src/gen'
}
dependencies {
implementation project(':jsettlers.common')
implementation project(':go.graphics')
implementation 'com.google.code.gson:gson:2.8.2'
}
def layoutsFolder = './src/gen/java/jsettlers/graphics/ui/layout'
task generateLayouts(dependsOn: tasks.getByPath(':jsettlers.graphics:layoutbuilder:jar'), type: JavaExec) {
doFirst {
delete(layoutsFolder)
mkdir(layoutsFolder)
}
classpath project(":jsettlers.graphics:layoutbuilder").sourceSets.main.runtimeClasspath
main = "jsettlers.graphics.ui.generate.LayoutConverter"
args = [file('./src/main/res/layout').absolutePath, file('./src/gen/java').absolutePath]
inputs.dir file('./src/main/res/layout')
outputs.dir file(layoutsFolder)
}