Building¶
Gradle setup¶
Root Ackpine project has the following Gradle tasks:
:buildAckpine: a lifecycle task which builds release AARs of all Ackpine library projects;:buildSamples: a lifecycle task which builds and gathers release versions of all Ackpine sample app APKs and R8 mappings intoreleasedirectory;:releaseChangelog: an actionable task which extracts changelog for the last release fromdocs/changelog.mdfile tochangelog.txt;:checkAckpineAbi: validates public ABI surface of the library projects against dumps;:updateAckpineAbi: dumps public ABI surface of the library projects.
Tests:
test: runs unit tests for all projects where they are configured;api<ApiLevel>DebugAndroidTest: runs device tests on Gradle managed device withApiLevelfor all projects where they are configured and if they haveapi<ApiLevel>managed device registered.
Other useful tasks provided by third-party Gradle plugins:
:api-documentation:dokkaGenerate: generates API documentation for the library projects and places it intodocs/apidirectory;publishAndReleaseToMavenCentral: publishes the library projects to Maven Central repository. For further information see plugin's documentation.
Projects are added to :buildAckpine, :buildSamples, :checkAckpineAbi and :updateAckpineAbi tasks through dependencies block in root build.gradle.kts. Library project should have ru.solrudev.ackpine.library Gradle plugin applied, and sample app project should have ru.solrudev.ackpine.app-release Gradle plugin applied.
Projects are added to :api-documentation:dokkaGenerate task through dependencies block in build.gradle.kts of api-documentation project. Documented project should have ru.solrudev.ackpine.dokka Gradle plugin applied.
Documentation website¶
Documentation is built using Zensical (requires Python 3). To install Zensical locally, you can use this command while you're in the Ackpine repository root directory:
pip3 install -r requirements.txt
To serve documentation website on localhost, execute this command:
zensical serve
Sample apps¶
To build release versions of sample apps you'll need to provide a keystore. For this, create a keystore.properties file in the root directory with the following contents:
APP_SIGNING_KEY_ALIAS=YOUR_KEY_ALIAS
APP_SIGNING_KEY_PASSWORD=YOUR_KEY_PASSWORD
APP_SIGNING_KEY_STORE_PASSWORD=YOUR_KEYSTORE_PASSWORD
APP_SIGNING_KEY_STORE_PATH=PATH_TO_YOUR_KEYSTORE_FILE
keystore.properties file takes precedence over environment variables.