Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AntScriptGenerator does not allow to specify an absolute libsDir #14

Open
MobiDevelop opened this issue Oct 5, 2020 · 4 comments
Open
Assignees

Comments

@MobiDevelop
Copy link
Member

MobiDevelop commented Oct 5, 2020

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).

@MobiDevelop MobiDevelop self-assigned this Oct 6, 2020
@PokeMMO
Copy link
Contributor

PokeMMO commented Oct 6, 2020

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.

@MobiDevelop
Copy link
Member Author

I've been playing around with it and I think I've got it working using Path and it's relativize method.

@PokeMMO
Copy link
Contributor

PokeMMO commented Oct 7, 2020

On a semi-related note, I dont see why I added NativeCodeGeneratorConfig.jniDir as a separate field. That should just be using JnigenExtension.jniDir

@MobiDevelop
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants