Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Add Bill of Material (#78)
Browse files Browse the repository at this point in the history
* Fix module versioning in documentation (#76)

* Add Bill of Material

* Fix build

Exclude BOM from adding metalava as it doesn't have api/current.api

Co-authored-by: Yacine Rezgui <[email protected]>
  • Loading branch information
ghostbear and yrezgui authored Jan 19, 2022
1 parent 98b3c1b commit e5fb58a
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 2 deletions.
18 changes: 18 additions & 0 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
plugins {
kotlin("jvm")
id("com.vanniktech.maven.publish")
}

dependencies {
constraints {
api(project(":permissions"))
api(project(":photopicker"))
api(project(":storage"))
api("com.squareup.okio:okio:3.0.0")
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
3 changes: 3 additions & 0 deletions bom/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_ARTIFACT_ID=modernstorage-bom
POM_NAME=ModernStorage Bill of Material
POM_PACKAGING=jar
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ subprojects {
}
}

if (project.hasProperty('POM_ARTIFACT_ID')) {
if (project.hasProperty('POM_ARTIFACT_ID') && project.properties['POM_ARTIFACT_ID'] != "modernstorage-bom") {
apply plugin: 'me.tylerbwong.gradle.metalava'

metalava {
Expand Down
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ implementation("com.google.modernstorage:modernstorage-permissions:{{ lib_versio
implementation("com.google.modernstorage:modernstorage-storage:{{ lib_version }}")
```

Alternatively use the Bill of Material to just have to define the version once, and then define which modules you need.

```kotlin
implementation("com.google.modernstorage:modernstorage-bom:{{ lib_version }}")

implementation("com.google.modernstorage:modernstorage-permissions")

implementation("com.google.modernstorage:modernstorage-storage")

// The Bill of Material includes Okio and Photo Picker as well
implementation("com.google.modernstorage:modernstorage-photopicker")

implementation("com.squareup.okio:okio")
```

## Quick start

* Have a look at the [permissions][permissions_guide] and [storage interactions][storage_interactions_guide] guides
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ plugins:
- macros

extra:
lib_version: "1.0.0-alpha04"
lib_version: "1.0.0-alpha03"
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

rootProject.name = "ModernStorage"
include ':bom'
include ':permissions'
include ':photopicker'
include ':storage'
Expand Down

0 comments on commit e5fb58a

Please sign in to comment.