From 05a8ee7ad4e680c1507415cd0f0c9cd052d4dc16 Mon Sep 17 00:00:00 2001 From: Yacine Rezgui Date: Fri, 14 Jan 2022 10:47:36 +0000 Subject: [PATCH 1/3] Fix module versioning in documentation (#76) --- docs/filesystem.md | 1 + docs/mediastore.md | 7 ++++++- mkdocs.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/filesystem.md b/docs/filesystem.md index ec5157b0..1cbdca72 100644 --- a/docs/filesystem.md +++ b/docs/filesystem.md @@ -1,5 +1,6 @@ --- artifact: "modernstorage-filesystem" +lib_version: "1.0.0-alpha03" --- # FileSystem diff --git a/docs/mediastore.md b/docs/mediastore.md index 0a192d40..b3012ceb 100644 --- a/docs/mediastore.md +++ b/docs/mediastore.md @@ -1,3 +1,8 @@ +--- +artifact: "modernstorage-mediastore" +lib_version: "1.0.0-alpha03" +--- + # MediaStore !!! danger @@ -21,7 +26,7 @@ interactions on API 21+ (Android Lollipop). ```groovy // build.gradle -implementation("com.google.modernstorage:modernstorage-mediastore:{{ lib_version }}") +implementation("com.google.modernstorage:{{ artifact }}:{{ lib_version }}") ``` ## API reference diff --git a/mkdocs.yml b/mkdocs.yml index b2583dbe..146a6e21 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -46,4 +46,4 @@ plugins: - macros extra: - lib_version: "1.0.0-alpha04" + lib_version: "1.0.0-alpha03" From 15ff78f4eb9a86523299a712fad646d51959dfb5 Mon Sep 17 00:00:00 2001 From: Andreas Date: Mon, 17 Jan 2022 13:36:22 +0100 Subject: [PATCH 2/3] Add Bill of Material --- bom/build.gradle.kts | 18 ++++++++++++++++++ bom/gradle.properties | 3 +++ docs/README.md | 15 +++++++++++++++ settings.gradle | 1 + 4 files changed, 37 insertions(+) create mode 100644 bom/build.gradle.kts create mode 100644 bom/gradle.properties diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts new file mode 100644 index 00000000..df2443e4 --- /dev/null +++ b/bom/build.gradle.kts @@ -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 +} diff --git a/bom/gradle.properties b/bom/gradle.properties new file mode 100644 index 00000000..32cf1e0a --- /dev/null +++ b/bom/gradle.properties @@ -0,0 +1,3 @@ +POM_ARTIFACT_ID=modernstorage-bom +POM_NAME=ModernStorage Bill of Material +POM_PACKAGING=jar diff --git a/docs/README.md b/docs/README.md index 31f5c256..467038aa 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/settings.gradle b/settings.gradle index 4bb3db90..a30f3490 100644 --- a/settings.gradle +++ b/settings.gradle @@ -15,6 +15,7 @@ */ rootProject.name = "ModernStorage" +include ':bom' include ':mediastore' include ':filesystem' include ':permissions' From a3cc97ee61d0a11a7216fd53bd3dfa697af65aec Mon Sep 17 00:00:00 2001 From: Andreas Date: Mon, 17 Jan 2022 14:12:12 +0100 Subject: [PATCH 3/3] Fix build Exclude BOM from adding metalava as it doesn't have api/current.api --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 696e80e2..b9caa32c 100644 --- a/build.gradle +++ b/build.gradle @@ -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 {