Closed MobiDevelop closed 2 days ago
I think we should be checking File#isAbsolute before attempting to do relative path logic. And also using File constructor with child instead of doing manual string concatenation.
I've been playing around with it and I think I've got it working using Path and it's relativize method.
On a semi-related note, I dont see why I added NativeCodeGeneratorConfig.jniDir as a separate field. That should just be using JnigenExtension.jniDir
Yep, I noticed that while working to make the Gradle plugin work off files instead of strings. I was also making the extension values properties which can be evaluated lazily by the tasks while also specifying inputs and outputs for those tasks, so they can play Gradle's incremental game.
Fixed in 3.0.0.
AntScriptGenerator prefixes the
libsDir
path with../
, preventing the libs directory from being specified as an absolute path (e.g. from the Gradle plugin as `libsDir = "${project.buildDir}/jnigen/libs"). For background, I'm attempting to set up a project where all the jnigen artifacts are placed within the Gradle build directory (to allow easy clean-up).