Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Rework build process #212

Closed
philip-alldredge opened this issue Jun 27, 2019 · 1 comment · Fixed by #223
Closed

Rework build process #212

philip-alldredge opened this issue Jun 27, 2019 · 1 comment · Fixed by #223

Comments

@philip-alldredge
Copy link
Contributor

philip-alldredge commented Jun 27, 2019

I'm not sure if this is the appropriate place for this.

cargo apk seems to be maintained for the most part. There appears to be issues with usage with newer versions of the NDK.

I am currently looking into reworking the build system to resolve many of these issues while (hopefully) maintaining compatibility with currently supported versions of the NDK.

I believe this rework would open the door for supporting building multiple binaries/targets as well as resolving the following issues: #208, #191, #211, #138, #134, #123

Since it would be a substantial change, I wanted to make you aware of it and see if it is something that would be potentially merged once completed.

@jrmuizel
Copy link

Can you give an overview of what you plan on changing?

@philip-alldredge
Copy link
Contributor Author

  • Update dependencies to newer versions. For example use serde instead of rustc-serialize.
  • Use cargo::ops::compile_with_exec along with some build time generated code to build static libraries for each target platform and each cargo build target(binaries and examples). I'm hoping this will simplify some of the build process and pave the way for support for building multiple targets.
  • Use ndk-build to build shared libraries for target platforms. Ideally this would still be compatible with older NDKs but at the least it would support newer NDKs which have problem using the current cargo apk. The current cargo APK tried to use GCC which is no longer provided by the NDK.
  • Update the supported build targets to match those supported by the current NDK.
  • Use SDK provided apt tools to build the APK(s). This would remove gradle dependency.

Other things that I would like to see but won't necessarily be in the first version of the rework:

  • Auto detect paths to build tools on windows. I would like to get to the point where if the user has the SDK and NDK installed via Android Studio that things will just work.
  • Support building multiple targets when running cargo apk.
  • Support for customizing the permissions and features requested by the manifest.

I currently don't have a timeline for when said changes would be available in a branch for usage and/or merging.

philip-alldredge added a commit to philip-alldredge/android-rs-glue that referenced this issue Jul 27, 2019
Support for latest Android NDK and SDK,
ABI rework, additional manifest configuration, and multiple cargo targets.

Updated dependencies.

Formatted using rustfmt.

Removed gradle dependency.
@mb64 mb64 closed this as completed in #223 Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants