diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 774c9469e..dc2a0c7e0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -135,8 +135,8 @@ dependencies { add("standardImplementation", dependencyNotation) } - // TODO: this should use a versioned aar instead of referencing the project BITAU-94 - implementation(project(":bridge")) + // TODO: this should use a versioned AAR instead of referencing a local AAR BITAU-94 + implementation(files("libs/bridge-0.1.0-SNAPSHOT-release.aar")) implementation(libs.androidx.activity.compose) implementation(libs.androidx.appcompat) diff --git a/app/libs/bridge-0.1.0-SNAPSHOT-release.aar b/app/libs/bridge-0.1.0-SNAPSHOT-release.aar new file mode 100644 index 000000000..07796235d Binary files /dev/null and b/app/libs/bridge-0.1.0-SNAPSHOT-release.aar differ diff --git a/app/libs/bridge-0.1.0-release.aar b/app/libs/bridge-0.1.0-release.aar new file mode 100644 index 000000000..07796235d Binary files /dev/null and b/app/libs/bridge-0.1.0-release.aar differ diff --git a/bridge/README.md b/bridge/README.md index c1a581a76..925ddb2cb 100644 --- a/bridge/README.md +++ b/bridge/README.md @@ -3,6 +3,7 @@ ## Contents - [Compatibility](#compatibility) +- [Building](#building) - [Versioning](#versioning) - [Dependencies](#dependencies) @@ -16,6 +17,14 @@ - **Minimum SDK**: 28 - **Target SDK**: 34 +## Building + +To build an AAR for inclusion in consumer applications, run: + + ```sh + $ ./gradlew bridge:assembleRelease + ``` + ## Versioning This repository conforms to the following versioning convention: diff --git a/bridge/build.gradle.kts b/bridge/build.gradle.kts index 7d3bba7f8..f28de39af 100644 --- a/bridge/build.gradle.kts +++ b/bridge/build.gradle.kts @@ -40,6 +40,16 @@ android { buildConfig = true aidl = true } + // Add version name to the output .aar file: + libraryVariants.all { + val variant = this + outputs + .map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl } + .forEach { output -> + val outputFileName = "bridge-${version}-SNAPSHOT-${variant.baseName}.aar" + output.outputFileName = outputFileName + } + } } kotlin {