https://github.com/abzico/setandroidbuildenv
Script to set building environment variables ready for building library for Android
https://github.com/abzico/setandroidbuildenv
android bash environment-variables script
Last synced: 3 months ago
JSON representation
Script to set building environment variables ready for building library for Android
- Host: GitHub
- URL: https://github.com/abzico/setandroidbuildenv
- Owner: abzico
- License: mit
- Created: 2019-04-13T12:45:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-14T17:27:09.000Z (almost 7 years ago)
- Last Synced: 2025-01-23T11:34:46.005Z (about 1 year ago)
- Topics: android, bash, environment-variables, script
- Language: Shell
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# setandroidbuildenv
Script to set building environment variables ready for building library for Android
# How
It will set bunch of necessary environment variables to be used in building a library project for Android platform.
This requires you already install NDK, and set `$ANDROID_NDK_HOME` to your NDK version of choice.
There are the following configurable settings you can set
* `host_tag` - indicate host value that builds (default is `linux-x86_64`)
* `minsdkversion` - minimum sdk version to support, this is value of api level (default is 18)
* `target_abi` - a single target abi value. it can be `armeabi-v7a`, `x86`, `arm64-v8a`, or `x86_64` (default is `armeabi-v7a`)
The way to send in above parameters can be done with
```
. ./setandroidbuildenv minsdkversion=21 target_abi=arm64-v8a
```
or in case you've installed `setandroidbuildenv` to your executable path i.e. `/usr/local/bin` then you do the following instead
```
. setandroidbuildenv minsdkversion=21 target_abi=arm64-v8a
```
Note `.` which is to source exported environment variables inside the script, so we can use it outside in active shell.
# Available Commands/Parameters
* `setandroidbuildenv --help` - to print help text
* `. setandroidbuildenv --unset` - to unset all related and already set environment variables related in building operation (notice `.` source at the beginning of the command
* `setandroidbuildenv --print-active` - to print active environment variables' value
* `. setandroidbuildenv ` - to set environment variables for building
# License
[MIT](https://github.com/abzico/setandroidbuildenv/blob/master/LICENSE), Angry Baozi (https://abzi.co)