Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use an aar to define bridge dependency #3892

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file added app/libs/bridge-0.1.0-SNAPSHOT-release.aar
Binary file not shown.
Binary file added app/libs/bridge-0.1.0-release.aar
Binary file not shown.
9 changes: 9 additions & 0 deletions bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Contents

- [Compatibility](#compatibility)
- [Building](#building)
- [Versioning](#versioning)
- [Dependencies](#dependencies)

Expand All @@ -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:

Expand Down
10 changes: 10 additions & 0 deletions bridge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down