-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
53 lines (43 loc) · 1.33 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
apply plugin: 'application'
archivesBaseName = 'JavaBlend-SDK'
mainClassName = 'org.cakelab.blender.generator.ModelGenerator'
sourceSets.main {
java.srcDirs = ['src']
resources.srcDirs = ['resources']
}
allprojects {
apply plugin: 'java'
group = 'org.cakelab.blender'
version = '1.1.1'
repositories {
maven {
name 'jitpack'
url 'https://jitpack.io/'
}
}
dependencies {
compile 'com.github.ReplayMod:jdoxml:bf3a047'
compile 'com.github.ReplayMod:org.cakelab.json:dc46f55'
}
}
subprojects { project ->
apply plugin: 'maven'
def srcDir = project.file('build/generated')
sourceSets.main.java.srcDirs = [srcDir, project.parent.file('src')]
sourceSets.main.resources {
srcDirs = [srcDir]
excludes = ["**/*.java"]
}
task generateSources(type: JavaExec) {
def blendFile = project.parent.file('versions').listFiles().find { it.name.startsWith(project.name) }
inputs.file blendFile
outputs.dir srcDir
classpath = project.parent.sourceSets.main.runtimeClasspath
main = project.parent.mainClassName
args '-in', blendFile.absolutePath,
'-out', srcDir.absolutePath,
'-p', 'org.blender',
'-d', 'false'
}
compileJava.dependsOn generateSources
}