2020-03-21 19:57:43 +01:00
|
|
|
sourceCompatibility = '1.8'
|
2019-12-31 16:50:44 +01:00
|
|
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
|
main {
|
|
|
|
|
java.srcDirs = [ "src/" ]
|
2020-01-04 20:03:57 +01:00
|
|
|
resources.srcDirs= ["resources/"]
|
2019-12-31 16:50:44 +01:00
|
|
|
}
|
|
|
|
|
test {
|
|
|
|
|
java.srcDirs = ["test/"]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2020-03-21 19:57:43 +01:00
|
|
|
compile "org.jmonkeyengine:jme3-core:${jme3Version}-stable"
|
|
|
|
|
compile "org.jmonkeyengine:jme3-terrain:${jme3Version}-stable"
|
2020-01-04 20:03:57 +01:00
|
|
|
|
2020-02-16 00:31:58 +01:00
|
|
|
implementation 'se.koc:zutil:1.0.0-SNAPSHOT'
|
2020-01-04 20:03:57 +01:00
|
|
|
|
2019-12-31 16:50:44 +01:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.5.2"
|
|
|
|
|
testImplementation "org.junit.platform:junit-platform-runner:1.5.2"
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-21 00:11:04 +02:00
|
|
|
task buildResources {
|
|
|
|
|
def sourcePath = project.file("resources")
|
|
|
|
|
def targetPath = project.file("build/resources/main/")
|
|
|
|
|
|
|
|
|
|
fileTree(dir: sourcePath).each { sourceFile ->
|
|
|
|
|
if (sourceFile.getName().endsWith(".blend")) {
|
|
|
|
|
println "Exporting: ${sourceFile}"
|
|
|
|
|
|
2020-04-27 00:01:12 +02:00
|
|
|
def tmpFile = sourceFile.getAbsolutePath().replace(sourcePath.absolutePath, targetPath.absolutePath)
|
|
|
|
|
tmpFile = tmpFile.replaceAll(".blend\$", ".fbx")
|
|
|
|
|
def targetFile = new File(tmpFile)
|
2020-04-21 00:11:04 +02:00
|
|
|
println " - Output: ${targetFile}"
|
|
|
|
|
|
2020-04-27 00:01:12 +02:00
|
|
|
exec {
|
|
|
|
|
executable "sh"
|
|
|
|
|
args "-c", "blender.exe --background '${sourceFile}' --python 'blender-export.py' -- '${targetFile}'"
|
|
|
|
|
}
|
2020-04-21 00:11:04 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-31 16:50:44 +01:00
|
|
|
test {
|
|
|
|
|
useJUnitPlatform()
|
|
|
|
|
}
|