From e7ead27cb61c0faaf2418f53c1c5a14817cfc301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 13:51:32 +0100 Subject: [PATCH 01/14] Move classpath plugins to toml --- build.gradle | 13 +++++-------- gradle/libs.versions.toml | 12 ++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/build.gradle b/build.gradle index 879877af..31cdedaf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,14 @@ buildscript { - ext { - compose_version = '1.0.2' - } repositories { maven { url "https://plugins.gradle.org/m2/" } google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21" - classpath "io.github.gradle-nexus:publish-plugin:1.1.0" - classpath("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0") + classpath libs.android.gradlePlugin + classpath libs.kotlin.gradlePlugin + classpath libs.nexus.publish + classpath libs.nexus.staging } } apply plugin: 'io.github.gradle-nexus.publish-plugin' @@ -27,4 +24,4 @@ task clean(type: Delete) { delete rootProject.buildDir } -apply from: "${rootDir}/scripts/publish-root.gradle" \ No newline at end of file +apply from: "${rootDir}/scripts/publish-root.gradle" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..9fc6af3d --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,12 @@ +[versions] +gradlePlugin = "7.3.1" +kotlin = "1.7.0" +nexusPublish = "1.1.0" +nexusStaging = "0.22.0" + +[libraries] + +android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin" } +kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexusPublish" } +nexus-staging = { module = "io.codearte.gradle.nexus:gradle-nexus-staging-plugin", version.ref = "nexusStaging" } From 6decc5597f3b8162253134dc53eae7ebd0f517ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 13:53:45 +0100 Subject: [PATCH 02/14] Add settings.gradle.kts --- settings.gradle | 12 ------------ settings.gradle.kts | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 51fbdcd4..00000000 --- a/settings.gradle +++ /dev/null @@ -1,12 +0,0 @@ -plugins { - id "com.gradle.enterprise" version "3.4.1" -} -gradleEnterprise { - buildScan { - termsOfServiceUrl = "https://gradle.com/terms-of-service" - termsOfServiceAgree = "yes" - publishAlways() - } -} -include ':sample', ':barista' -include ':barista-compose' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..ce2e5ecb --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,13 @@ +enableFeaturePreview("VERSION_CATALOGS") + +pluginManagement { + repositories { + google() + mavenCentral() + } +} + +include(":sample") + +include(":taggingviewer") +include(":taggingviewer-no-op") From 66a87d63a1666911b4e492d39a58741cf36983d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 13:54:26 +0100 Subject: [PATCH 03/14] Update gradle --- gradle/wrapper/gradle-wrapper.properties | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f80bbf5..8c035d09 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Sat Dec 03 13:54:10 CET 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME From b07529569e9c74955c097d4ddb59cc0f37dffdb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 13:54:56 +0100 Subject: [PATCH 04/14] Fix settings.gradle.kts --- settings.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index ce2e5ecb..7c523eda 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,5 +9,5 @@ pluginManagement { include(":sample") -include(":taggingviewer") -include(":taggingviewer-no-op") +include(":barista") +include(":barista-compose") From a258a3bb34357a4288db1fda5724503f8a720e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 13:57:42 +0100 Subject: [PATCH 05/14] Make build.gradle compose compile --- barista-compose/build.gradle.kts | 17 +++++++++-------- gradle/libs.versions.toml | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/barista-compose/build.gradle.kts b/barista-compose/build.gradle.kts index 5a90d721..59441cad 100644 --- a/barista-compose/build.gradle.kts +++ b/barista-compose/build.gradle.kts @@ -19,12 +19,13 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments["clearPackageData"] = "true" } - + buildFeatures { compose = true } + composeOptions { - kotlinCompilerExtensionVersion = rootProject.extra["compose_version"] as String + kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } packagingOptions { @@ -38,13 +39,13 @@ dependencies { api("androidx.test.ext:junit:1.1.3") api("androidx.compose.ui:ui-test-junit4:1.0.2") - debugImplementation("androidx.compose.ui:ui:${rootProject.extra["compose_version"]}") - debugImplementation("androidx.compose.material:material:${rootProject.extra["compose_version"]}") - debugImplementation("androidx.compose.ui:ui-tooling-preview:${rootProject.extra["compose_version"]}") + debugImplementation("androidx.compose.ui:ui:${libs.versions.compose.get()}") + debugImplementation("androidx.compose.material:material:${libs.versions.compose.get()}") + debugImplementation("androidx.compose.ui:ui-tooling-preview:${libs.versions.compose.get()}") debugImplementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1") debugImplementation("androidx.activity:activity-compose:1.3.1") - debugImplementation("androidx.compose.ui:ui-test-junit4:${rootProject.extra["compose_version"]}") - debugImplementation("androidx.compose.ui:ui-test-manifest:${rootProject.extra["compose_version"]}") - debugImplementation("androidx.compose.ui:ui-tooling:${rootProject.extra["compose_version"]}") + debugImplementation("androidx.compose.ui:ui-test-junit4:${libs.versions.compose.get()}") + debugImplementation("androidx.compose.ui:ui-test-manifest:${libs.versions.compose.get()}") + debugImplementation("androidx.compose.ui:ui-tooling:${libs.versions.compose.get()}") } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9fc6af3d..f9a7c0c1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,6 +3,8 @@ gradlePlugin = "7.3.1" kotlin = "1.7.0" nexusPublish = "1.1.0" nexusStaging = "0.22.0" +compose = "1.3.1" +composeCompiler = "1.3.2" [libraries] From 212da4c5ba12ae280faee30158304ba72a6cb6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 14:01:03 +0100 Subject: [PATCH 06/14] Move espresso dependencies --- barista/build.gradle.kts | 6 +++--- gradle/libs.versions.toml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/barista/build.gradle.kts b/barista/build.gradle.kts index 147d1f07..4de3fe2a 100644 --- a/barista/build.gradle.kts +++ b/barista/build.gradle.kts @@ -24,10 +24,10 @@ android { } dependencies { - api("androidx.test.espresso:espresso-core:3.4.0") - api("androidx.test.espresso:espresso-contrib:3.4.0") + api(libs.androidx.espresso.core) + api(libs.androidx.espresso.contrib) api("androidx.test.uiautomator:uiautomator:2.2.0") - api("androidx.test.espresso:espresso-intents:3.4.0") + api(libs.androidx.espresso.intents) implementation("androidx.annotation:annotation:1.0.2") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f9a7c0c1..a2d59a3d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,6 +5,7 @@ nexusPublish = "1.1.0" nexusStaging = "0.22.0" compose = "1.3.1" composeCompiler = "1.3.2" +androidXEspresso = "3.4.0" [libraries] @@ -12,3 +13,7 @@ android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexusPublish" } nexus-staging = { module = "io.codearte.gradle.nexus:gradle-nexus-staging-plugin", version.ref = "nexusStaging" } + +androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidXEspresso" } +androidx-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidXEspresso" } +androidx-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidXEspresso" } \ No newline at end of file From af9a66620701469e97036a6fc17f930f7567541e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 14:04:33 +0100 Subject: [PATCH 07/14] Update test dependencies --- barista/build.gradle.kts | 8 ++++---- gradle/libs.versions.toml | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/barista/build.gradle.kts b/barista/build.gradle.kts index 4de3fe2a..2a752a7d 100644 --- a/barista/build.gradle.kts +++ b/barista/build.gradle.kts @@ -24,10 +24,10 @@ android { } dependencies { - api(libs.androidx.espresso.core) - api(libs.androidx.espresso.contrib) - api("androidx.test.uiautomator:uiautomator:2.2.0") - api(libs.androidx.espresso.intents) + api(libs.androidX.test.espresso.core) + api(libs.androidX.test.espresso.contrib) + api(libs.androidX.test.uiAutomator) + api(libs.androidX.test.espresso.intents) implementation("androidx.annotation:annotation:1.0.2") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a2d59a3d..ce30bc81 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,6 +6,7 @@ nexusStaging = "0.22.0" compose = "1.3.1" composeCompiler = "1.3.2" androidXEspresso = "3.4.0" +uiAutomator = "2.2.0" [libraries] @@ -14,6 +15,8 @@ kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", ve nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexusPublish" } nexus-staging = { module = "io.codearte.gradle.nexus:gradle-nexus-staging-plugin", version.ref = "nexusStaging" } -androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidXEspresso" } -androidx-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidXEspresso" } -androidx-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidXEspresso" } \ No newline at end of file +androidX-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidXEspresso" } +androidX-test-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidXEspresso" } +androidX-test-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidXEspresso" } + +androidX-test-uiAutomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiAutomator"} \ No newline at end of file From cdb2d6e285f4c071d5b0773ff6c7e4fafa593933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 14:15:41 +0100 Subject: [PATCH 08/14] Update barista dependencies --- barista/build.gradle.kts | 17 ++++++++--------- gradle/libs.versions.toml | 16 +++++++++++++++- sample/build.gradle.kts | 8 ++++---- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/barista/build.gradle.kts b/barista/build.gradle.kts index 2a752a7d..a1504c31 100644 --- a/barista/build.gradle.kts +++ b/barista/build.gradle.kts @@ -28,15 +28,14 @@ dependencies { api(libs.androidX.test.espresso.contrib) api(libs.androidX.test.uiAutomator) api(libs.androidX.test.espresso.intents) - - - implementation("androidx.annotation:annotation:1.0.2") - implementation("androidx.legacy:legacy-support-core-ui:1.0.0") - implementation("androidx.vectordrawable:vectordrawable-animated:1.0.0") - implementation("androidx.recyclerview:recyclerview:1.0.0") - api("androidx.viewpager2:viewpager2:1.0.0") - - implementation("com.google.android.material:material:1.2.0") + + implementation(libs.androidX.annotation) + implementation(libs.androidX.legacy.support) + implementation(libs.androidX.vectorDrawable.animated) + implementation(libs.androidX.recyclerView) + api(libs.androidX.viewPager2) + + implementation(libs.androidX.material) testImplementation("junit:junit:4.12") testImplementation("pl.pragmatists:JUnitParams:1.1.0") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ce30bc81..12dbb63e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,13 @@ nexusPublish = "1.1.0" nexusStaging = "0.22.0" compose = "1.3.1" composeCompiler = "1.3.2" +androidXAnnotation = "1.0.2" androidXEspresso = "3.4.0" +androidXLegacy = "1.0.0" +androidXMaterial = "1.2.0" +androidXRecyclerView = "1.0.0" +androidXVectorDrawable = "1.0.0" +androidXViewPager2 = "1.0.0" uiAutomator = "2.2.0" [libraries] @@ -15,8 +21,16 @@ kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", ve nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexusPublish" } nexus-staging = { module = "io.codearte.gradle.nexus:gradle-nexus-staging-plugin", version.ref = "nexusStaging" } +androidX-annotation = { module = "androidx.annotation:annotation", version.ref = "androidXAnnotation" } + androidX-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidXEspresso" } androidX-test-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidXEspresso" } androidX-test-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidXEspresso" } +androidX-test-uiAutomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiAutomator" } + +androidX-legacy-support = { module = "androidx.legacy:legacy-support-core-ui", version.ref = "androidXLegacy" } +androidX-material = { module = "com.google.android.material:material", version.ref = "androidXMaterial" } +androidX-recyclerView = { module = "androidx.recyclerview:recyclerview", version.ref = "androidXRecyclerView" } +androidX-vectorDrawable-animated = { module = "androidx.vectordrawable:vectordrawable-animated", version.ref = "androidXVectorDrawable" } -androidX-test-uiAutomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiAutomator"} \ No newline at end of file +androidX-viewPager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidXViewPager2" } \ No newline at end of file diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 1e306bfa..8fe81901 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -32,11 +32,11 @@ android { dependencies { implementation("androidx.legacy:legacy-support-v4:1.0.0") implementation("androidx.appcompat:appcompat:1.0.2") - implementation("androidx.recyclerview:recyclerview:1.0.0") - implementation("com.google.android.material:material:1.2.0") - implementation("androidx.annotation:annotation:1.0.2") + implementation(libs.androidX.recyclerView) + implementation(libs.androidX.material) + implementation(libs.androidX.annotation) implementation("com.github.bumptech.glide:glide:4.10.0") - implementation("com.google.android.material:material:1.2.0") + implementation(libs.androidX.material) implementation("androidx.core:core-ktx:1.0.1") androidTestUtil("androidx.test:orchestrator:1.4.1") From ae84c1dde5796d5b5b9dc07a7ab1f7a05048ec09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 14:22:01 +0100 Subject: [PATCH 09/14] Update barista test dependencies --- barista/build.gradle.kts | 11 ++++++----- gradle/libs.versions.toml | 12 +++++++++++- sample/build.gradle.kts | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/barista/build.gradle.kts b/barista/build.gradle.kts index a1504c31..9fe3edde 100644 --- a/barista/build.gradle.kts +++ b/barista/build.gradle.kts @@ -36,9 +36,10 @@ dependencies { api(libs.androidX.viewPager2) implementation(libs.androidX.material) - - testImplementation("junit:junit:4.12") - testImplementation("pl.pragmatists:JUnitParams:1.1.0") - testImplementation("org.assertj:assertj-core:1.7.0") - testImplementation("org.mockito:mockito-core:2.28.2") + + testImplementation(libs.testing.jUnit) + testImplementation(libs.testing.jUnitParams) + testImplementation(libs.testing.assertJ) + + testImplementation(libs.testing.mockito) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 12dbb63e..ae08f305 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,6 +14,11 @@ androidXVectorDrawable = "1.0.0" androidXViewPager2 = "1.0.0" uiAutomator = "2.2.0" +assertJ = "1.7.0" +jUnit = "4.12" +jUnitParams = "1.1.0" +mockito = "2.28.2" + [libraries] android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin" } @@ -33,4 +38,9 @@ androidX-material = { module = "com.google.android.material:material", version.r androidX-recyclerView = { module = "androidx.recyclerview:recyclerview", version.ref = "androidXRecyclerView" } androidX-vectorDrawable-animated = { module = "androidx.vectordrawable:vectordrawable-animated", version.ref = "androidXVectorDrawable" } -androidX-viewPager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidXViewPager2" } \ No newline at end of file +androidX-viewPager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidXViewPager2" } + +testing-assertJ = { module = "org.assertj:assertj-core", version.ref = "assertJ" } +testing-jUnit = { module = "junit:junit", version.ref = "jUnit" } +testing-jUnitParams = { module = "pl.pragmatists:JUnitParams", version.ref = "jUnitParams" } +testing-mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" } \ No newline at end of file diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 8fe81901..9c44d534 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -46,6 +46,6 @@ dependencies { androidTestImplementation("com.nhaarman:mockito-kotlin:1.5.0") androidTestImplementation("org.mockito:mockito-android:2.28.2") - testImplementation("junit:junit:4.12") + testImplementation(libs.testing.jUnit) } \ No newline at end of file From e5a08c8511b1a143ac2509e9e96e66af919a5e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 14:34:52 +0100 Subject: [PATCH 10/14] Update barista sample dependencies --- barista/build.gradle.kts | 2 +- gradle/libs.versions.toml | 21 +++++++++++++++++---- sample/build.gradle.kts | 18 ++++++++++-------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/barista/build.gradle.kts b/barista/build.gradle.kts index 9fe3edde..b39fccf5 100644 --- a/barista/build.gradle.kts +++ b/barista/build.gradle.kts @@ -41,5 +41,5 @@ dependencies { testImplementation(libs.testing.jUnitParams) testImplementation(libs.testing.assertJ) - testImplementation(libs.testing.mockito) + testImplementation(libs.testing.mockito.core) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ae08f305..9cf231cc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,19 +5,25 @@ nexusPublish = "1.1.0" nexusStaging = "0.22.0" compose = "1.3.1" composeCompiler = "1.3.2" +androidXAppCompat = "1.0.2" androidXAnnotation = "1.0.2" +androidXCore = "1.0.1" androidXEspresso = "3.4.0" androidXLegacy = "1.0.0" androidXMaterial = "1.2.0" +androidXOrchestrator = "1.4.1" androidXRecyclerView = "1.0.0" androidXVectorDrawable = "1.0.0" androidXViewPager2 = "1.0.0" uiAutomator = "2.2.0" -assertJ = "1.7.0" +glide = "4.10.0" + +assertJ = "2.9.1" jUnit = "4.12" jUnitParams = "1.1.0" mockito = "2.28.2" +mockitoKotlin = "1.5.0" [libraries] @@ -26,21 +32,28 @@ kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", ve nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version.ref = "nexusPublish" } nexus-staging = { module = "io.codearte.gradle.nexus:gradle-nexus-staging-plugin", version.ref = "nexusStaging" } -androidX-annotation = { module = "androidx.annotation:annotation", version.ref = "androidXAnnotation" } - androidX-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidXEspresso" } androidX-test-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidXEspresso" } androidX-test-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidXEspresso" } +androidX-test-orchestrator = { module = "androidx.test:orchestrator", version.ref = "androidXOrchestrator" } androidX-test-uiAutomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiAutomator" } +androidX-annotation = { module = "androidx.annotation:annotation", version.ref = "androidXAnnotation" } +androidX-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidXAppCompat" } +androidX-core = { module = "androidx.core:core-ktx", version.ref = "androidXCore" } androidX-legacy-support = { module = "androidx.legacy:legacy-support-core-ui", version.ref = "androidXLegacy" } +androidX-legacy-supportV4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidXLegacy" } androidX-material = { module = "com.google.android.material:material", version.ref = "androidXMaterial" } androidX-recyclerView = { module = "androidx.recyclerview:recyclerview", version.ref = "androidXRecyclerView" } androidX-vectorDrawable-animated = { module = "androidx.vectordrawable:vectordrawable-animated", version.ref = "androidXVectorDrawable" } androidX-viewPager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidXViewPager2" } +glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } + testing-assertJ = { module = "org.assertj:assertj-core", version.ref = "assertJ" } testing-jUnit = { module = "junit:junit", version.ref = "jUnit" } testing-jUnitParams = { module = "pl.pragmatists:JUnitParams", version.ref = "jUnitParams" } -testing-mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" } \ No newline at end of file +testing-mockito-android = { module = "org.mockito:mockito-android", version.ref = "mockito" } +testing-mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } +testing-mockito-kotlin = { module = "com.nhaarman:mockito-kotlin", version.ref = "mockitoKotlin" } \ No newline at end of file diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 9c44d534..43f20a06 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -30,21 +30,23 @@ android { } dependencies { - implementation("androidx.legacy:legacy-support-v4:1.0.0") - implementation("androidx.appcompat:appcompat:1.0.2") + implementation(libs.androidX.legacy.supportV4) + + implementation(libs.androidX.appCompat) implementation(libs.androidX.recyclerView) implementation(libs.androidX.material) implementation(libs.androidX.annotation) - implementation("com.github.bumptech.glide:glide:4.10.0") + + implementation(libs.glide) implementation(libs.androidX.material) - implementation("androidx.core:core-ktx:1.0.1") + implementation(libs.androidX.core) - androidTestUtil("androidx.test:orchestrator:1.4.1") + androidTestUtil(libs.androidX.test.orchestrator) androidTestImplementation(project(":barista")) - androidTestImplementation("org.assertj:assertj-core:2.9.1") - androidTestImplementation("com.nhaarman:mockito-kotlin:1.5.0") - androidTestImplementation("org.mockito:mockito-android:2.28.2") + androidTestImplementation(libs.testing.assertJ) + androidTestImplementation(libs.testing.mockito.kotlin) + androidTestImplementation(libs.testing.mockito.android) testImplementation(libs.testing.jUnit) From ce3d2ad3d2b8201ad63f52a70f41a030713655c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 14:47:02 +0100 Subject: [PATCH 11/14] Update barista-compose dependencies --- barista-compose/build.gradle.kts | 22 +++++++++++----------- gradle/libs.versions.toml | 14 +++++++++++++- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/barista-compose/build.gradle.kts b/barista-compose/build.gradle.kts index 59441cad..b819e2a3 100644 --- a/barista-compose/build.gradle.kts +++ b/barista-compose/build.gradle.kts @@ -36,16 +36,16 @@ android { } dependencies { - api("androidx.test.ext:junit:1.1.3") - api("androidx.compose.ui:ui-test-junit4:1.0.2") - - debugImplementation("androidx.compose.ui:ui:${libs.versions.compose.get()}") - debugImplementation("androidx.compose.material:material:${libs.versions.compose.get()}") - debugImplementation("androidx.compose.ui:ui-tooling-preview:${libs.versions.compose.get()}") - debugImplementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1") - debugImplementation("androidx.activity:activity-compose:1.3.1") - debugImplementation("androidx.compose.ui:ui-test-junit4:${libs.versions.compose.get()}") - debugImplementation("androidx.compose.ui:ui-test-manifest:${libs.versions.compose.get()}") - debugImplementation("androidx.compose.ui:ui-tooling:${libs.versions.compose.get()}") + api(libs.androidX.test.junit) + api(libs.androidX.compose.test.ui.junit4) + + debugImplementation(libs.androidX.compose.ui.ui) + debugImplementation(libs.androidX.compose.material) + debugImplementation(libs.androidX.compose.ui.tooling.preview) + debugImplementation(libs.androidX.compose.ui.tooling.core) + debugImplementation(libs.androidX.compose.test.ui.manifest) + + debugImplementation(libs.androidX.lifecycle) + debugImplementation(libs.androidX.activity.compose) } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9cf231cc..95e1769a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,7 +9,9 @@ androidXAppCompat = "1.0.2" androidXAnnotation = "1.0.2" androidXCore = "1.0.1" androidXEspresso = "3.4.0" +androidXJUnit = "1.1.3" androidXLegacy = "1.0.0" +androidXLifecycle = "2.3.1" androidXMaterial = "1.2.0" androidXOrchestrator = "1.4.1" androidXRecyclerView = "1.0.0" @@ -35,20 +37,30 @@ nexus-staging = { module = "io.codearte.gradle.nexus:gradle-nexus-staging-plugin androidX-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidXEspresso" } androidX-test-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "androidXEspresso" } androidX-test-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidXEspresso" } +androidX-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidXJUnit" } androidX-test-orchestrator = { module = "androidx.test:orchestrator", version.ref = "androidXOrchestrator" } androidX-test-uiAutomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "uiAutomator" } +androidX-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "compose" } androidX-annotation = { module = "androidx.annotation:annotation", version.ref = "androidXAnnotation" } androidX-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidXAppCompat" } androidX-core = { module = "androidx.core:core-ktx", version.ref = "androidXCore" } androidX-legacy-support = { module = "androidx.legacy:legacy-support-core-ui", version.ref = "androidXLegacy" } androidX-legacy-supportV4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidXLegacy" } +androidX-lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidXLifecycle" } androidX-material = { module = "com.google.android.material:material", version.ref = "androidXMaterial" } androidX-recyclerView = { module = "androidx.recyclerview:recyclerview", version.ref = "androidXRecyclerView" } androidX-vectorDrawable-animated = { module = "androidx.vectordrawable:vectordrawable-animated", version.ref = "androidXVectorDrawable" } - androidX-viewPager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidXViewPager2" } +androidX-compose-ui-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } +androidX-compose-ui-tooling-core = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" } +androidX-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" } +androidX-compose-material = { module = "androidx.compose.material:material", version.ref = "compose" } + +androidX-compose-test-ui-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" } +androidX-compose-test-ui-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "compose" } + glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } testing-assertJ = { module = "org.assertj:assertj-core", version.ref = "assertJ" } From f4362685b1322f35db8829597dcd620060ff0e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sat, 3 Dec 2022 14:49:08 +0100 Subject: [PATCH 12/14] Update android SDK versions --- barista-compose/build.gradle.kts | 4 ++-- barista/build.gradle.kts | 6 +++--- sample/build.gradle.kts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/barista-compose/build.gradle.kts b/barista-compose/build.gradle.kts index b819e2a3..7b2c3ca3 100644 --- a/barista-compose/build.gradle.kts +++ b/barista-compose/build.gradle.kts @@ -10,11 +10,11 @@ ext["PUBLISH_ARTIFACT_ID"] = "barista-compose" apply(from = "${rootProject.projectDir}/scripts/publish-module.gradle") android { - compileSdk = 31 + compileSdk = 33 defaultConfig { minSdk = 21 - targetSdk = 31 + targetSdk = 33 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments["clearPackageData"] = "true" diff --git a/barista/build.gradle.kts b/barista/build.gradle.kts index b39fccf5..59d3e72e 100644 --- a/barista/build.gradle.kts +++ b/barista/build.gradle.kts @@ -10,11 +10,11 @@ ext["PUBLISH_ARTIFACT_ID"] = "barista" apply(from = "${rootProject.projectDir}/scripts/publish-module.gradle") android { - compileSdk = 30 + compileSdk = 33 defaultConfig { - minSdk = 19 - targetSdk = 30 + minSdk = 21 + targetSdk = 33 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 43f20a06..ec3fba66 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -7,11 +7,11 @@ plugins { apply(from = "../config/android-quality.gradle") android { - compileSdk = 30 + compileSdk = 33 defaultConfig { minSdk = 21 - targetSdk = 30 + targetSdk = 33 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments["clearPackageData"] = "true" From 0914a8228b97b5691767fa60829c4d22f5018c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sun, 4 Dec 2022 11:41:46 +0100 Subject: [PATCH 13/14] Update kotlin --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 95e1769a..f8247d92 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] gradlePlugin = "7.3.1" -kotlin = "1.7.0" +kotlin = "1.7.20" nexusPublish = "1.1.0" nexusStaging = "0.22.0" compose = "1.3.1" From 5cd2ad515746808e6386bcfa979dc4b73de2c3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A1s?= Date: Sun, 4 Dec 2022 11:43:29 +0100 Subject: [PATCH 14/14] Update manifest --- sample/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 54c04898..56a82883 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -51,7 +51,7 @@ - +