commit | de30c792c934aa558c3b335218b36aa7cc4cd30f | [log] [tgz] |
---|---|---|
author | Dan Albert <[email protected]> | Tue Nov 16 16:15:35 2021 -0800 |
committer | Dan Albert <[email protected]> | Wed Nov 17 12:02:54 2021 -0800 |
tree | 975b1014f0f083c5fbc8dc1c37f0235f8f6de792 | |
parent | 9ed80c3aded5f599c7b2e9893300610dbe7ac50d [diff] |
Enable building non-snapshot packages. This used to not matter because we created the POM and AAR ourselves, but now that we're letting gradle do the work we need to not build snapshot packages for releases so we get the correct artifact names. I added a new project property ("release") that controls whether or not the build is a snapshot or not, and split the release build scripts in two so the release build can set that without setting it for pre/post submit. The regular build.sh is sticking around transitionally while I fix the build configs. Test: ./scripts/build_release.sh Test: ./scripts/build_snapshot.sh Bug: None Change-Id: I220f265fafabc7c0ca3cdeb5321b65a59c52858a
A collection of Android build scripts for various third-party libraries and the tooling to build them.
If you're an Android app developer looking to consume these libraries, this is probably not what you want. This project builds AARs to be published to Maven. You most likely want to use the AAR, not build it yourself.
Note: Gradle support for consuming these artifacts from an AAR is a work in progress.
Each third-party project is called a “port”. Ports consist of a description of where to fetch the source, apply any patches needed, build, install, and package the library into an AAR.
A port is a subclass of the abstract Kotlin class com.android.ndkports.Port
. Projects define the name and version of the port, the URL to fetch source from, a list of modules (libraries) to build, and the build steps.
See the Port class for documentation on the port API.
Individual port files are kept in ports/$name/port.kts
. For example, the cURL port is ports/curl/port.kts.
ndkports requires an NDK to be used for building to be specified on the command line as well as a list of packages to build. For example, to build cURL:
$ ./gradlew run --args='--ndk /path/to/android-ndk-r20 openssl curl' Build output... $ find -name '*.aar' ./out/curl/curl.aar ./out/openssl/openssl.aar
Note that dependencies currently need to be already built or ordered explicitly.
To build all ports using Docker, use scripts/build.sh
.