Skip to content

Commit

Permalink
Use an aar to define bridge dependency (#3892)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaisting-livefront authored Sep 10, 2024
1 parent 8489693 commit b94a1ad
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
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

0 comments on commit b94a1ad

Please sign in to comment.