From db555ed78c23c8c4b2efcaebb19c6594db9b6f24 Mon Sep 17 00:00:00 2001 From: tobianoapps <14228120+sebastinto@users.noreply.github.com> Date: Sun, 11 Sep 2022 14:16:11 -0400 Subject: [PATCH 1/5] move data generator utils and dependency to sample module --- bulletin/build.gradle.kts | 3 --- .../com/tobianoapps/sample/components/SampleCustomBulletin.kt | 2 +- .../sample/components/SampleDialogContentBulletin.kt | 2 +- .../main/kotlin/com/tobianoapps/sample}/util/DataGenerators.kt | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) rename {bulletin/src/main/kotlin/com/tobianoapps/bulletin => sample/src/main/kotlin/com/tobianoapps/sample}/util/DataGenerators.kt (98%) diff --git a/bulletin/build.gradle.kts b/bulletin/build.gradle.kts index 0ec051f..2846c06 100644 --- a/bulletin/build.gradle.kts +++ b/bulletin/build.gradle.kts @@ -77,9 +77,6 @@ dependencies { implementation(platform(okhttpBom)) implementation(okhttp) - /*** Text Generator ***/ - implementation(loremKotlinum) - /*** JAVA 8+ APIS ANDROID SDK < 26 ***/ coreLibraryDesugaring(desugar) diff --git a/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleCustomBulletin.kt b/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleCustomBulletin.kt index 5bb52e0..4c2cf89 100644 --- a/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleCustomBulletin.kt +++ b/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleCustomBulletin.kt @@ -34,7 +34,7 @@ import androidx.compose.ui.unit.sp import com.tobianoapps.bulletin.components.BulletinScreen import com.tobianoapps.bulletin.util.capitalized import com.tobianoapps.bulletin.util.forceShowSnackbar -import com.tobianoapps.bulletin.util.generateRandomBulletin +import com.tobianoapps.sample.util.generateRandomBulletin import com.tobianoapps.sample.data.customBulletinConfig import com.tobianoapps.sample.data.customShape import kotlinx.coroutines.launch diff --git a/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleDialogContentBulletin.kt b/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleDialogContentBulletin.kt index ef0870e..03f39a3 100644 --- a/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleDialogContentBulletin.kt +++ b/sample/src/main/kotlin/com/tobianoapps/sample/components/SampleDialogContentBulletin.kt @@ -35,7 +35,7 @@ import androidx.compose.ui.unit.dp import com.tobianoapps.bulletin.components.BulletinScreen import com.tobianoapps.bulletin.data.config.BulletinConfig import com.tobianoapps.bulletin.util.allCaps -import com.tobianoapps.bulletin.util.generateRandomBulletin +import com.tobianoapps.sample.util.generateRandomBulletin @Composable fun SampleDialogContentBulletin( diff --git a/bulletin/src/main/kotlin/com/tobianoapps/bulletin/util/DataGenerators.kt b/sample/src/main/kotlin/com/tobianoapps/sample/util/DataGenerators.kt similarity index 98% rename from bulletin/src/main/kotlin/com/tobianoapps/bulletin/util/DataGenerators.kt rename to sample/src/main/kotlin/com/tobianoapps/sample/util/DataGenerators.kt index 211fb7a..64df3f4 100644 --- a/bulletin/src/main/kotlin/com/tobianoapps/bulletin/util/DataGenerators.kt +++ b/sample/src/main/kotlin/com/tobianoapps/sample/util/DataGenerators.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.tobianoapps.bulletin.util +package com.tobianoapps.sample.util import com.tobianoapps.bulletin.data.* import cz.quanti.quase.loremkotlinum.Lorem From 0b411e8248da97e806c82f46045c3da086212da4 Mon Sep 17 00:00:00 2001 From: tobianoapps <14228120+sebastinto@users.noreply.github.com> Date: Sun, 11 Sep 2022 14:23:18 -0400 Subject: [PATCH 2/5] update AGP --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5d5719a..cf68095 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "7.2.1" apply false - id("com.android.library") version "7.2.1" apply false + id("com.android.application") version "7.2.2" apply false + id("com.android.library") version "7.2.2" apply false kotlin("android") version "1.6.21" apply false id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } From 9a64b3b3078d7d1e27eb4cc76edea4484a6adca0 Mon Sep 17 00:00:00 2001 From: tobianoapps <14228120+sebastinto@users.noreply.github.com> Date: Sun, 11 Sep 2022 14:38:09 -0400 Subject: [PATCH 3/5] dependency updates --- build.gradle.kts | 2 +- buildSrc/src/main/kotlin/Configuration.kt | 4 ++-- buildSrc/src/main/kotlin/Dependencies.kt | 23 ++++++++++++----------- bulletin/build.gradle.kts | 2 +- sample/build.gradle.kts | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index cf68095..52080af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("com.android.application") version "7.2.2" apply false id("com.android.library") version "7.2.2" apply false - kotlin("android") version "1.6.21" apply false + kotlin("android") version "1.7.10" apply false id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } diff --git a/buildSrc/src/main/kotlin/Configuration.kt b/buildSrc/src/main/kotlin/Configuration.kt index c87011e..434a016 100644 --- a/buildSrc/src/main/kotlin/Configuration.kt +++ b/buildSrc/src/main/kotlin/Configuration.kt @@ -15,8 +15,8 @@ */ object Configuration { - const val compileSdk = 31 - const val targetSdk = 31 + const val compileSdk = 33 + const val targetSdk = 33 const val minSdk = 21 private const val majorVersion = 1 private const val minorVersion = 0 diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 3b08ead..223995f 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -23,14 +23,15 @@ import Versions.materialVersion import Versions.okhttpVersion object Versions { - internal const val activityComposeVersion = "1.2.0-alpha08" - internal const val composeNavigationVersion = "2.5.0-beta01" - const val composeVersion = "1.2.0-beta02" - internal const val okhttpVersion = "4.9.3" + internal const val activityComposeVersion = "1.5.1" + internal const val composeNavigationVersion = "2.5.1" + internal const val composeVersion = "1.2.1" + const val composeCompilerVersion = "1.3.1" + internal const val okhttpVersion = "4.10.0" - const val materialVersion = "1.7.0-alpha01" - const val appcompatVersion = "1.4.1" - const val constraintLayoutVersion = "2.1.3" + const val materialVersion = "1.7.0-beta01" + const val appcompatVersion = "1.5.0" + const val constraintLayoutVersion = "2.1.4" } object Dependencies { @@ -41,7 +42,7 @@ object Dependencies { const val composeTooling = "androidx.compose.ui:ui-tooling:$composeVersion" const val composeToolingPreview = "androidx.compose.ui:ui-tooling-preview:$composeVersion" - const val coreKtx = "androidx.core:core-ktx:1.7.0" + const val coreKtx = "androidx.core:core-ktx:1.8.0" /* OkHttp */ const val okhttpBom = "com.squareup.okhttp3:okhttp-bom:$okhttpVersion" @@ -64,8 +65,8 @@ object Dependencies { const val testJunit = "junit:junit:4.13.2" const val testTruth = "com.google.truth:truth:1.1.3" const val testJson = "org.json:json:20220320" - const val testCoroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.2" - const val mockitoCore = "org.mockito:mockito-core:4.6.0" + const val testCoroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4" + const val mockitoCore = "org.mockito:mockito-core:4.8.0" const val mockitoKotlin = "com.nhaarman:mockito-kotlin:1.6.0" - const val mockWebServer = "com.squareup.okhttp3:mockwebserver:4.9.3" + const val mockWebServer = "com.squareup.okhttp3:mockwebserver:4.10.0" } diff --git a/bulletin/build.gradle.kts b/bulletin/build.gradle.kts index 2846c06..2638505 100644 --- a/bulletin/build.gradle.kts +++ b/bulletin/build.gradle.kts @@ -60,7 +60,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion = Versions.composeVersion + kotlinCompilerExtensionVersion = Versions.composeCompilerVersion } } diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 072c194..60b19e0 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -70,7 +70,7 @@ android { compose = true } composeOptions { - kotlinCompilerExtensionVersion = Versions.composeVersion + kotlinCompilerExtensionVersion = Versions.composeCompilerVersion } } From 47891d54f3c01b16cf6b2b7c66da0560f8ffc4f4 Mon Sep 17 00:00:00 2001 From: tobianoapps <14228120+sebastinto@users.noreply.github.com> Date: Sun, 11 Sep 2022 14:45:14 -0400 Subject: [PATCH 4/5] fix unit test output changes with current location --- .../kotlin/com/tobianoapps/bulletin/util/ExtensionsTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bulletin/src/test/kotlin/com/tobianoapps/bulletin/util/ExtensionsTest.kt b/bulletin/src/test/kotlin/com/tobianoapps/bulletin/util/ExtensionsTest.kt index 137a61f..4f59889 100644 --- a/bulletin/src/test/kotlin/com/tobianoapps/bulletin/util/ExtensionsTest.kt +++ b/bulletin/src/test/kotlin/com/tobianoapps/bulletin/util/ExtensionsTest.kt @@ -28,6 +28,7 @@ import java.util.* class ExtensionsTest { private val epochMillis = 1646113134534L + private val textZoneId = ZoneId.of("America/Chicago") private val new = Change(changeType = NEW, summary = "new") private val fixed = Change(changeType = FIXED, summary = "fixed") @@ -110,7 +111,7 @@ class ExtensionsTest { @Test fun `localDate extensions without param return correct LocalDate`() { Truth - .assertThat(epochMillis.localDate()) + .assertThat(epochMillis.localDate(zoneId = textZoneId)) .isEqualTo("Feb 28, 2022") } From cebfdb4802b6f12e02f118ca20503fc6b6966ae4 Mon Sep 17 00:00:00 2001 From: tobianoapps <14228120+sebastinto@users.noreply.github.com> Date: Sun, 11 Sep 2022 16:12:52 -0400 Subject: [PATCH 5/5] update version codes --- buildSrc/src/main/kotlin/Configuration.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/Configuration.kt b/buildSrc/src/main/kotlin/Configuration.kt index 434a016..a22e9d7 100644 --- a/buildSrc/src/main/kotlin/Configuration.kt +++ b/buildSrc/src/main/kotlin/Configuration.kt @@ -20,10 +20,10 @@ object Configuration { const val minSdk = 21 private const val majorVersion = 1 private const val minorVersion = 0 - private const val patchVersion = 2 + private const val patchVersion = 3 private const val qualifier = "" const val versionName = "$majorVersion.$minorVersion.$patchVersion$qualifier" - const val sampleVersionCode = 2 + const val sampleVersionCode = 3 const val sampleVersionName = "$majorVersion.$minorVersion.$patchVersion" const val groupId = "com.tobianoapps" const val artifactId = "bulletin"