diff --git a/build.gradle.kts b/build.gradle.kts index 5d5719a..52080af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,8 @@ // 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 - kotlin("android") version "1.6.21" 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.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..a22e9d7 100644 --- a/buildSrc/src/main/kotlin/Configuration.kt +++ b/buildSrc/src/main/kotlin/Configuration.kt @@ -15,15 +15,15 @@ */ 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 - 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" 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 0ec051f..2638505 100644 --- a/bulletin/build.gradle.kts +++ b/bulletin/build.gradle.kts @@ -60,7 +60,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion = Versions.composeVersion + kotlinCompilerExtensionVersion = Versions.composeCompilerVersion } } @@ -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/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") } 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 } } 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