Well, if I may introduce some black magic to the mix, I currently have two projects being built together. One is the main gradle project, contains all code, and the other is a jme3 ant project, containing all the assets. I do this so I can still have my gradle project while still being able to use SDK asset tools. Plus it makes it easier to just pull the asset repo.
If your interested in this setup, follow this 3 step recipe:
In your main projects build.gradle, define a variable with the relative path to the ant asset project
def assetPack = "../Assets"
Then, right before the dependencies
section of your build.gradle, prefix all the ant project tasks with “ant” to avoid task collision, and make gradle’s compilation depend on the ant projects jar output
ant.importBuild("${assetPack}/build.xml") { antTarget ->
'ant-' + antTarget
}
compileJava.dependsOn "ant-jar"
Then, finally add the ant project build results to the gradle dependencies:
dependencies {
implementation fileTree(dir: "${assetPack}/dist", include: "*.jar")
}
Now, anything in your ant project is available to your gradle project. This can be done with multiple ant projects as well, by repeating the 3 steps above, and changing the names such as:
`def assetPack = "../Assets"`
`def extraPack = "../Extra"
...
ant.importBuild("${assetPack}/build.xml") { antTarget ->
'ant-assetPack-' + antTarget
}
compileJava.dependsOn "ant-assetPack-jar"
ant.importBuild("${extraPack}/build.xml") { antTarget ->
'ant-extraPack-' + antTarget
}
compileJava.dependsOn "ant-extraPack-jar"
...
dependencies {
implementation fileTree(dir: "${assetPack}/dist", include: "*.jar")
implementation fileTree(dir: "${extraPack}/dist", include: "*.jar")
}
Hopefully this helps someone out, it’s been a kind of blessing to me to use gradle for deps but still use jme3 sdk for assets in this way, and is set once and never worry about it again (unless the name of the ant project changes, or you modify any of its build tasks, but I haven’t found a good reason to do so).
From what I’ve heard around the 3.3 SDK, this should not be needed, but I haven’t gotten my hands on the 3.3 SDK yet (potato internet would take 6 hours to download the new SDK, about an hour per 100mb), so I haven’t gotten to test that.
This method works in both development and runtime environments, as the other project is build into jar of the gradle project