sourceCompatibility = '1.8' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' sourceSets { main { java.srcDirs = [ "src/" ] resources.srcDirs= ["resources/"] } test { java.srcDirs = ["test/"] } } dependencies { compile "org.jmonkeyengine:jme3-core:${jme3Version}-stable" compile "org.jmonkeyengine:jme3-effects:${jme3Version}-stable" compile "org.jmonkeyengine:jme3-jogg:${jme3Version}-stable" compile "org.jmonkeyengine:jme3-niftygui:${jme3Version}-stable" implementation 'se.koc:zutil:1.0.0-SNAPSHOT' testImplementation "org.junit.jupiter:junit-jupiter-engine:5.5.2" testImplementation "org.junit.platform:junit-platform-runner:1.5.2" } 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}" def tmpFile = sourceFile.getAbsolutePath().replace(sourcePath.absolutePath, targetPath.absolutePath) tmpFile = tmpFile.replaceAll(".blend\$", ".fbx") def targetFile = new File(tmpFile) println " - Output: ${targetFile}" // exec { // executable "sh" // args "-c", "blender --background '${sourceFile}' --python 'blender-export.py' -- '${targetFile}'" // } // exec { // executable "cmd" // args "/c", "blender.exe --background '${sourceFile}' --python 'blender-export.py' -- '${targetFile}'" // } } } } test { useJUnitPlatform() }