From d0550acdfe3deb9b4e19f02f520401d4bfa3a42a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jc=20Mi=C3=B1arro?= Date: Tue, 24 Dec 2024 15:43:49 +0100 Subject: [PATCH 1/2] Migrate to Version Catalog and Gradle Kotlin DSL --- build.gradle | 137 ---------- build.gradle.kts | 105 ++++++++ buildSrc/build.gradle.kts | 42 ++- .../io/getstream/chat/android/Dependencies.kt | 33 +-- gradle/libs.versions.toml | 243 ++++++++++++++++++ scripts/sample-app-versioner.gradle | 1 - settings.gradle | 110 -------- settings.gradle.kts | 152 +++++++++++ .../build.gradle.kts | 29 +-- .../build.gradle.kts | 17 +- stream-chat-android-client-test/build.gradle | 69 ----- .../build.gradle.kts | 73 ++++++ .../proguard-rules.pro | 2 +- stream-chat-android-client/build.gradle | 138 ---------- stream-chat-android-client/build.gradle.kts | 147 +++++++++++ stream-chat-android-client/proguard-rules.pro | 2 +- .../build.gradle | 164 ------------ .../build.gradle.kts | 178 +++++++++++++ .../proguard-rules.pro | 2 +- stream-chat-android-compose/build.gradle | 119 --------- stream-chat-android-compose/build.gradle.kts | 123 +++++++++ .../proguard-rules.pro | 2 +- stream-chat-android-core/build.gradle | 57 ---- stream-chat-android-core/build.gradle.kts | 61 +++++ stream-chat-android-docs/build.gradle | 111 -------- stream-chat-android-docs/build.gradle.kts | 118 +++++++++ stream-chat-android-e2e-test/build.gradle | 31 --- stream-chat-android-e2e-test/build.gradle.kts | 33 +++ .../proguard-rules.pro | 2 +- .../build.gradle | 51 ---- .../build.gradle.kts | 53 ++++ stream-chat-android-offline/build.gradle | 130 ---------- stream-chat-android-offline/build.gradle.kts | 150 +++++++++++ .../proguard-rules.pro | 2 +- .../build.gradle.kts | 7 +- stream-chat-android-state/build.gradle | 117 --------- stream-chat-android-state/build.gradle.kts | 121 +++++++++ stream-chat-android-state/proguard-rules.pro | 2 +- stream-chat-android-test/build.gradle | 34 --- stream-chat-android-test/build.gradle.kts | 35 +++ stream-chat-android-ui-common/build.gradle | 112 -------- .../build.gradle.kts | 119 +++++++++ .../build.gradle | 175 ------------- .../build.gradle.kts | 190 ++++++++++++++ .../proguard-rules.pro | 2 +- .../build.gradle | 107 -------- .../build.gradle.kts | 116 +++++++++ .../proguard-rules.pro | 2 +- stream-chat-android-ui-guides/build.gradle | 69 ----- .../build.gradle.kts | 71 +++++ .../proguard-rules.pro | 2 +- stream-chat-android-ui-uitests/build.gradle | 106 -------- .../build.gradle.kts | 108 ++++++++ .../proguard-rules.pro | 2 +- stream-chat-android-ui-utils/build.gradle | 76 ------ stream-chat-android-ui-utils/build.gradle.kts | 87 +++++++ 56 files changed, 2371 insertions(+), 1976 deletions(-) delete mode 100644 build.gradle create mode 100644 build.gradle.kts create mode 100644 gradle/libs.versions.toml delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts delete mode 100644 stream-chat-android-client-test/build.gradle create mode 100644 stream-chat-android-client-test/build.gradle.kts delete mode 100644 stream-chat-android-client/build.gradle create mode 100644 stream-chat-android-client/build.gradle.kts delete mode 100644 stream-chat-android-compose-sample/build.gradle create mode 100644 stream-chat-android-compose-sample/build.gradle.kts delete mode 100644 stream-chat-android-compose/build.gradle create mode 100644 stream-chat-android-compose/build.gradle.kts delete mode 100644 stream-chat-android-core/build.gradle create mode 100644 stream-chat-android-core/build.gradle.kts delete mode 100644 stream-chat-android-docs/build.gradle create mode 100644 stream-chat-android-docs/build.gradle.kts delete mode 100644 stream-chat-android-e2e-test/build.gradle create mode 100644 stream-chat-android-e2e-test/build.gradle.kts delete mode 100644 stream-chat-android-markdown-transformer/build.gradle create mode 100644 stream-chat-android-markdown-transformer/build.gradle.kts delete mode 100644 stream-chat-android-offline/build.gradle create mode 100644 stream-chat-android-offline/build.gradle.kts delete mode 100644 stream-chat-android-state/build.gradle create mode 100644 stream-chat-android-state/build.gradle.kts delete mode 100644 stream-chat-android-test/build.gradle create mode 100644 stream-chat-android-test/build.gradle.kts delete mode 100644 stream-chat-android-ui-common/build.gradle create mode 100644 stream-chat-android-ui-common/build.gradle.kts delete mode 100644 stream-chat-android-ui-components-sample/build.gradle create mode 100644 stream-chat-android-ui-components-sample/build.gradle.kts delete mode 100644 stream-chat-android-ui-components/build.gradle create mode 100644 stream-chat-android-ui-components/build.gradle.kts delete mode 100644 stream-chat-android-ui-guides/build.gradle create mode 100644 stream-chat-android-ui-guides/build.gradle.kts delete mode 100644 stream-chat-android-ui-uitests/build.gradle create mode 100644 stream-chat-android-ui-uitests/build.gradle.kts delete mode 100644 stream-chat-android-ui-utils/build.gradle create mode 100644 stream-chat-android-ui-utils/build.gradle.kts diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 5c1369038ff..00000000000 --- a/build.gradle +++ /dev/null @@ -1,137 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.command.changelog.plugin.ChangelogReleaseSectionPlugin -import io.getstream.chat.android.command.release.plugin.ReleasePlugin -import io.getstream.chat.android.command.unittest.plugin.UnitTestsPlugin -import io.getstream.chat.android.command.version.plugin.VersionBumpPlugin -import io.getstream.chat.android.command.version.plugin.MinorBumpPlugin -import io.getstream.chat.android.command.version.plugin.VersionPrintPlugin -import io.getstream.chat.android.command.changelog.plugin.ChangelogAddModelSectionPlugin - -apply plugin: "com.github.ben-manes.versions" -apply plugin: 'io.github.gradle-nexus.publish-plugin' -apply plugin: 'binary-compatibility-validator' -apply plugin: 'org.jetbrains.dokka' -apply from: "${rootDir}/scripts/sample-app-versioner.gradle" -apply plugin: UnitTestsPlugin -apply plugin: ReleasePlugin -apply plugin: ChangelogReleaseSectionPlugin -apply plugin: VersionBumpPlugin -apply plugin: MinorBumpPlugin -apply plugin: VersionPrintPlugin -apply plugin: ChangelogAddModelSectionPlugin - -buildscript { - repositories { - // fetch plugins from google maven (https://maven.google.com) - google() { - content { - includeGroupByRegex("androidx\\..*") - includeGroupByRegex("com\\.android(\\..*|)") - includeGroupByRegex("com\\.google\\.android\\..*") - includeGroupByRegex("com\\.google\\.firebase(\\..*|)") - includeGroupByRegex("com\\.google\\.gms(\\..*|)") - includeGroupByRegex("com\\.google\\.mlkit") - includeGroupByRegex("com\\.google\\.oboe") - includeGroupByRegex("com\\.google\\.prefab") - includeGroupByRegex("com\\.google\\.testing\\.platform") - } - mavenContent { - releasesOnly() - } - } - - maven { - url "https://jitpack.io" - content { - includeModule("com.github.passsy", "gradle-gitVersioner-plugin") - } - } - - // fetch plugins from gradle plugin portal (https://plugins.gradle.org) - gradlePluginPortal() - - // Fallback for the rest of the dependencies - mavenCentral() - } - - dependencies { - classpath Dependencies.androidGradlePlugin - classpath Dependencies.kotlinGradlePlugin - classpath Dependencies.composeCompilerPlugin - classpath Dependencies.googleServicesPlugin - classpath Dependencies.androidJunit5GradlePlugin - classpath Dependencies.gitversionerPlugin - classpath Dependencies.firebaseCrashlyticsPlugin - classpath Dependencies.gradleVersionsPlugin - classpath Dependencies.navigationSafeArgsGradlePlugin - classpath Dependencies.gradleNexusPublishPlugin - classpath Dependencies.paparazziPlugin - classpath Dependencies.baselineProfilePlugin - classpath Dependencies.dokka - classpath Dependencies.kotlinBinaryValidator - classpath Dependencies.shot - classpath Dependencies.spotlessGradlePlugin - classpath Dependencies.ksp - classpath Dependencies.detektPlugin - } -} - -subprojects { - if (it.name != 'stream-chat-android-docs' - && it.buildFile.exists()) { - apply from: "${rootDir}/spotless/spotless.gradle" - } - apply plugin: "io.gitlab.arturbosch.detekt" -} - -versionPrint { - printFilePath = "build/tmp/temp-version" -} - -unitTestDebugScript { - outputPath = "build/tmp/unit-tests-command.sh" -} - -releaseScript { - changelogPath = "CHANGELOG.md" -} - -changelogReleaseSection { - changelogPath = "CHANGELOG.md" -} - -changelogAddModelSection { - changelogPath = "CHANGELOG.md" - changelogModel = "CHANGELOG_MODEL.md" -} - -task clean(type: Delete) { - delete rootProject.buildDir -} - -dependencyUpdates { - rejectVersionIf { - Dependencies.isStable(it.currentVersion) && Dependencies.isNonStable(it.candidate.version) - } -} - -apiValidation { - ignoredPackages += [ - 'com/getstream/sdk/chat/databinding', - 'io/getstream/chat/android/ui/databinding', - ] - - ignoredProjects += [ - 'stream-chat-android-docs', - 'stream-chat-android-ui-components-sample', - 'stream-chat-android-test', - 'stream-chat-android-compose-sample', - 'stream-chat-android-ui-guides', - ] - - nonPublicMarkers += [ - 'io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] -} - -apply from: "${rootDir}/scripts/publish-root.gradle" diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000000..a2af8c4bc4d --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,105 @@ +import io.getstream.chat.android.Dependencies +import io.getstream.chat.android.command.changelog.plugin.ChangelogReleaseSectionPlugin +import io.getstream.chat.android.command.changelog.task.ChangelogReleaseSectionTask +import io.getstream.chat.android.command.changelog.task.ChangelogAddModelSectionTask +import io.getstream.chat.android.command.release.plugin.ReleasePlugin +import io.getstream.chat.android.command.release.task.ReleaseTask +import io.getstream.chat.android.command.unittest.plugin.UnitTestsPlugin +import io.getstream.chat.android.command.unittest.task.UnitTestsTask +import io.getstream.chat.android.command.version.plugin.VersionBumpPlugin +import io.getstream.chat.android.command.version.plugin.MinorBumpPlugin +import io.getstream.chat.android.command.version.plugin.VersionPrintPlugin +import io.getstream.chat.android.command.version.task.VersionPrintTask +import io.getstream.chat.android.command.changelog.plugin.ChangelogAddModelSectionPlugin +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask + +plugins { + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.android.test) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.kotlin.parcelize) apply false + alias(libs.plugins.kotlin.compose) apply false + alias(libs.plugins.androidx.baseline.profile) apply false + alias(libs.plugins.ksp) apply false + alias(libs.plugins.android.junit5) apply false + alias(libs.plugins.paparazzi) apply false + alias(libs.plugins.google.services) apply false + alias(libs.plugins.firebase.crashlytics) apply false + alias(libs.plugins.spotless) apply false + alias(libs.plugins.detekt) apply false + alias(libs.plugins.shot) apply false + alias(libs.plugins.androidx.navigation) apply false + id("io.getstream.chat.UnitTestsPlugin") + id("io.getstream.chat.ReleasePlugin") + id("io.getstream.chat.ChangelogReleaseSectionPlugin") + id("io.getstream.chat.VersionBumpPlugin") + id("io.getstream.chat.MinorBumpPlugin") + id("io.getstream.chat.VersionPrintPlugin") + id("io.getstream.chat.ChangelogAddModelSectionPlugin") + alias(libs.plugins.gitversioner) + alias(libs.plugins.gradle.versions) + alias(libs.plugins.nexus.publish) + alias(libs.plugins.binary.compatibility.validator) + alias(libs.plugins.dokka) +} + +apply(from = "${rootDir}/scripts/sample-app-versioner.gradle") + +subprojects { + if (name != "stream-chat-android-docs" + && buildFile.exists()) { + apply(from = "${rootDir}/spotless/spotless.gradle") + } + apply(plugin = "io.gitlab.arturbosch.detekt") +} + +tasks.withType { + rejectVersionIf { + Dependencies.isStable(currentVersion) && Dependencies.isNonStable(candidate.version) + } +} + +tasks.withType { + config.printFilePath = "build/tmp/temp-version" +} + +tasks.withType { + config.outputPath = "build/tmp/unit-tests-command.sh" +} + +tasks.withType { + config.changelogPath = "CHANGELOG.md" +} + +tasks.withType { + config.changelogPath = "CHANGELOG.md" +} + +tasks.withType { + config.changelogPath = "CHANGELOG.md" + config.changelogModel = "CHANGELOG_MODEL.md" +} + +tasks.withType { + delete(rootProject.layout.buildDirectory) +} + +apiValidation { + ignoredPackages.add("com/getstream/sdk/chat/databinding") + ignoredPackages.add("io/getstream/chat/android/ui/databinding") + + ignoredProjects += listOf( + "stream-chat-android-docs", + "stream-chat-android-ui-components-sample", + "stream-chat-android-test", + "stream-chat-android-compose-sample", + "stream-chat-android-ui-guides", + ) + + nonPublicMarkers += listOf( + "io.getstream.chat.android.core.internal.InternalStreamChatApi", + ) +} + +apply(from = "${rootDir}/scripts/publish-root.gradle") diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 5f0ac5e8318..e225dc00c82 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -6,6 +6,46 @@ repositories { mavenCentral() } +gradlePlugin { + plugins { + create("UnitTestsPlugin") { + id = "io.getstream.chat.UnitTestsPlugin" + implementationClass = "io.getstream.chat.android.command.unittest.plugin.UnitTestsPlugin" + version = "1.0.0" + } + create("ReleasePlugin") { + id = "io.getstream.chat.ReleasePlugin" + implementationClass = "io.getstream.chat.android.command.release.plugin.ReleasePlugin" + version = "1.0.0" + } + create("ChangelogReleaseSectionPlugin") { + id = "io.getstream.chat.ChangelogReleaseSectionPlugin" + implementationClass = "io.getstream.chat.android.command.changelog.plugin.ChangelogReleaseSectionPlugin" + version = "1.0.0" + } + create("VersionBumpPlugin") { + id = "io.getstream.chat.VersionBumpPlugin" + implementationClass = "io.getstream.chat.android.command.version.plugin.VersionBumpPlugin" + version = "1.0.0" + } + create("MinorBumpPlugin") { + id = "io.getstream.chat.MinorBumpPlugin" + implementationClass = "io.getstream.chat.android.command.version.plugin.MinorBumpPlugin" + version = "1.0.0" + } + create("VersionPrintPlugin") { + id = "io.getstream.chat.VersionPrintPlugin" + implementationClass = "io.getstream.chat.android.command.version.plugin.VersionPrintPlugin" + version = "1.0.0" + } + create("ChangelogAddModelSectionPlugin") { + id = "io.getstream.chat.ChangelogAddModelSectionPlugin" + implementationClass = "io.getstream.chat.android.command.changelog.plugin.ChangelogAddModelSectionPlugin" + version = "1.0.0" + } + } +} + dependencies { - implementation("com.squareup.moshi:moshi-kotlin:1.13.0") + implementation("com.squareup.moshi:moshi-kotlin:1.15.1") } diff --git a/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt b/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt index 011b32d6f93..2097a8320c4 100644 --- a/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt +++ b/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt @@ -92,8 +92,7 @@ object Versions { object Dependencies { const val androidGradlePlugin = "com.android.tools.build:gradle:${Versions.ANDROID_GRADLE_PLUGIN}" - const val androidJunit5GradlePlugin = - "de.mannodermaus.gradle.plugins:android-junit5:${Versions.ANDROID_JUNIT5_GRADLE_PLUGIN}" + const val androidJunit5GradlePlugin = "de.mannodermaus.gradle.plugins:android-junit5:${Versions.ANDROID_JUNIT5_GRADLE_PLUGIN}" const val androidLegacySupport = "androidx.legacy:legacy-support-v4:${Versions.ANDROID_LEGACY_SUPPORT}" const val androidxActivityKtx = "androidx.activity:activity-ktx:${Versions.ANDROIDX_ACTIVITY_KTX}" const val androidxAnnotations = "androidx.annotation:annotation:${Versions.ANDROIDX_ANNOTATIONS}" @@ -103,8 +102,7 @@ object Dependencies { const val androidxFragmentKtx = "androidx.fragment:fragment-ktx:${Versions.ANDROIDX_FRAGMENT}" const val androidxLifecycleProcess = "androidx.lifecycle:lifecycle-process:${Versions.ANDROIDX_LIFECYCLE}" const val androidxLifecycleLiveDataKtx = "androidx.lifecycle:lifecycle-livedata-ktx:${Versions.ANDROIDX_LIFECYCLE}" - const val androidxLifecycleViewModelKtx = - "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.ANDROIDX_LIFECYCLE}" + const val androidxLifecycleViewModelKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.ANDROIDX_LIFECYCLE}" const val androidxPreferences = "androidx.preference:preference:${Versions.ANDROIDX_PREFERENCES}" const val androidxRecyclerview = "androidx.recyclerview:recyclerview:${Versions.ANDROIDX_RECYCLERVIEW}" const val androidxStartup = "androidx.startup:startup-runtime:${Versions.ANDROIDX_STARTUP}" @@ -119,8 +117,7 @@ object Dependencies { const val androidxTestJunitKtx = "androidx.test.ext:junit-ktx:${Versions.ANDROIDX_TEST_JUNIT}" const val androidxViewPager2 = "androidx.viewpager2:viewpager2:${Versions.ANDROIDX_VIEW_PAGER_2}" const val baseProfile = "androidx.profileinstaller:profileinstaller:${Versions.BASE_PROFILE}" - const val baselineProfilePlugin = - "androidx.benchmark:benchmark-baseline-profile-gradle-plugin:${Versions.MACRO_BENCHMARK}" + const val baselineProfilePlugin = "androidx.benchmark:benchmark-baseline-profile-gradle-plugin:${Versions.MACRO_BENCHMARK}" const val coil = "io.coil-kt:coil:${Versions.COIL}" const val coilGif = "io.coil-kt:coil-gif:${Versions.COIL}" const val coilVideo = "io.coil-kt:coil-video:${Versions.COIL}" @@ -136,11 +133,9 @@ object Dependencies { const val composeMaterial = "androidx.compose.material:material:${Versions.ANDROIDX_COMPOSE}" const val composeMaterial3 = "androidx.compose.material3:material3:${Versions.ANDROIDX_COMPOSE_MATERIAL3}" const val composeMaterialIcons = "androidx.compose.material:material-icons-core:${Versions.ANDROIDX_COMPOSE}" - const val composeAccompanistPermissions = - "com.google.accompanist:accompanist-permissions:${Versions.COMPOSE_ACCOMPANIST}" + const val composeAccompanistPermissions = "com.google.accompanist:accompanist-permissions:${Versions.COMPOSE_ACCOMPANIST}" const val composeAccompanistPager = "com.google.accompanist:accompanist-pager:${Versions.COMPOSE_ACCOMPANIST}" - const val composeAccompanistSystemUiController = - "com.google.accompanist:accompanist-systemuicontroller:${Versions.COMPOSE_ACCOMPANIST}" + const val composeAccompanistSystemUiController = "com.google.accompanist:accompanist-systemuicontroller:${Versions.COMPOSE_ACCOMPANIST}" const val composeActivity = "androidx.activity:activity-compose:${Versions.ANDROIDX_ACTIVITY_COMPOSE}" const val composeViewModel = "androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.ANDROIDX_LIFECYCLE}" const val composeStableMarker = "com.github.skydoves:compose-stable-marker:${Versions.COMPOSE_STABLE_MARKER}" @@ -163,8 +158,7 @@ object Dependencies { const val fragmentTest = "androidx.fragment:fragment-testing:${Versions.ANDROIDX_FRAGMENT}" const val firebaseAnalytics = "com.google.firebase:firebase-analytics-ktx:${Versions.FIREBASE_ANALYTICS}" const val firebaseCrashlytics = "com.google.firebase:firebase-crashlytics:${Versions.FIREBASE_CRASHLYTICS}" - const val firebaseCrashlyticsPlugin = - "com.google.firebase:firebase-crashlytics-gradle:${Versions.FIREBASE_CRASHLYTICS_PLUGIN}" + const val firebaseCrashlyticsPlugin = "com.google.firebase:firebase-crashlytics-gradle:${Versions.FIREBASE_CRASHLYTICS_PLUGIN}" const val firebaseMessaging = "com.google.firebase:firebase-messaging:${Versions.FIREBASE_MESSAGING}" const val flipper = "com.facebook.flipper:flipper:${Versions.FLIPPER}" const val flipperNetwork = "com.facebook.flipper:flipper-network-plugin:${Versions.FLIPPER}" @@ -181,11 +175,9 @@ object Dependencies { const val junitJupiterParams = "org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT5}" const val junitJupiterEngine = "org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT5}" const val junitVintageEngine = "org.junit.vintage:junit-vintage-engine:${Versions.JUNIT5}" - const val keyboardVisibilityEvent = - "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:${Versions.KEYBOARD_VISIBILITY_EVENT}" + const val keyboardVisibilityEvent = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:${Versions.KEYBOARD_VISIBILITY_EVENT}" const val kluent = "org.amshove.kluent:kluent:${Versions.KLUENT}" - const val kotlinBinaryValidator = - "org.jetbrains.kotlinx:binary-compatibility-validator:${Versions.KOTLIN_BINARY_VALIDATOR}" + const val kotlinBinaryValidator = "org.jetbrains.kotlinx:binary-compatibility-validator:${Versions.KOTLIN_BINARY_VALIDATOR}" const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}" const val kotlinReflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.KOTLIN}" const val ksp = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:${Versions.KSP}" @@ -203,8 +195,7 @@ object Dependencies { const val moshiKotlin = "com.squareup.moshi:moshi-kotlin:${Versions.MOSHI}" const val moshiAdapters = "com.squareup.moshi:moshi-adapters:${Versions.MOSHI}" const val navigationFragmentKTX = "androidx.navigation:navigation-fragment-ktx:${Versions.ANDROIDX_NAVIGATION}" - const val navigationSafeArgsGradlePlugin = - "androidx.navigation:navigation-safe-args-gradle-plugin:${Versions.ANDROIDX_NAVIGATION}" + const val navigationSafeArgsGradlePlugin = "androidx.navigation:navigation-safe-args-gradle-plugin:${Versions.ANDROIDX_NAVIGATION}" const val navigationRuntimeKTX = "androidx.navigation:navigation-runtime-ktx:${Versions.ANDROIDX_NAVIGATION}" const val navigationTest = "androidx.navigation:navigation-testing:${Versions.ANDROIDX_NAVIGATION}" const val navigationUIKTX = "androidx.navigation:navigation-ui-ktx:${Versions.ANDROIDX_NAVIGATION}" @@ -233,16 +224,14 @@ object Dependencies { const val streamLogAndroidFile = "io.getstream:stream-log-android-file:${Versions.STREAM_LOG}" const val streamPush = "io.getstream:stream-android-push:${Versions.STREAM_PUSH}" const val streamPushPermissions = "io.getstream:stream-android-push-permissions:${Versions.STREAM_PUSH}" - const val streamPushPermissionsSnackbar = - "io.getstream:stream-android-push-permissions-snackbar:${Versions.STREAM_PUSH}" + const val streamPushPermissionsSnackbar = "io.getstream:stream-android-push-permissions-snackbar:${Versions.STREAM_PUSH}" const val streamPushDelegate = "io.getstream:stream-android-push-delegate:${Versions.STREAM_PUSH}" const val streamPushFirebase = "io.getstream:stream-android-push-firebase:${Versions.STREAM_PUSH}" const val streamPushHuawei = "io.getstream:stream-android-push-huawei:${Versions.STREAM_PUSH}" const val streamPushXiaomi = "io.getstream:stream-android-push-xiaomi:${Versions.STREAM_PUSH}" const val streamResult = "io.getstream:stream-result:${Versions.STREAM_RESULT}" const val streamResultCall = "io.getstream:stream-result-call:${Versions.STREAM_RESULT}" - const val testParameterInjector = - "com.google.testparameterinjector:test-parameter-injector:${Versions.TEST_PARAMETER_INJECTOR}" + const val testParameterInjector = "com.google.testparameterinjector:test-parameter-injector:${Versions.TEST_PARAMETER_INJECTOR}" const val threeTenBp = "org.threeten:threetenbp:${Versions.THREETENBP}" const val timber = "com.jakewharton.timber:timber:${Versions.TIMBER}" const val turbine = "app.cash.turbine:turbine:${Versions.TURBINE}" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000000..faf738e7ddd --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,243 @@ +[versions] +allureKotlin = "2.4.0" +androidGradlePlugin = "8.4.2" +androidJunit5GradlePlugin = "1.11.2.0" +androidLegacySupport = "1.0.0" +androidxActivityCompose = "1.9.3" +androidxActivityKtx = "1.9.3" +androidxAnnotations = "1.9.1" +androidxAppcompat = "1.7.0" +androidxCompose = "1.7.5" +androidxComposeConstraintLayout = "1.1.0" +androidxComposeMaterial3 = "1.3.1" +androidxCoreTest = "2.2.0" +androidxFragment = "1.8.5" +androidxKtx = "1.13.1" +androidxLifecycle = "2.8.7" +androidxNavigation = "2.8.4" +androidxPreferences = "1.2.1" +androidxRecyclerview = "1.3.2" +androidxStartup = "1.2.0" +androidxTestCore = "1.5.0" +androidxTestJunit = "1.1.5" +androidxTestMonitor = "1.7.2" +androidxTestOrchestrator = "1.5.1" +androidxUiAutomator = "2.4.0-alpha01" +androidxViewPager2 = "1.1.0" +androidxTest = "1.5.2" +baseProfile = "1.3.1" +coil = "2.7.0" +composeAccompanist = "0.36.0" +composeMarkdown = "0.5.4" +composeStableMarker = "1.0.5" +constraintLayout = "2.2.0" +coroutines = "1.9.0" +detektPlugin = "1.23.7" +dokka = "1.9.20" +espresso = "3.5.1" +firebaseAnalytics = "22.1.2" +firebaseCrashlytics = "19.2.1" +firebaseCrashlyticsPlugin = "3.0.2" +firebaseMessaging = "24.1.0" +flipper = "0.272.0" +flipperSOLoader = "0.12.1" +gitversioner = "0.5.0" +googleServices = "4.4.2" +gradleNexusPublishPlugin = "1.3.0" +gradleVersionsPlugin = "0.51.0" +huaweiPush = "6.11.0.300" +ituDateVersion = "1.10.2" +json = "20240303" +junit4 = "4.13.2" +junit5 = "5.11.3" +keyboardVisibilityEvent = "2.3.0" +kluent = "1.73" +kotlin = "2.0.10" +kotlinBinaryValidator = "0.16.3" +ksp = "2.0.21-1.0.28" +landscapist = "2.3.6" +leakCanary = "2.4" +macroBenchmark = "1.2.3" +markwon = "4.6.2" +materialComponents = "1.12.0" +mockitoKotlin = "5.4.0" +mockito = "5.14.2" +moshi = "1.15.1" +ok2curl = "0.8.0" +okhttp = "4.12.0" +paparazzi = "1.3.4" +permissionx = "1.8.1" +photoview = "1.0.2" +reorderable = "2.4.0" +retrofit = "2.11.0" +robolectric = "4.10.3" +room = "2.6.1" +shimmer = "0.5.0" +shimmerCompose = "1.3.1" +shot = "6.1.0" +spotless = "6.20.0" +streamLog = "1.3.1" +streamPush = "1.1.9" +streamResult = "1.3.2" +testParameterInjector = "1.12" +threetenbp = "1.7.0" +timber = "5.0.1" +turbine = "1.2.0" +work = "2.9.1" + +[libraries] +allure-kotlin-model = { module = "io.qameta.allure:allure-kotlin-model", version.ref = "allureKotlin"} +allure-kotlin-commons = { module = "io.qameta.allure:allure-kotlin-commons", version.ref = "allureKotlin"} +allure-kotlin-junit4 = { module = "io.qameta.allure:allure-kotlin-junit4", version.ref = "allureKotlin"} +allure-kotlin-android = { module = "io.qameta.allure:allure-kotlin-android", version.ref = "allureKotlin"} +android-material = { module = "com.google.android.material:material", version.ref = "materialComponents"} +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidxActivityCompose"} +androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidxActivityKtx"} +androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidxAnnotations"} +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppcompat"} +androidx-benchmark-macro-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "macroBenchmark"} +androidx-compose-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "androidxComposeConstraintLayout"} +androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidxCompose"} +androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidxCompose"} +androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "androidxComposeMaterial3"} +androidx-compose-material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "androidxCompose"} +androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidxCompose"} +androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidxCompose"} +androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidxCompose"} +androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidxCompose"} +androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidxCompose"} +androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintLayout"} +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxKtx"} +androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "androidxCoreTest"} +androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "androidxFragment"} +androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version.ref = "androidxFragment"} +androidx-legacy-support = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidLegacySupport"} +androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidxLifecycle"} +androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "androidxLifecycle"} +androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidxLifecycle"} +androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidxLifecycle"} +androidx-lifecycle-runtime-compose-android = { module = "androidx.lifecycle:lifecycle-runtime-compose-android", version.ref = "androidxLifecycle"} +androidx-lifecycle-runtime-testing = { module = "androidx.lifecycle:lifecycle-runtime-testing", version.ref = "androidxLifecycle"} +androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle"} +androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidxNavigation"} +androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidxNavigation"} +androidx-navigation-runtime-ktx = { module = "androidx.navigation:navigation-runtime-ktx", version.ref = "androidxNavigation"} +androidx-navigation-testing = { module = "androidx.navigation:navigation-testing", version.ref = "androidxNavigation"} +androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "androidxNavigation"} +androidx-preference = { module = "androidx.preference:preference", version.ref = "androidxPreferences"} +androidx-profileinstaller = { module = "androidx.profileinstaller:profileinstaller", version.ref = "baseProfile"} +androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "androidxRecyclerview"} +androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room"} +androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room"} +androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room"} +androidx-room-testing = { module = "androidx.room:room-testing", version.ref = "room"} +androidx-startup-runtime = { module = "androidx.startup:startup-runtime", version.ref = "androidxStartup"} +androidx-test-core = { module = "androidx.test:core", version.ref = "androidxTestCore"} +androidx-test-core-ktx = { module = "androidx.test:core-ktx", version.ref = "androidxTestCore"} +androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso"} +androidx-test-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso"} +androidx-test-espresso-idling-resource = { module = "androidx.test.espresso:espresso-idling-resource", version.ref = "espresso"} +androidx-test-monitor = { module = "androidx.test:monitor", version.ref = "androidxTestMonitor"} +androidx-test-orchestrator = { module = "androidx.test:orchestrator", version.ref = "androidxTestOrchestrator"} +androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidxTest"} +androidx-test-uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "androidxUiAutomator"} +androidx-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidxTestJunit"} +androidx-test-junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "androidxTestJunit"} +androidx-viewpager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidxViewPager2"} +androidx-work = { module = "androidx.work:work-runtime-ktx", version.ref = "work"} +androidx-work-testing = { module = "androidx.work:work-testing", version.ref = "work"} +coil = { module = "io.coil-kt:coil", version.ref = "coil"} +coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil"} +coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coil"} +coil-video = { module = "io.coil-kt:coil-video", version.ref = "coil"} +compose-markdown = { module = "com.github.jeziellago:compose-markdown", version.ref = "composeMarkdown"} +detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detektPlugin"} +firebase-analytics-ktx = { module = "com.google.firebase:firebase-analytics-ktx", version.ref = "firebaseAnalytics"} +firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics", version.ref = "firebaseCrashlytics"} +firebase-messaging = { module = "com.google.firebase:firebase-messaging", version.ref = "firebaseMessaging"} +flipper = { module = "com.facebook.flipper:flipper", version.ref = "flipper"} +flipper-network = { module = "com.facebook.flipper:flipper-network-plugin", version.ref = "flipper"} +flipper-so-loader = { module = "com.facebook.soloader:soloader", version.ref = "flipperSOLoader"} +google-accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "composeAccompanist"} +google-accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "composeAccompanist"} +google-accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "composeAccompanist"} +huawei-push = { module = "com.huawei.hms:push", version.ref = "huaweiPush"} +itu-date-version = { module = "com.ethlo.time:itu", version.ref = "ituDateVersion"} +json = { module = "org.json:json", version.ref = "json"} +junit = { module = "junit:junit", version.ref = "junit4"} +junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit5"} +junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit5"} +junit-vintage-engine = { module = "org.junit.vintage:junit-vintage-engine", version.ref = "junit5"} +junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit5"} +keyboardvisibilityevent = { module = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent", version.ref = "keyboardVisibilityEvent"} +kluent = { module = "org.amshove.kluent:kluent", version.ref = "kluent"} +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines"} +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines"} +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines"} +kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin"} +leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakCanary"} +markwon-core = { module = "io.noties.markwon:core", version.ref = "markwon"} +markwon-ext-strikethrough = { module = "io.noties.markwon:ext-strikethrough", version.ref = "markwon"} +markwon-linkify = { module = "io.noties.markwon:linkify", version.ref = "markwon"} +markwon-image = { module = "io.noties.markwon:image", version.ref = "markwon"} +mockito = { module = "org.mockito:mockito-core", version.ref = "mockito"} +mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin"} +moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi"} +moshi-adapters = { module = "com.squareup.moshi:moshi-adapters", version.ref = "moshi"} +moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi"} +moshi-codegen = { module = "com.squareup.moshi:moshi-kotlin-codegen", version.ref = "moshi"} +ok2curl = { module = "com.github.mrmike:ok2curl", version.ref = "ok2curl"} +okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp"} +okhttp-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp"} +okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp"} +permissionx = { module = "com.guolindev.permissionx:permissionx", version.ref = "permissionx"} +reorderable = { module = "sh.calvin.reorderable:reorderable", version.ref = "reorderable"} +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit"} +retrofit-converter-moshi = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "retrofit"} +robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric"} +shimmer = { module = "com.facebook.shimmer:shimmer", version.ref = "shimmer"} +shimmer-compose = { module = "com.valentinilk.shimmer:compose-shimmer", version.ref = "shimmerCompose"} +skydoves-compose-stable-marker = { module = "com.github.skydoves:compose-stable-marker", version.ref = "composeStableMarker"} +skydoves-landscapist-coil = { module = "com.github.skydoves:landscapist-coil", version.ref = "landscapist"} +skydoves-landscapist-placeholder = { module = "com.github.skydoves:landscapist-placeholder", version.ref = "landscapist"} +skydoves-landscapist-animation = { module = "com.github.skydoves:landscapist-animation", version.ref = "landscapist"} +stream-android-push = { module = "io.getstream:stream-android-push", version.ref = "streamPush"} +stream-push-delegate = { module = "io.getstream:stream-android-push-delegate", version.ref = "streamPush"} +stream-push-firebase = { module = "io.getstream:stream-android-push-firebase", version.ref = "streamPush"} +stream-push-huawei = { module = "io.getstream:stream-android-push-huawei", version.ref = "streamPush"} +stream-push-permissions = { module = "io.getstream:stream-android-push-permissions", version.ref = "streamPush"} +stream-push-permissions-snackbar = { module = "io.getstream:stream-android-push-permissions-snackbar", version.ref = "streamPush"} +stream-push-xiaomi = { module = "io.getstream:stream-android-push-xiaomi", version.ref = "streamPush"} +stream-log = { module = "io.getstream:stream-log", version.ref = "streamLog"} +stream-log-android-file = { module = "io.getstream:stream-log-android-file", version.ref = "streamLog"} +stream-photoview = { module = "io.getstream:photoview", version.ref = "photoview"} +stream-photoview-dialog = { module = "io.getstream:photoview-dialog", version.ref = "photoview"} +stream-result = { module = "io.getstream:stream-result", version.ref = "streamResult"} +stream-result-call = { module = "io.getstream:stream-result-call", version.ref = "streamResult"} +test-parameter-injector = { module = "com.google.testparameterinjector:test-parameter-injector", version.ref = "testParameterInjector"} +threetenbp = { module = "org.threeten:threetenbp", version.ref = "threetenbp"} +timber = { module = "com.jakewharton.timber:timber", version.ref = "timber"} +turbine = { module = "app.cash.turbine:turbine", version.ref = "turbine"} + +[plugins] +android-application = { id = "com.android.application", version.ref = "androidGradlePlugin"} +android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "androidJunit5GradlePlugin"} +android-library = { id = "com.android.library", version.ref = "androidGradlePlugin"} +android-test = { id = "com.android.test", version.ref = "androidGradlePlugin"} +androidx-baseline-profile = { id = "androidx.baselineprofile", version.ref = "macroBenchmark"} +androidx-navigation = { id = "androidx.navigation.safeargs.kotlin", version.ref = "androidxNavigation"} +binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryValidator"} +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka"} +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detektPlugin"} +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsPlugin"} +gitversioner = { id = "com.pascalwelsch.gitversioner", version.ref = "gitversioner"} +google-services = { id = "com.google.gms.google-services", version.ref = "googleServices"} +gradle-versions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersionsPlugin"} +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin"} +kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin"} +kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin"} +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"} +nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "gradleNexusPublishPlugin"} +shot = { id = "shot", version.ref = "shot"} +spotless = { id = "com.diffplug.spotless", version.ref = "spotless"} +paparazzi = { id = "app.cash.paparazzi", version.ref = "paparazzi"} diff --git a/scripts/sample-app-versioner.gradle b/scripts/sample-app-versioner.gradle index 482a4b6501c..a33f67fc562 100644 --- a/scripts/sample-app-versioner.gradle +++ b/scripts/sample-app-versioner.gradle @@ -12,7 +12,6 @@ def isCI = System.getenv('CI') ext["sampleAppVersionCode"] = 1 ext["sampleAppVersionName"] = Configuration.versionName if (isCI && gitIsAvailable()) { - apply plugin: 'com.pascalwelsch.gitversioner' gitVersioner { def branches = ['develop', 'main', 'release'] baseBranch branchName in branches ? branchName : branches[0] diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 4188093d564..00000000000 --- a/settings.gradle +++ /dev/null @@ -1,110 +0,0 @@ -plugins { - id("com.github.burrunan.s3-build-cache") version "1.2" - id("com.gradle.enterprise") version "3.7" -} -include ( - ':stream-chat-android-ui-utils', - ':stream-chat-android-ui-common', - ':stream-chat-android-ui-components', - ':stream-chat-android-ui-components-sample', - ':stream-chat-android-ui-guides', - ':stream-chat-android-state', - ':stream-chat-android-offline', - ':stream-chat-android-client', - ':stream-chat-android-client-test', - ':stream-chat-android-core', - ':stream-chat-android-e2e-test', - ':stream-chat-android-test', - ':stream-chat-android-docs', - ':stream-chat-android-previewdata', - ':stream-chat-android-compose', - ':stream-chat-android-compose-sample', - ':stream-chat-android-markdown-transformer', - ':stream-chat-android-ui-uitests', - ':stream-chat-android-benchmark', - ':stream-chat-android-ai-assistant', -) - -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - // fetch plugins from google maven (https://maven.google.com) - google() { - content { - includeGroupByRegex("androidx\\..*") - includeGroupByRegex("com\\.android(\\..*|)") - includeGroupByRegex("com\\.google\\.android\\..*") - includeGroupByRegex("com\\.google\\.firebase(\\..*|)") - includeGroupByRegex("com\\.google\\.gms(\\..*|)") - includeGroupByRegex("com\\.google\\.mlkit") - includeGroupByRegex("com\\.google\\.oboe") - includeGroupByRegex("com\\.google\\.prefab") - includeGroupByRegex("com\\.google\\.testing\\.platform") - } - mavenContent { - releasesOnly() - } - } - - maven { - url "https://jitpack.io" - content { - includeModule("com.github.jeziellago", "compose-markdown") - includeModule("com.github.jeziellago", "Markwon") - } - } - - maven { - url 'https://developer.huawei.com/repo/' - content { - includeGroup("com.huawei.agconnect") - includeGroup("com.huawei.android.hms") - includeGroup("com.huawei.hms") - includeGroup("com.huawei.hmf") - } - } - - // Fallback for the rest of the dependencies - mavenCentral() - } -} - -buildCache { - local { - enabled = !System.getenv().containsKey("CI") - removeUnusedEntriesAfterDays = 7 - } - Properties localProperties = new Properties() - File file = new File("local.properties") - if (file.exists()) { - file.newDataInputStream().withCloseable { localProperties.load(it) } - } - String streamAWSRegion = localProperties.get("buildCache.AWSRegion") ?: System.getenv("BUILD_CACHE_AWS_REGION") ?: "" - String streamAWSBucket = localProperties.get("buildCache.AWSBucket") ?: System.getenv("BUILD_CACHE_AWS_BUCKET") ?: "" - String streamAWSAccessKeyId = localProperties.get("buildCache.AWSAccessKeyId") ?: System.getenv("BUILD_CACHE_AWS_ACCESS_KEY_ID") ?: "" - String streamAWSSecretKey = localProperties.get("buildCache.AWSSecretKey") ?: System.getenv("BUILD_CACHE_AWS_SECRET_KEY") ?: "" - Boolean streamBuildCacheDisabled = Boolean.parseBoolean(localProperties.get("buildCache.disabled")) - if (!streamBuildCacheDisabled && - !streamAWSRegion.isBlank() && - !streamAWSBucket.isBlank() && - !streamAWSAccessKeyId.isBlank() && - !streamAWSSecretKey.isBlank() - ) { - remote(com.github.burrunan.s3cache.AwsS3BuildCache) { - region = streamAWSRegion - bucket = streamAWSBucket - prefix = 'cache/' - awsAccessKeyId = streamAWSAccessKeyId - awsSecretKey = streamAWSSecretKey - push = System.getenv().containsKey("CI") - - } - } -} - -gradleEnterprise { - buildScan { - termsOfServiceUrl = "https://gradle.com/terms-of-service" - termsOfServiceAgree = "yes" - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000000..c31a5dd3d0a --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,152 @@ +import java.util.Properties + +pluginManagement { + repositories { + // fetch plugins from google maven (https://maven.google.com) + google { + content { + includeGroupByRegex("androidx\\..*") + includeGroupByRegex("com\\.android(\\..*|)") + includeGroupByRegex("com\\.google\\.android\\..*") + includeGroupByRegex("com\\.google\\.firebase(\\..*|)") + includeGroupByRegex("com\\.google\\.gms(\\..*|)") + includeGroupByRegex("com\\.google\\.mlkit") + includeGroupByRegex("com\\.google\\.oboe") + includeGroupByRegex("com\\.google\\.prefab") + includeGroupByRegex("com\\.google\\.testing\\.platform") + } + mavenContent { + releasesOnly() + } + } + + maven(url = "https://jitpack.io/") { + content { + includeModule("com.github.passsy", "gradle-gitVersioner-plugin") + } + } + + // fetch plugins from gradle plugin portal (https://plugins.gradle.org) + gradlePluginPortal() + + // Fallback for the rest of the dependencies + mavenCentral() + } + resolutionStrategy { + eachPlugin { + when(requested.id.id) { + "shot" -> { useModule("com.karumi:shot:${requested.version}") } + "com.pascalwelsch.gitversioner" -> { useModule("com.github.passsy:gradle-gitVersioner-plugin:${requested.version}") } + } + } + } +} + +plugins { + id("com.github.burrunan.s3-build-cache") version "1.8.4" + id("com.gradle.enterprise") version "3.7" +} +include ( + ":stream-chat-android-ui-utils", + ":stream-chat-android-ui-common", + ":stream-chat-android-ui-components", + ":stream-chat-android-ui-components-sample", + ":stream-chat-android-ui-guides", + ":stream-chat-android-state", + ":stream-chat-android-offline", + ":stream-chat-android-client", + ":stream-chat-android-client-test", + ":stream-chat-android-core", + ":stream-chat-android-e2e-test", + ":stream-chat-android-test", + ":stream-chat-android-docs", + ":stream-chat-android-previewdata", + ":stream-chat-android-compose", + ":stream-chat-android-compose-sample", + ":stream-chat-android-markdown-transformer", + ":stream-chat-android-ui-uitests", + ":stream-chat-android-benchmark", + ":stream-chat-android-ai-assistant", +) + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + // fetch plugins from google maven (https://maven.google.com) + google() { + content { + includeGroupByRegex("androidx\\..*") + includeGroupByRegex("com\\.android(\\..*|)") + includeGroupByRegex("com\\.google\\.android\\..*") + includeGroupByRegex("com\\.google\\.firebase(\\..*|)") + includeGroupByRegex("com\\.google\\.gms(\\..*|)") + includeGroupByRegex("com\\.google\\.mlkit") + includeGroupByRegex("com\\.google\\.oboe") + includeGroupByRegex("com\\.google\\.prefab") + includeGroupByRegex("com\\.google\\.testing\\.platform") + } + mavenContent { + releasesOnly() + } + } + + maven(url = "https://jitpack.io") { + content { + includeModule("com.github.jeziellago", "compose-markdown") + includeModule("com.github.jeziellago", "Markwon") + } + } + + maven(url = "https://developer.huawei.com/repo/") { + content { + includeGroup("com.huawei.agconnect") + includeGroup("com.huawei.android.hms") + includeGroup("com.huawei.hms") + includeGroup("com.huawei.hmf") + } + } + + // Fallback for the rest of the dependencies + mavenCentral() + } +} + +buildCache { + local { + isEnabled = !System.getenv().containsKey("CI") + removeUnusedEntriesAfterDays = 7 + } + val localProperties = Properties() + val file = File("local.properties") + if (file.exists()) { + file.inputStream().use { localProperties.load(it) } + } + val streamAWSRegion: String = localProperties.get("buildCache.AWSRegion") as? String ?: System.getenv("BUILD_CACHE_AWS_REGION") ?: "" + val streamAWSBucket: String = localProperties.get("buildCache.AWSBucket") as? String ?: System.getenv("BUILD_CACHE_AWS_BUCKET") ?: "" + val streamAWSAccessKeyId: String = localProperties.get("buildCache.AWSAccessKeyId") as? String ?: System.getenv("BUILD_CACHE_AWS_ACCESS_KEY_ID") ?: "" + val streamAWSSecretKey: String = localProperties.get("buildCache.AWSSecretKey") as? String ?: System.getenv("BUILD_CACHE_AWS_SECRET_KEY") ?: "" + val streamBuildCacheDisabled: Boolean = localProperties.get("buildCache.disabled") == true + if (!streamBuildCacheDisabled && + !streamAWSRegion.isBlank() && + !streamAWSBucket.isBlank() && + !streamAWSAccessKeyId.isBlank() && + !streamAWSSecretKey.isBlank() + ) { + remote { + region = streamAWSRegion + bucket = streamAWSBucket + prefix = "cache/" + awsAccessKeyId = streamAWSAccessKeyId + awsSecretKey = streamAWSSecretKey + isPush = System.getenv().containsKey("CI") + + } + } +} + +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + } +} diff --git a/stream-chat-android-ai-assistant/build.gradle.kts b/stream-chat-android-ai-assistant/build.gradle.kts index 6b63b679506..fbff07633ec 100644 --- a/stream-chat-android-ai-assistant/build.gradle.kts +++ b/stream-chat-android-ai-assistant/build.gradle.kts @@ -1,10 +1,10 @@ import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Dependencies +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id("com.android.library") - id("org.jetbrains.kotlin.android") - id("org.jetbrains.kotlin.plugin.compose") + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) } rootProject.extra.apply { @@ -25,7 +25,7 @@ android { } } -tasks.withType { +tasks.withType { compilerOptions.freeCompilerArgs.addAll( listOf( "-Xexplicit-api=strict", @@ -42,15 +42,14 @@ composeCompiler { dependencies { api(project(":stream-chat-android-compose")) - implementation(Dependencies.composeUi) - implementation(Dependencies.composeUiTooling) - implementation(Dependencies.composeFoundation) - implementation(Dependencies.composeMaterial3) - implementation(Dependencies.composeActivity) - implementation(Dependencies.composeViewModel) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.material3) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.shimmer.compose) + implementation(libs.compose.markdown) - implementation(Dependencies.shimmerCompose) - implementation(Dependencies.composeMarkdown) - - detektPlugins(Dependencies.detektFormatting) + detektPlugins(libs.detekt.formatting) } diff --git a/stream-chat-android-benchmark/build.gradle.kts b/stream-chat-android-benchmark/build.gradle.kts index 0fa51f310b1..afe67894122 100644 --- a/stream-chat-android-benchmark/build.gradle.kts +++ b/stream-chat-android-benchmark/build.gradle.kts @@ -1,10 +1,9 @@ import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Dependencies plugins { - id("com.android.test") - id("org.jetbrains.kotlin.android") - id("androidx.baselineprofile") + alias(libs.plugins.android.test) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.androidx.baseline.profile) } apply { @@ -61,9 +60,9 @@ baselineProfile { } dependencies { - implementation(Dependencies.androidxTestRunner) - implementation(Dependencies.baseProfile) - implementation(Dependencies.macroBenchmark) - implementation(Dependencies.androidxUiAutomator) - detektPlugins(Dependencies.detektFormatting) + implementation(libs.androidx.test.runner) + implementation(libs.androidx.profileinstaller) + implementation(libs.androidx.benchmark.macro.junit4) + implementation(libs.androidx.test.uiautomator) + detektPlugins(libs.detekt.formatting) } diff --git a/stream-chat-android-client-test/build.gradle b/stream-chat-android-client-test/build.gradle deleted file mode 100644 index 666d431ec15..00000000000 --- a/stream-chat-android-client-test/build.gradle +++ /dev/null @@ -1,69 +0,0 @@ -import io.getstream.chat.android.Dependencies - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -apply from: "${rootDir}/scripts/android.gradle" -apply from: "${rootDir}/scripts/detekt-test.gradle" - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] - } -} - -android { - namespace "io.getstream.chat.android.client.test" -} - -dependencies { - api project(":stream-chat-android-client") - implementation project(":stream-chat-android-test") - implementation testFixtures(project(":stream-chat-android-core")) - - // Kotlin - implementation Dependencies.kotlinReflect - implementation Dependencies.coroutinesCore - implementation Dependencies.coroutinesTest - - // Google libs - implementation Dependencies.androidxActivityKtx - implementation Dependencies.androidxAnnotations - implementation Dependencies.androidxAppCompat - implementation Dependencies.workRuntimeKtx - - // Tests - testImplementation Dependencies.moshiKotlin - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - - testImplementation Dependencies.androidxTest - testImplementation Dependencies.androidxTestJunit - testImplementation Dependencies.androidxArchCoreTest - testImplementation Dependencies.androidxRecyclerview // for performance test - testImplementation Dependencies.roomTesting - testImplementation Dependencies.workTesting - - testImplementation Dependencies.robolectric - - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - testImplementation Dependencies.turbine - - // Instrumentation tests - androidTestImplementation Dependencies.androidxTestJunit - androidTestImplementation Dependencies.espressoCore - androidTestImplementation Dependencies.junit4 - androidTestImplementation Dependencies.kluent - androidTestImplementation Dependencies.mockito - androidTestImplementation Dependencies.mockitoKotlin - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-client-test/build.gradle.kts b/stream-chat-android-client-test/build.gradle.kts new file mode 100644 index 00000000000..75aac766f7e --- /dev/null +++ b/stream-chat-android-client-test/build.gradle.kts @@ -0,0 +1,73 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) +} + +apply(from = "$rootDir/scripts/android.gradle") +apply(from = "$rootDir/scripts/detekt-test.gradle") + +tasks.withType().configureEach { + compilerOptions { + freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) + } +} + +android { + namespace = "io.getstream.chat.android.client.test" +} + +dependencies { + api(project(":stream-chat-android-client")) + implementation(project(":stream-chat-android-test")) + implementation(testFixtures(project(":stream-chat-android-core"))) + + // Kotlin + implementation(libs.kotlin.reflect) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.test) + + // Google libs + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.annotation) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.work) + + // Tests + testImplementation(libs.moshi.kotlin) + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + + testImplementation(libs.androidx.test.core) + testImplementation(libs.androidx.test.junit) + testImplementation(libs.androidx.core.testing) + testImplementation(libs.androidx.recyclerview) // for performance test + testImplementation(libs.androidx.room.testing) + testImplementation(libs.androidx.work.testing) + + testImplementation(libs.robolectric) + + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.turbine) + + // Instrumentation tests + androidTestImplementation(libs.androidx.test.junit) + androidTestImplementation(libs.androidx.test.espresso.core) + androidTestImplementation(libs.junit) + androidTestImplementation(libs.kluent) + androidTestImplementation(libs.mockito) + androidTestImplementation(libs.mockito.kotlin) + + detektPlugins(libs.detekt.formatting) +} diff --git a/stream-chat-android-client-test/proguard-rules.pro b/stream-chat-android-client-test/proguard-rules.pro index 481bb434814..ff59496d81a 100644 --- a/stream-chat-android-client-test/proguard-rules.pro +++ b/stream-chat-android-client-test/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-client/build.gradle b/stream-chat-android-client/build.gradle deleted file mode 100644 index d802c186668..00000000000 --- a/stream-chat-android-client/build.gradle +++ /dev/null @@ -1,138 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Configuration - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'com.google.devtools.ksp' -apply plugin: "de.mannodermaus.android-junit5" -apply plugin: 'androidx.baselineprofile' - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-client' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.client" - defaultConfig { - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - - buildConfigField 'String', 'STREAM_CHAT_VERSION', "\"$version\"" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - consumerProguardFiles 'consumer-proguard-rules.pro' - } - debug { - testCoverageEnabled false - consumerProguardFiles 'consumer-proguard-rules.pro' - } - } - - buildFeatures { - buildConfig true - } - - resourcePrefix 'stream_' - - lintOptions { - xmlReport false - } - - testOptions.unitTests { - returnDefaultValues = true - } -} - -baselineProfile { - baselineProfileOutputDir = "." - filter { - include("io.getstream.chat.android.client.**") - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=kotlin.RequiresOptIn', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] - jvmTarget = JavaVersion.VERSION_11.toString() - } -} - -dependencies { - api project(':stream-chat-android-core') - - implementation Dependencies.kotlinReflect - - implementation Dependencies.androidxAppCompat - implementation Dependencies.androidxCoreKtx - implementation Dependencies.androidxLifecycleProcess - implementation Dependencies.androidxLifecycleLiveDataKtx - implementation Dependencies.workRuntimeKtx - implementation Dependencies.constraintLayout - implementation Dependencies.coroutinesCore - implementation Dependencies.coroutinesAndroid - implementation Dependencies.retrofit - implementation Dependencies.streamLog - debugImplementation Dependencies.streamLogAndroidFile - implementation Dependencies.streamPushDelegate - api Dependencies.streamPushPermissions - implementation Dependencies.ituDate - implementation Dependencies.moshi - implementation Dependencies.retrofitMoshiConverter - ksp Dependencies.moshiCodegen - implementation Dependencies.okhttpLoggingInterceptor - implementation Dependencies.ok2curl - debugImplementation Dependencies.flipper - debugImplementation Dependencies.flipperNetwork - debugImplementation Dependencies.flipperLoader - - // Tests - testImplementation project(':stream-chat-android-test') - testImplementation project(":stream-chat-android-client-test") - testImplementation testFixtures(project(":stream-chat-android-core")) - testImplementation Dependencies.streamResult - testImplementation Dependencies.androidxTestJunit - testImplementation Dependencies.androidxLifecycleTesting - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - - testImplementation Dependencies.json - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - testImplementation Dependencies.okhttpMockWebserver - testImplementation Dependencies.robolectric - - // Instrumentation tests - androidTestImplementation Dependencies.junit4 - androidTestImplementation Dependencies.espressoCore - androidTestImplementation Dependencies.androidxTestJunit - - detektPlugins(Dependencies.detektFormatting) - - baselineProfile(project(":stream-chat-android-benchmark")) -} - -/* Uncomment if the Dokka page per module is required -tasks.withType(dokkaHtmlPartial.getClass()) { - dokkaSourceSets { - named("main") { - moduleName.set("LLC") - includes.from("DokkaModule.md") - } - } -} -*/ diff --git a/stream-chat-android-client/build.gradle.kts b/stream-chat-android-client/build.gradle.kts new file mode 100644 index 00000000000..d36e0d16eb9 --- /dev/null +++ b/stream-chat-android-client/build.gradle.kts @@ -0,0 +1,147 @@ +import io.getstream.chat.android.Configuration +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.ksp) + alias(libs.plugins.android.junit5) + alias(libs.plugins.androidx.baseline.profile) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-client") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.client" + defaultConfig { + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + + buildConfigField("String", "STREAM_CHAT_VERSION", "\"$version\"") + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + consumerProguardFiles("consumer-proguard-rules.pro") + } + getByName("debug") { + enableUnitTestCoverage = false + consumerProguardFiles("consumer-proguard-rules.pro") + } + } + + buildFeatures { + buildConfig = true + } + + resourcePrefix = "stream_" + + lint { + xmlReport = false + } + + testOptions.unitTests { + isReturnDefaultValues = true + } +} + +baselineProfile { + baselineProfileOutputDir = "." + filter { + include("io.getstream.chat.android.client.**") + } +} + +tasks.withType().configureEach { + compilerOptions { + freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=kotlin.RequiresOptIn", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) + jvmTarget.set(JvmTarget.JVM_11) + } +} + +dependencies { + api(project(":stream-chat-android-core")) + + implementation(libs.kotlin.reflect) + + implementation(libs.androidx.appcompat) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.process) + implementation(libs.androidx.lifecycle.livedata.ktx) + implementation(libs.androidx.work) + implementation(libs.androidx.constraintlayout) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.retrofit) + implementation(libs.stream.log) + implementation(libs.stream.log.android.file) + implementation(libs.stream.push.delegate) + api(libs.stream.push.permissions) + implementation(libs.itu.date.version) + implementation(libs.moshi) + implementation(libs.retrofit.converter.moshi) + ksp(libs.moshi.codegen) + implementation(libs.okhttp.logging.interceptor) + implementation(libs.ok2curl) + debugImplementation(libs.flipper) + debugImplementation(libs.flipper.network) + debugImplementation(libs.flipper.so.loader) + + // Tests + testImplementation(project(":stream-chat-android-test")) + testImplementation(project(":stream-chat-android-client-test")) + testImplementation(testFixtures(project(":stream-chat-android-core"))) + testImplementation(libs.stream.result) + testImplementation(libs.androidx.test.junit) + testImplementation(libs.androidx.lifecycle.runtime.testing) + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + + testImplementation(libs.json) + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.okhttp.mockwebserver) + testImplementation(libs.robolectric) + + // Instrumentation tests + androidTestImplementation(libs.junit) + androidTestImplementation(libs.androidx.test.espresso.core) + androidTestImplementation(libs.androidx.test.junit) + + detektPlugins(libs.detekt.formatting) + + baselineProfile(project(":stream-chat-android-benchmark")) +} + +/* Uncomment if the Dokka page per module is required +tasks.withType(dokkaHtmlPartial.getClass()) { + dokkaSourceSets { + named("main") { + moduleName.set("LLC") + includes.from("DokkaModule.md") + } + } +} +*/ diff --git a/stream-chat-android-client/proguard-rules.pro b/stream-chat-android-client/proguard-rules.pro index f1b424510da..2f9dc5a47ed 100644 --- a/stream-chat-android-client/proguard-rules.pro +++ b/stream-chat-android-client/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-compose-sample/build.gradle b/stream-chat-android-compose-sample/build.gradle deleted file mode 100644 index 0d42b60eb9b..00000000000 --- a/stream-chat-android-compose-sample/build.gradle +++ /dev/null @@ -1,164 +0,0 @@ -import io.getstream.chat.android.Dependencies - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'org.jetbrains.kotlin.plugin.compose' -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.crashlytics' -apply plugin: 'androidx.baselineprofile' - -apply from: "${rootDir}/scripts/android.gradle" -apply from: "${rootDir}/scripts/detekt-compose.gradle" - -android { - namespace "io.getstream.chat.android.compose.sample" - defaultConfig { - targetSdk io.getstream.chat.android.Configuration.sampleTargetSdk - applicationId "io.getstream.chat.android.compose.sample" - versionCode sampleAppVersionCode - versionName sampleAppVersionName - testInstrumentationRunner = "io.qameta.allure.android.runners.AllureAndroidJUnitRunner" - testInstrumentationRunnerArguments["clearPackageData"] = "true" - } - - testOptions { - execution 'ANDROIDX_TEST_ORCHESTRATOR' - } - - File signFile = rootProject.file('.sign/keystore.properties') - if (signFile.exists()) { - Properties properties = new Properties() - properties.load(new FileInputStream(signFile)) - signingConfigs { - release { - storeFile rootProject.file(properties['keystore']) - storePassword properties['storePassword'] - keyAlias properties['keyAlias'] - keyPassword properties['keyPassword'] - } - } - } else { - signingConfigs { - release { - storeFile rootProject.file('.sign/debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - } - } - - signingConfigs.debug { - storeFile rootProject.file('.sign/debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - - buildTypes { - debug { - versionNameSuffix "-DEBUG" - applicationIdSuffix ".debug" - debuggable true - minifyEnabled false - shrinkResources false - signingConfig signingConfigs.debug - buildConfigField "Boolean", "BENCHMARK", "false" - } - benchmark { - debuggable false - signingConfig signingConfigs.debug - matchingFallbacks = ['release'] - proguardFiles 'benchmark-rules.pro' - buildConfigField "Boolean", "BENCHMARK", "true" - } - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.release - buildConfigField "Boolean", "BENCHMARK", "false" - } - } - - flavorDimensions "version" - productFlavors { - demo { - dimension "version" - } - e2e { - dimension "version" - applicationIdSuffix ".e2etest" - } - } - - variantFilter { variant -> - def names = variant.flavors*.name - if (buildType.name != "debug" && names.contains("e2e")) { - setIgnore(true) - } - } - - buildFeatures { - compose true - buildConfig true - } - - lintOptions { - disable 'MissingTranslation' - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-opt-in=kotlin.RequiresOptIn', - ] - } -} - -dependencies { - implementation project(':stream-chat-android-compose') - implementation project(":stream-chat-android-offline") - - implementation Dependencies.androidxCoreKtx - implementation Dependencies.androidxAppCompat - implementation Dependencies.materialComponents - implementation Dependencies.streamPushFirebase - implementation Dependencies.streamLog - - // Compose - implementation Dependencies.composeUi - implementation Dependencies.composeUiTooling - implementation Dependencies.composeFoundation - implementation Dependencies.composeMaterial - implementation Dependencies.composeMaterialIcons - - implementation Dependencies.composeActivity - implementation Dependencies.composeAndroidLifecycle - implementation Dependencies.composeViewModel - implementation Dependencies.composeAccompanistPermissions - implementation Dependencies.composeAccompanistPager - - // Coil - implementation Dependencies.composeLandscapistCoil - - // Firebase - implementation Dependencies.firebaseAnalytics - implementation Dependencies.firebaseCrashlytics - - // Instrumentation tests - androidTestImplementation(Dependencies.androidxTestRunner) - androidTestImplementation(Dependencies.androidxUiAutomator) - androidTestImplementation(Dependencies.androidxTestJunitKtx) - androidTestImplementation(Dependencies.androidxTestMonitor) - androidTestUtil(Dependencies.androidxTestOrchestrator) - androidTestImplementation(Dependencies.allureKotlinModel) - androidTestImplementation(Dependencies.allureKotlinJunit) - androidTestImplementation(Dependencies.allureKotlinCommons) - androidTestImplementation(Dependencies.allureKotlinAndroid) - androidTestImplementation(project(":stream-chat-android-e2e-test")) - - detektPlugins(Dependencies.detektFormatting) - - baselineProfile(project(":stream-chat-android-benchmark")) -} diff --git a/stream-chat-android-compose-sample/build.gradle.kts b/stream-chat-android-compose-sample/build.gradle.kts new file mode 100644 index 00000000000..eafbedbd78b --- /dev/null +++ b/stream-chat-android-compose-sample/build.gradle.kts @@ -0,0 +1,178 @@ +import io.getstream.chat.android.Configuration +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import java.io.FileInputStream +import java.util.Properties + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.androidx.baseline.profile) + alias(libs.plugins.firebase.crashlytics) + alias(libs.plugins.google.services) +} + +apply(from = "$rootDir/scripts/android.gradle") +apply(from = "$rootDir/scripts/detekt-compose.gradle") + +android { + namespace = "io.getstream.chat.android.compose.sample" + defaultConfig { + targetSdk = Configuration.sampleTargetSdk + applicationId = "io.getstream.chat.android.compose.sample" + versionCode = rootProject.extra.get("sampleAppVersionCode") as Int + versionName = rootProject.extra.get("sampleAppVersionName") as String + testInstrumentationRunner = "io.qameta.allure.android.runners.AllureAndroidJUnitRunner" + testInstrumentationRunnerArguments["clearPackageData"] = "true" + } + + testOptions { + execution = "ANDROIDX_TEST_ORCHESTRATOR" + } + + val signFile = rootProject.file(".sign/keystore.properties") + if (signFile.exists()) { + val properties = Properties() + properties.load(FileInputStream(signFile)) + + signingConfigs { + create("release") { + keyAlias = properties["keyAlias"] as? String + keyPassword = properties["keyPassword"] as? String + storeFile = rootProject.file(properties["keystore"] as String) + storePassword = properties["storePassword"] as? String + } + } + } else { + signingConfigs { + create("release") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore") + storePassword = "android" + } + } + } + + signingConfigs { + getByName("debug") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore") + storePassword = "android" + } + } + + buildTypes { + getByName("debug") { + versionNameSuffix = "-DEBUG" + applicationIdSuffix = ".debug" + isDebuggable = true + isMinifyEnabled = false + isShrinkResources = false + signingConfig = signingConfigs.getByName("debug") + buildConfigField("Boolean", "BENCHMARK", "false") + } + create("benchmark") { + isDebuggable = false + signingConfig = signingConfigs.getByName("debug") + matchingFallbacks += listOf("release") + proguardFiles("benchmark-rules.pro") + buildConfigField("Boolean", "BENCHMARK", "true") + } + getByName("release") { + isMinifyEnabled = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + signingConfig = signingConfigs.getByName("release") + buildConfigField("Boolean", "BENCHMARK", "false") + } + } + + flavorDimensions += "version" + productFlavors { + create("demo") { + dimension = "version" + } + create("e2e") { + dimension = "version" + applicationIdSuffix = ".e2etest" + } + } + + buildFeatures { + compose = true + buildConfig = true + } + + lint { + disable += "MissingTranslation" + } +} + +androidComponents { + beforeVariants { variantBuilder -> + if (variantBuilder.buildType != "debug" && + variantBuilder.productFlavors.any { it.second.contains("e2e") } + ) { + variantBuilder.enable = false + } + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-opt-in=kotlin.RequiresOptIn", + ), + ) +} + +dependencies { + implementation(project(":stream-chat-android-compose")) + implementation(project(":stream-chat-android-offline")) + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.android.material) + implementation(libs.stream.push.firebase) + implementation(libs.stream.log) + + // Compose + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.compose.material.icons.core) + + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.google.accompanist.permissions) + implementation(libs.google.accompanist.pager) + + // Coil + implementation(libs.skydoves.landscapist.coil) + + // Firebase + implementation(libs.firebase.analytics.ktx) + implementation(libs.firebase.crashlytics) + + // Instrumentation tests + androidTestImplementation(libs.androidx.test.runner) + androidTestImplementation(libs.androidx.test.uiautomator) + androidTestImplementation(libs.androidx.test.junit.ktx) + androidTestImplementation(libs.androidx.test.monitor) + androidTestUtil(libs.androidx.test.orchestrator) + androidTestImplementation(libs.allure.kotlin.model) + androidTestImplementation(libs.allure.kotlin.junit4) + androidTestImplementation(libs.allure.kotlin.commons) + androidTestImplementation(libs.allure.kotlin.android) + androidTestImplementation(project(":stream-chat-android-e2e-test")) + + detektPlugins(libs.detekt.formatting) + + baselineProfile(project(":stream-chat-android-benchmark")) +} diff --git a/stream-chat-android-compose-sample/proguard-rules.pro b/stream-chat-android-compose-sample/proguard-rules.pro index 481bb434814..ff59496d81a 100644 --- a/stream-chat-android-compose-sample/proguard-rules.pro +++ b/stream-chat-android-compose-sample/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-compose/build.gradle b/stream-chat-android-compose/build.gradle deleted file mode 100644 index dba1d5813cb..00000000000 --- a/stream-chat-android-compose/build.gradle +++ /dev/null @@ -1,119 +0,0 @@ -import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Versions - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'org.jetbrains.kotlin.plugin.compose' -apply plugin: 'kotlin-parcelize' -apply plugin: "de.mannodermaus.android-junit5" -apply plugin: 'app.cash.paparazzi' -apply plugin: 'androidx.baselineprofile' - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-compose' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" -apply from: "${rootDir}/scripts/detekt-compose.gradle" - -android { - namespace "io.getstream.chat.android.compose" - defaultConfig { - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - } - - resourcePrefix 'stream_compose_' - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - buildFeatures { - compose true - } -} - -composeCompiler { - enableStrongSkippingMode = true - reportsDestination = layout.buildDirectory.dir("compose_compiler") - stabilityConfigurationFile = rootProject.layout.projectDirectory.file("compose_compiler_config.conf") -} - -baselineProfile { - baselineProfileOutputDir = "." - filter { - include("io.getstream.chat.android.compose.**") - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - '-opt-in=io.getstream.chat.android.core.ExperimentalStreamChatApi', - '-opt-in=kotlin.RequiresOptIn', - ] - } -} - -dependencies { - api project(':stream-chat-android-ui-common') - implementation(project(":stream-chat-android-previewdata")) - implementation project(":stream-chat-android-ui-utils") - - implementation Dependencies.androidxAppCompat - implementation Dependencies.streamLog - - // Compose - implementation Dependencies.composeUi - implementation Dependencies.composeUiTooling - implementation Dependencies.composeAndroidLifecycle - implementation Dependencies.composeFoundation - implementation Dependencies.composeConstraintLayout - implementation Dependencies.composeMaterial - implementation Dependencies.composeMaterial3 - - implementation Dependencies.composeActivity - implementation Dependencies.composeViewModel - implementation Dependencies.composeAccompanistPermissions - implementation Dependencies.composeAccompanistPager - implementation Dependencies.composeAccompanistSystemUiController - - // Coil - implementation Dependencies.composeCoil - implementation Dependencies.composeLandscapistCoil - implementation Dependencies.composeLandscapistPlaceholder - implementation Dependencies.composeLandscapistAnimation - implementation Dependencies.coilGif - implementation Dependencies.coilVideo - - // UI - implementation Dependencies.reorderable - - // Tests - testImplementation project(':stream-chat-android-test') - testImplementation testFixtures(project(":stream-chat-android-core")) - testImplementation(project(":stream-chat-android-previewdata")) - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - - detektPlugins(Dependencies.detektFormatting) - - baselineProfile(project(":stream-chat-android-benchmark")) -} diff --git a/stream-chat-android-compose/build.gradle.kts b/stream-chat-android-compose/build.gradle.kts new file mode 100644 index 00000000000..a2d380d0779 --- /dev/null +++ b/stream-chat-android-compose/build.gradle.kts @@ -0,0 +1,123 @@ +import io.getstream.chat.android.Configuration +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.kotlin.parcelize) + alias(libs.plugins.android.junit5) + alias(libs.plugins.androidx.baseline.profile) + alias(libs.plugins.paparazzi) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-compose") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") +apply(from = "$rootDir/scripts/detekt-compose.gradle") + +android { + namespace = "io.getstream.chat.android.compose" + defaultConfig { + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + resourcePrefix = "stream_compose_" + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + } + } + + buildFeatures { + compose = true + } +} + +composeCompiler { + enableStrongSkippingMode = true + reportsDestination = layout.buildDirectory.dir("compose_compiler") + stabilityConfigurationFile = rootProject.layout.projectDirectory.file("compose_compiler_config.conf") +} + +baselineProfile { + baselineProfileOutputDir = "." + filter { + include("io.getstream.chat.android.compose.**") + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + "-opt-in=io.getstream.chat.android.core.ExperimentalStreamChatApi", + "-opt-in=kotlin.RequiresOptIn", + ), + ) +} + +dependencies { + api(project(":stream-chat-android-ui-common")) + implementation(project(":stream-chat-android-previewdata")) + implementation(project(":stream-chat-android-ui-utils")) + + implementation(libs.androidx.appcompat) + implementation(libs.stream.log) + + // Compose + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.constraintlayout.compose) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.compose.material3) + + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.google.accompanist.permissions) + implementation(libs.google.accompanist.pager) + implementation(libs.google.accompanist.systemuicontroller) + + // Coil + implementation(libs.coil.compose) + implementation(libs.skydoves.landscapist.coil) + implementation(libs.skydoves.landscapist.placeholder) + implementation(libs.skydoves.landscapist.animation) + implementation(libs.coil.gif) + implementation(libs.coil.video) + + // UI + implementation(libs.reorderable) + + // Tests + testImplementation(project(":stream-chat-android-test")) + testImplementation(testFixtures(project(":stream-chat-android-core"))) + testImplementation(project(":stream-chat-android-previewdata")) + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + + detektPlugins(libs.detekt.formatting) + + baselineProfile(project(":stream-chat-android-benchmark")) +} diff --git a/stream-chat-android-compose/proguard-rules.pro b/stream-chat-android-compose/proguard-rules.pro index 481bb434814..ff59496d81a 100644 --- a/stream-chat-android-compose/proguard-rules.pro +++ b/stream-chat-android-compose/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-core/build.gradle b/stream-chat-android-core/build.gradle deleted file mode 100644 index d6de3eab1ce..00000000000 --- a/stream-chat-android-core/build.gradle +++ /dev/null @@ -1,57 +0,0 @@ -import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Dependencies - -plugins { - id 'java-library' - id 'java-test-fixtures' - id 'kotlin' -} - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-core' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - withSourcesJar() -} -test { - useJUnitPlatform() -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=kotlin.RequiresOptIn', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] - jvmTarget = JavaVersion.VERSION_11.toString() - } -} - -dependencies { - implementation Dependencies.kotlinReflect - implementation Dependencies.coroutinesCore - implementation Dependencies.androidxAnnotations - compileOnly Dependencies.composeStableMarker - - api Dependencies.streamResult - api Dependencies.streamResultCall - implementation Dependencies.streamLog - - detektPlugins(Dependencies.detektFormatting) - - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine -} diff --git a/stream-chat-android-core/build.gradle.kts b/stream-chat-android-core/build.gradle.kts new file mode 100644 index 00000000000..622436a25b0 --- /dev/null +++ b/stream-chat-android-core/build.gradle.kts @@ -0,0 +1,61 @@ +import io.getstream.chat.android.Configuration +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + id("java-library") + id("java-test-fixtures") + id("kotlin") +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-core") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + withSourcesJar() +} + +tasks.withType() { + useJUnitPlatform() +} + +tasks.withType().configureEach { + compilerOptions { + freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=kotlin.RequiresOptIn", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) + jvmTarget.set(JvmTarget.JVM_11) + } +} + +dependencies { + implementation(libs.kotlin.reflect) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.androidx.annotation) + compileOnly(libs.skydoves.compose.stable.marker) + + api(libs.stream.result) + api(libs.stream.result.call) + implementation(libs.stream.log) + + detektPlugins(libs.detekt.formatting) + + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) +} diff --git a/stream-chat-android-docs/build.gradle b/stream-chat-android-docs/build.gradle deleted file mode 100644 index 832c3ede91e..00000000000 --- a/stream-chat-android-docs/build.gradle +++ /dev/null @@ -1,111 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Versions - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'org.jetbrains.kotlin.plugin.compose' - -apply from: "${rootDir}/scripts/android.gradle" -apply from: "${rootDir}/scripts/detekt-disabled.gradle" - -android { - namespace "io.getstream.chat.docs" - defaultConfig { - applicationId "io.getstream.chat.docs" - } - - signingConfigs { - release { - storeFile rootProject.file('.sign/debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - - debug { - storeFile rootProject.file('.sign/debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - } - - buildTypes { - debug { - versionNameSuffix "-DEBUG" - applicationIdSuffix ".debug" - testCoverageEnabled false - debuggable true - minifyEnabled false - shrinkResources false - signingConfig signingConfigs.debug - } - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.release - } - } - - lintOptions { - abortOnError false - xmlReport true - checkDependencies true - } - - packagingOptions { - exclude 'META-INF/DEPENDENCIES' - exclude 'META-INF/LICENSE' - exclude 'META-INF/LICENSE.txt' - exclude 'META-INF/license.txt' - exclude 'META-INF/NOTICE' - exclude 'META-INF/NOTICE.txt' - exclude 'META-INF/notice.txt' - exclude 'META-INF/ASL2.0' - } - - buildFeatures { - viewBinding true - compose true - } -} - -repositories { - -} - -dependencies { - implementation project(":stream-chat-android-offline") - implementation project(":stream-chat-android-state") - implementation project(":stream-chat-android-ui-components") - implementation project(":stream-chat-android-compose") - implementation project(":stream-chat-android-markdown-transformer") - - // Compose - implementation Dependencies.composeUi - implementation Dependencies.composeUiTooling - implementation Dependencies.composeFoundation - implementation Dependencies.composeMaterial - implementation Dependencies.composeMaterialIcons - implementation Dependencies.composeActivity - implementation Dependencies.composeViewModel - implementation Dependencies.composeAccompanistPermissions - implementation Dependencies.composeAccompanistPager - implementation Dependencies.composeLifecycle - implementation Dependencies.navigationCompose - implementation Dependencies.streamPushFirebase - implementation Dependencies.streamPushHuawei - implementation Dependencies.streamPushXiaomi - - implementation Dependencies.constraintLayout - implementation Dependencies.androidxFragmentKtx - implementation Dependencies.androidxStartup - implementation Dependencies.materialComponents - implementation Dependencies.shimmer - implementation Dependencies.firebaseMessaging - implementation Dependencies.huaweiPush - compileOnly files('../libraries/external/MiPush_SDK_Client_5_1_8-G_3rd.aar') - implementation Dependencies.coil - implementation Dependencies.composeLandscapistCoil - implementation Dependencies.composeLandscapistPlaceholder -} diff --git a/stream-chat-android-docs/build.gradle.kts b/stream-chat-android-docs/build.gradle.kts new file mode 100644 index 00000000000..302f814fbf7 --- /dev/null +++ b/stream-chat-android-docs/build.gradle.kts @@ -0,0 +1,118 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) +} + +apply(from = "${rootDir}/scripts/android.gradle") +apply(from = "${rootDir}/scripts/detekt-disabled.gradle") + +android { + namespace = "io.getstream.chat.docs" + defaultConfig { + applicationId = "io.getstream.chat.docs" + } + + signingConfigs { + create("release") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore") + storePassword = "android" + } + + getByName("debug") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore") + storePassword = "android" + } + } + + buildTypes { + getByName("debug") { + versionNameSuffix = "-DEBUG" + applicationIdSuffix = ".debug" + isDebuggable = true + isMinifyEnabled = false + isShrinkResources = false + signingConfig = signingConfigs.getByName("debug") + } + getByName("release") { + isMinifyEnabled = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + signingConfig = signingConfigs.getByName("release") + } + } + + lint { + abortOnError = false + xmlReport = true + checkDependencies = true + } + + packaging { + resources.excludes += setOf( + "META-INF/DEPENDENCIES", + "META-INF/LICENSE", + "META-INF/LICENSE.txt", + "META-INF/license.txt", + "META-INF/NOTICE", + "META-INF/NOTICE.txt", + "META-INF/notice.txt", + "META-INF/ASL2.0", + ) + } + + buildFeatures { + viewBinding = true + compose = true + } +} + +repositories { + +} + +dependencies { + implementation(project(":stream-chat-android-offline")) + implementation(project(":stream-chat-android-state")) + implementation(project(":stream-chat-android-ui-components")) + implementation(project(":stream-chat-android-compose")) + implementation(project(":stream-chat-android-markdown-transformer")) + + + // Compose + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.compose.foundation) + + implementation(libs.androidx.compose.material) + implementation(libs.androidx.compose.material.icons.core) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.google.accompanist.permissions) + implementation(libs.google.accompanist.pager) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.androidx.navigation.compose) + + + implementation(libs.stream.push.firebase) + implementation(libs.stream.push.huawei) + implementation(libs.stream.push.xiaomi) + + implementation(libs.androidx.constraintlayout) + implementation(libs.androidx.fragment.ktx) + implementation(libs.androidx.startup.runtime) + implementation(libs.android.material) + implementation(libs.shimmer) + implementation(libs.firebase.messaging) + implementation(libs.huawei.push) + compileOnly(files("../libraries/external/MiPush_SDK_Client_5_1_8-G_3rd.aar")) + implementation(libs.coil) + implementation(libs.skydoves.landscapist.coil) + implementation(libs.skydoves.landscapist.placeholder) +} diff --git a/stream-chat-android-e2e-test/build.gradle b/stream-chat-android-e2e-test/build.gradle deleted file mode 100644 index 913d2277df7..00000000000 --- a/stream-chat-android-e2e-test/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -import io.getstream.chat.android.Dependencies - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -apply from: "${rootDir}/scripts/android.gradle" -apply from: "${rootDir}/scripts/detekt-test.gradle" - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] - } -} - -android { - namespace "io.getstream.chat.android.e2e.test" -} - -dependencies { - implementation(Dependencies.okhttp) - implementation(Dependencies.androidxTest) - implementation(Dependencies.androidxUiAutomator) - implementation(Dependencies.androidxTestMonitor) - implementation(Dependencies.androidxTestJunitKtx) - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-e2e-test/build.gradle.kts b/stream-chat-android-e2e-test/build.gradle.kts new file mode 100644 index 00000000000..f5e1a914cdb --- /dev/null +++ b/stream-chat-android-e2e-test/build.gradle.kts @@ -0,0 +1,33 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) +} + +apply(from = "$rootDir/scripts/android.gradle") +apply(from = "$rootDir/scripts/detekt-test.gradle") + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) +} + +android { + namespace = "io.getstream.chat.android.e2e.test" +} + +dependencies { + implementation(libs.okhttp) + implementation(libs.androidx.test.core) + implementation(libs.androidx.test.uiautomator) + implementation(libs.androidx.test.monitor) + implementation(libs.androidx.test.junit.ktx) + + detektPlugins(libs.detekt.formatting) +} diff --git a/stream-chat-android-e2e-test/proguard-rules.pro b/stream-chat-android-e2e-test/proguard-rules.pro index 481bb434814..ff59496d81a 100644 --- a/stream-chat-android-e2e-test/proguard-rules.pro +++ b/stream-chat-android-e2e-test/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-markdown-transformer/build.gradle b/stream-chat-android-markdown-transformer/build.gradle deleted file mode 100644 index 2707feec374..00000000000 --- a/stream-chat-android-markdown-transformer/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Configuration - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'de.mannodermaus.android-junit5' - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-markdown-transformer' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.ui.markdown" - sourceSets { - all { - it.java.srcDir "src/$it.name/kotlin" - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] - } -} - -dependencies { - implementation project(":stream-chat-android-ui-components") - - implementation Dependencies.androidxCoreKtx - - // Markdown - implementation Dependencies.markwonCore - implementation Dependencies.markwonLinkify - implementation Dependencies.markwonextStrikethrough - implementation Dependencies.markwonImage - - // Tests - testImplementation Dependencies.junitJupiterApi - testRuntimeOnly Dependencies.junitJupiterEngine - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-markdown-transformer/build.gradle.kts b/stream-chat-android-markdown-transformer/build.gradle.kts new file mode 100644 index 00000000000..c67a01ca6be --- /dev/null +++ b/stream-chat-android-markdown-transformer/build.gradle.kts @@ -0,0 +1,53 @@ +import io.getstream.chat.android.Configuration +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.android.junit5) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-markdown-transformer") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.ui.markdown" + sourceSets { + all { + java.srcDir("src/$name/kotlin") + } + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) +} + +dependencies { + implementation(project(":stream-chat-android-ui-components")) + + implementation(libs.androidx.core.ktx) + + // Markdown + implementation(libs.markwon.core) + implementation(libs.markwon.linkify) + implementation(libs.markwon.ext.strikethrough) + implementation(libs.markwon.image) + + // Tests + testImplementation(libs.junit.jupiter.api) + testRuntimeOnly(libs.junit.jupiter.engine) + + detektPlugins(libs.detekt.formatting) +} diff --git a/stream-chat-android-offline/build.gradle b/stream-chat-android-offline/build.gradle deleted file mode 100644 index 9377cd70e6a..00000000000 --- a/stream-chat-android-offline/build.gradle +++ /dev/null @@ -1,130 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Configuration - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'com.google.devtools.ksp' -apply plugin: 'de.mannodermaus.android-junit5' -apply plugin: 'androidx.baselineprofile' - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-offline' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.offline" - defaultConfig { - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - testOptions.unitTests { - includeAndroidResources = true - returnDefaultValues = true - all { - testLogging { - events 'failed', 'standardOut', 'standardError' - showExceptions true - showCauses true - showStackTraces true - exceptionFormat 'full' - } - } - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - debug { - testCoverageEnabled false - } - } -} - -baselineProfile { - baselineProfileOutputDir = "." - filter { - include("io.getstream.chat.android.offline.**") - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=kotlin.RequiresOptIn', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] - jvmTarget = JavaVersion.VERSION_11.toString() - } -} - -dependencies { - api project(":stream-chat-android-client") - - implementation Dependencies.streamLog - // Kotlin - implementation Dependencies.kotlinReflect - implementation Dependencies.coroutinesCore - - // Google libs - implementation Dependencies.androidxAppCompat - implementation Dependencies.androidxCoreKtx - implementation Dependencies.androidxLifecycleLiveDataKtx - implementation Dependencies.roomRuntime - implementation Dependencies.roomKtx - ksp Dependencies.roomCompiler - implementation Dependencies.workRuntimeKtx - - // Serialization - implementation Dependencies.moshi - implementation Dependencies.moshiKotlin - implementation Dependencies.moshiAdapters - ksp Dependencies.moshiCodegen - - // Tests - testImplementation project(":stream-chat-android-test") - testImplementation project(":stream-chat-android-client-test") - testImplementation testFixtures(project(":stream-chat-android-core")) - testImplementation Dependencies.streamResult - testImplementation Dependencies.moshiKotlin - - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - - testImplementation Dependencies.androidxTest - testImplementation Dependencies.androidxTestJunit - testImplementation Dependencies.androidxArchCoreTest - testImplementation Dependencies.androidxRecyclerview // for performance test - testImplementation Dependencies.roomTesting - testImplementation Dependencies.workTesting - - testImplementation Dependencies.coroutinesTest - - testImplementation Dependencies.robolectric - - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - testImplementation Dependencies.turbine - - // Instrumentation tests - androidTestImplementation Dependencies.androidxTestJunit - androidTestImplementation Dependencies.espressoCore - androidTestImplementation Dependencies.junit4 - androidTestImplementation Dependencies.kluent - androidTestImplementation Dependencies.mockito - androidTestImplementation Dependencies.mockitoKotlin - - detektPlugins(Dependencies.detektFormatting) - - baselineProfile(project(":stream-chat-android-benchmark")) -} diff --git a/stream-chat-android-offline/build.gradle.kts b/stream-chat-android-offline/build.gradle.kts new file mode 100644 index 00000000000..a2aa509b0b0 --- /dev/null +++ b/stream-chat-android-offline/build.gradle.kts @@ -0,0 +1,150 @@ +import io.getstream.chat.android.Configuration +import org.gradle.api.tasks.testing.logging.TestExceptionFormat +import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.ksp) + alias(libs.plugins.android.junit5) + alias(libs.plugins.androidx.baseline.profile) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-offline") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.offline" + defaultConfig { + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + unitTests.isReturnDefaultValues = true + all { + it.testLogging { + events = setOf( + TestLogEvent.FAILED, + TestLogEvent.STANDARD_OUT, + TestLogEvent.STANDARD_ERROR, + ) + showExceptions = true + showCauses = true + showStackTraces = true + exceptionFormat = TestExceptionFormat.FULL + } + } + } + } + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + } + debug { + enableUnitTestCoverage = false + } + } +} + +baselineProfile { + baselineProfileOutputDir = "." + filter { + include("io.getstream.chat.android.offline.**") + } +} + +tasks.withType().configureEach { + compilerOptions { + freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=kotlin.RequiresOptIn", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) + jvmTarget.set(JvmTarget.JVM_11) + } +} + +dependencies { + api(project(":stream-chat-android-client")) + + implementation(libs.stream.log) + // Kotlin + + implementation(libs.kotlin.reflect) + implementation(libs.kotlinx.coroutines.core) + + // Google libs + + implementation(libs.androidx.appcompat) + implementation(libs.androidx.core.ktx) + + implementation(libs.androidx.lifecycle.livedata.ktx) + implementation(libs.androidx.room.runtime) + implementation(libs.androidx.room.ktx) + ksp(libs.androidx.room.compiler) + implementation(libs.androidx.work) + + // Serialization + implementation(libs.moshi) + implementation(libs.moshi.kotlin) + implementation(libs.moshi.adapters) + ksp(libs.moshi.codegen) + + // Tests + testImplementation(project(":stream-chat-android-test")) + testImplementation(project(":stream-chat-android-client-test")) + testImplementation(testFixtures(project(":stream-chat-android-core"))) + + testImplementation(libs.stream.result) + + testImplementation(libs.moshi.kotlin) + + testImplementation(libs.junit.jupiter.api) + + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + + testImplementation(libs.androidx.test.core) + testImplementation(libs.androidx.test.junit) + testImplementation(libs.androidx.core.testing) + testImplementation(libs.androidx.recyclerview) // for performance test + testImplementation(libs.androidx.room.testing) + testImplementation(libs.androidx.work.testing) + + testImplementation(libs.kotlinx.coroutines.test) + testImplementation(libs.robolectric) + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.turbine) + + // Instrumentation tests + androidTestImplementation(libs.androidx.test.junit) + androidTestImplementation(libs.androidx.test.espresso.core) + androidTestImplementation(libs.junit) + androidTestImplementation(libs.kluent) + androidTestImplementation(libs.mockito) + androidTestImplementation(libs.mockito.kotlin) + + detektPlugins(libs.detekt.formatting) + + baselineProfile(project(":stream-chat-android-benchmark")) +} diff --git a/stream-chat-android-offline/proguard-rules.pro b/stream-chat-android-offline/proguard-rules.pro index f1b424510da..2f9dc5a47ed 100644 --- a/stream-chat-android-offline/proguard-rules.pro +++ b/stream-chat-android-offline/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-previewdata/build.gradle.kts b/stream-chat-android-previewdata/build.gradle.kts index 6c55669110d..e87e2dd546c 100644 --- a/stream-chat-android-previewdata/build.gradle.kts +++ b/stream-chat-android-previewdata/build.gradle.kts @@ -1,9 +1,8 @@ import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Dependencies plugins { - id("com.android.library") - id("org.jetbrains.kotlin.android") + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) } rootProject.extra.apply { @@ -35,5 +34,5 @@ tasks.withType { dependencies { api(project(":stream-chat-android-client")) - detektPlugins(Dependencies.detektFormatting) + detektPlugins(libs.detekt.formatting) } diff --git a/stream-chat-android-state/build.gradle b/stream-chat-android-state/build.gradle deleted file mode 100644 index d12db51856f..00000000000 --- a/stream-chat-android-state/build.gradle +++ /dev/null @@ -1,117 +0,0 @@ -import io.getstream.chat.android.Dependencies - -plugins { - id 'com.android.library' - id 'org.jetbrains.kotlin.android' - id 'de.mannodermaus.android-junit5' - id 'androidx.baselineprofile' -} - - -ext { - PUBLISH_GROUP_ID = io.getstream.chat.android.Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-state' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.state" - defaultConfig { - vectorDrawables.useSupportLibrary = true - } - - resourcePrefix 'stream_' - - testOptions { - unitTests { - includeAndroidResources = true - unitTests.returnDefaultValues = true - // Show the result of every unit test, even if it passes. - all { - testLogging { - events 'passed', 'skipped', 'failed', 'standardOut', 'standardError' - } - } - } - } - - sourceSets { - all { - it.java.srcDir "src/$it.name/kotlin" - } - } -} - -baselineProfile { - baselineProfileOutputDir = "." - filter { - include("io.getstream.chat.android.state.**") - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi' - ] - } -} - -dependencies { - api project(":stream-chat-android-client") - - implementation Dependencies.streamLog - // Kotlin - implementation Dependencies.kotlinReflect - implementation Dependencies.coroutinesCore - - // Google libs - implementation Dependencies.androidxActivityKtx - implementation Dependencies.androidxAnnotations - implementation Dependencies.androidxAppCompat - implementation Dependencies.workRuntimeKtx - - // Tests - testImplementation project(":stream-chat-android-test") - testImplementation project(":stream-chat-android-client-test") - testImplementation testFixtures(project(":stream-chat-android-core")) - testImplementation Dependencies.moshiKotlin - - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - - testImplementation Dependencies.androidxTest - testImplementation Dependencies.androidxTestJunit - testImplementation Dependencies.androidxArchCoreTest - testImplementation Dependencies.androidxRecyclerview // for performance test - testImplementation Dependencies.roomTesting - testImplementation Dependencies.workTesting - - testImplementation Dependencies.coroutinesTest - - testImplementation Dependencies.robolectric - - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - testImplementation Dependencies.turbine - - // Instrumentation tests - androidTestImplementation Dependencies.androidxTestJunit - androidTestImplementation Dependencies.espressoCore - androidTestImplementation Dependencies.junit4 - androidTestImplementation Dependencies.kluent - androidTestImplementation Dependencies.mockito - androidTestImplementation Dependencies.mockitoKotlin - - detektPlugins(Dependencies.detektFormatting) - - baselineProfile(project(":stream-chat-android-benchmark")) -} diff --git a/stream-chat-android-state/build.gradle.kts b/stream-chat-android-state/build.gradle.kts new file mode 100644 index 00000000000..0c7b9198f46 --- /dev/null +++ b/stream-chat-android-state/build.gradle.kts @@ -0,0 +1,121 @@ +import io.getstream.chat.android.Configuration +import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.android.junit5) + alias(libs.plugins.androidx.baseline.profile) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-state") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.state" + defaultConfig { + vectorDrawables.useSupportLibrary = true + } + + resourcePrefix = "stream_" + + testOptions { + unitTests { + isIncludeAndroidResources = true + unitTests.isReturnDefaultValues = true + all { + it.testLogging { + events = setOf( + TestLogEvent.PASSED, + TestLogEvent.SKIPPED, + TestLogEvent.FAILED, + TestLogEvent.STANDARD_OUT, + TestLogEvent.STANDARD_ERROR, + ) + } + } + } + } + + sourceSets { + all { + java.srcDir("src/$name/kotlin") + } + } +} + +baselineProfile { + baselineProfileOutputDir = "." + filter { + include("io.getstream.chat.android.state.**") + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) +} + +dependencies { + api(project(":stream-chat-android-client")) + + implementation(libs.stream.log) + // Kotlin + implementation(libs.kotlin.reflect) + implementation(libs.kotlinx.coroutines.core) + + // Google libs + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.annotation) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.work) + + // Tests + testImplementation(project(":stream-chat-android-test")) + testImplementation(project(":stream-chat-android-client-test")) + testImplementation(testFixtures(project(":stream-chat-android-core"))) + testImplementation(libs.moshi.kotlin) + + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + + testImplementation(libs.androidx.test.core) + testImplementation(libs.androidx.test.junit) + testImplementation(libs.androidx.core.testing) + testImplementation(libs.androidx.recyclerview) // for performance test + testImplementation(libs.androidx.room.testing) + testImplementation(libs.androidx.work.testing) + + testImplementation(libs.kotlinx.coroutines.test) + testImplementation(libs.robolectric) + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.turbine) + + // Instrumentation tests + androidTestImplementation(libs.androidx.test.junit) + androidTestImplementation(libs.androidx.test.espresso.core) + androidTestImplementation(libs.junit) + androidTestImplementation(libs.kluent) + androidTestImplementation(libs.mockito) + androidTestImplementation(libs.mockito.kotlin) + + detektPlugins(libs.detekt.formatting) + + baselineProfile(project(":stream-chat-android-benchmark")) +} diff --git a/stream-chat-android-state/proguard-rules.pro b/stream-chat-android-state/proguard-rules.pro index 481bb434814..ff59496d81a 100644 --- a/stream-chat-android-state/proguard-rules.pro +++ b/stream-chat-android-state/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-test/build.gradle b/stream-chat-android-test/build.gradle deleted file mode 100644 index d894512e2ba..00000000000 --- a/stream-chat-android-test/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -import io.getstream.chat.android.Dependencies - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -apply from: "${rootDir}/scripts/android.gradle" -apply from: "${rootDir}/scripts/detekt-test.gradle" - -android { - namespace "io.getstream.chat.android.test" -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - ] - } -} - -dependencies { - api project(":stream-chat-android-core") - - implementation Dependencies.androidxLifecycleLiveDataKtx - api Dependencies.coroutinesTest - implementation Dependencies.androidxArchCoreTest - implementation Dependencies.junitJupiterApi - implementation Dependencies.junit4 - implementation Dependencies.streamLog - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-test/build.gradle.kts b/stream-chat-android-test/build.gradle.kts new file mode 100644 index 00000000000..3b2088163ca --- /dev/null +++ b/stream-chat-android-test/build.gradle.kts @@ -0,0 +1,35 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) +} +apply(from = "$rootDir/scripts/android.gradle") +apply(from = "$rootDir/scripts/detekt-test.gradle") + +android { + namespace = "io.getstream.chat.android.test" +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) +} + +dependencies { + api(project(":stream-chat-android-core")) + + implementation(libs.androidx.lifecycle.livedata.ktx) + api(libs.kotlinx.coroutines.test) + implementation(libs.androidx.core.testing) + implementation(libs.junit.jupiter.api) + implementation(libs.junit) + implementation(libs.stream.log) + + detektPlugins(libs.detekt.formatting) +} diff --git a/stream-chat-android-ui-common/build.gradle b/stream-chat-android-ui-common/build.gradle deleted file mode 100644 index 37b0250ae88..00000000000 --- a/stream-chat-android-ui-common/build.gradle +++ /dev/null @@ -1,112 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Versions - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'org.jetbrains.kotlin.plugin.compose' -apply plugin: 'de.mannodermaus.android-junit5' -apply plugin: 'androidx.baselineprofile' - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-ui-common' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.ui.common" - defaultConfig { - vectorDrawables.useSupportLibrary = true - consumerProguardFiles 'consumer-proguard-rules.pro' - } - - resourcePrefix 'stream_' - - testOptions { - unitTests { - includeAndroidResources = true - unitTests.returnDefaultValues = true - // Show the result of every unit test, even if it passes. - all { - testLogging { - events 'passed', 'skipped', 'failed', 'standardOut', 'standardError' - } - } - } - } - - sourceSets { - all { - it.java.srcDir "src/$it.name/kotlin" - } - } - - buildFeatures { - compose true - } -} - -baselineProfile { - baselineProfileOutputDir = "." - filter { - include("io.getstream.chat.android.ui.common.**") - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi' - ] - } -} - -dependencies { - api project(":stream-chat-android-state") - implementation project(":stream-chat-android-ui-utils") - - implementation Dependencies.streamLog - implementation Dependencies.streamPushPermissionsSnackbar - implementation Dependencies.streamResult - implementation Dependencies.composeRuntime - - implementation Dependencies.androidxActivityKtx - implementation Dependencies.androidxAnnotations - implementation Dependencies.androidxAppCompat - implementation Dependencies.androidxRecyclerview - implementation Dependencies.androidxStartup - implementation Dependencies.constraintLayout - implementation Dependencies.materialComponents - implementation Dependencies.androidxLifecycleLiveDataKtx - - implementation Dependencies.coil - implementation Dependencies.coilGif - implementation Dependencies.coilVideo - - testImplementation project(":stream-chat-android-test") - testImplementation testFixtures(project(":stream-chat-android-core")) - testImplementation Dependencies.kotlinReflect - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - - testImplementation Dependencies.threeTenBp - - testImplementation Dependencies.androidxArchCoreTest - testImplementation Dependencies.testParameterInjector - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - testImplementation Dependencies.coroutinesTest - - detektPlugins(Dependencies.detektFormatting) - - baselineProfile(project(":stream-chat-android-benchmark")) -} diff --git a/stream-chat-android-ui-common/build.gradle.kts b/stream-chat-android-ui-common/build.gradle.kts new file mode 100644 index 00000000000..2cb10eb56bf --- /dev/null +++ b/stream-chat-android-ui-common/build.gradle.kts @@ -0,0 +1,119 @@ +import io.getstream.chat.android.Configuration +import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.android.junit5) + alias(libs.plugins.androidx.baseline.profile) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-ui-common") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.ui.common" + defaultConfig { + vectorDrawables.useSupportLibrary = true + consumerProguardFiles("consumer-proguard-rules.pro") + } + + resourcePrefix = "stream_" + + testOptions { + unitTests { + isIncludeAndroidResources = true + unitTests.isReturnDefaultValues = true + // // Show the result of every unit test, even if it passes. + all { + it.testLogging { + events = setOf( + TestLogEvent.PASSED, + TestLogEvent.SKIPPED, + TestLogEvent.FAILED, + TestLogEvent.STANDARD_OUT, + TestLogEvent.STANDARD_ERROR, + ) + } + } + } + } + + sourceSets { + all { + java.srcDir("src/$name/kotlin") + } + } + + buildFeatures { + compose = true + } +} + +baselineProfile { + baselineProfileOutputDir = "." + filter { + include("io.getstream.chat.android.ui.common.**") + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) +} + +dependencies { + api(project(":stream-chat-android-state")) + implementation(project(":stream-chat-android-ui-utils")) + + implementation(libs.stream.log) + implementation(libs.stream.push.permissions.snackbar) + implementation(libs.stream.result) + implementation(libs.androidx.compose.runtime) + + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.annotation) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.recyclerview) + implementation(libs.androidx.startup.runtime) + implementation(libs.androidx.constraintlayout) + implementation(libs.android.material) + implementation(libs.androidx.lifecycle.livedata.ktx) + + implementation(libs.coil) + implementation(libs.coil.gif) + implementation(libs.coil.video) + + testImplementation(project(":stream-chat-android-test")) + testImplementation(testFixtures(project(":stream-chat-android-core"))) + testImplementation(libs.kotlin.reflect) + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + + testImplementation(libs.threetenbp) + testImplementation(libs.androidx.core.testing) + testImplementation(libs.test.parameter.injector) + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.kotlinx.coroutines.test) + + detektPlugins(libs.detekt.formatting) + + baselineProfile(project(":stream-chat-android-benchmark")) +} diff --git a/stream-chat-android-ui-components-sample/build.gradle b/stream-chat-android-ui-components-sample/build.gradle deleted file mode 100644 index e0d996390f8..00000000000 --- a/stream-chat-android-ui-components-sample/build.gradle +++ /dev/null @@ -1,175 +0,0 @@ -import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Dependencies - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'androidx.navigation.safeargs.kotlin' -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.crashlytics' -apply plugin: 'shot' - -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.ui.sample" - defaultConfig { - targetSdk Configuration.sampleTargetSdk - applicationId "io.getstream.chat.ui.sample" - versionCode sampleAppVersionCode - versionName sampleAppVersionName - testInstrumentationRunner "com.karumi.shot.ShotTestRunner" - testApplicationId "io.getstream.chat.ui.sample" - } - - packagingOptions { - exclude 'META-INF/*' - } - - File signFile = rootProject.file('.sign/keystore.properties') - if (signFile.exists()) { - Properties properties = new Properties() - properties.load(new FileInputStream(signFile)) - signingConfigs { - release { - storeFile rootProject.file(properties['keystore']) - storePassword properties['storePassword'] - keyAlias properties['keyAlias'] - keyPassword properties['keyPassword'] - } - } - } else { - signingConfigs { - release { - storeFile rootProject.file('.sign/debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - } - } - - signingConfigs.debug { - storeFile rootProject.file('.sign/debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - - buildTypes { - debug { - versionNameSuffix "-DEBUG" - applicationIdSuffix ".debug" - testCoverageEnabled false - debuggable true - minifyEnabled false - shrinkResources false - signingConfig signingConfigs.debug - } - benchmark { - signingConfig signingConfigs.debug - matchingFallbacks = ['release'] - debuggable false - } - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.release - } - } - - flavorDimensions "version" - productFlavors { - demo { - dimension "version" - } - full { - dimension "version" - } - } - - variantFilter { variant -> - def names = variant.flavors*.name - if (variant.buildType.name == "debug" && names.contains("full")) { - setIgnore(true) - } - } - - lintOptions { - abortOnError false - xmlReport true - checkDependencies true - disable 'MissingTranslation' - } - - packagingOptions { - exclude 'META-INF/DEPENDENCIES' - exclude 'META-INF/LICENSE' - exclude 'META-INF/LICENSE.txt' - exclude 'META-INF/license.txt' - exclude 'META-INF/NOTICE' - exclude 'META-INF/NOTICE.txt' - exclude 'META-INF/notice.txt' - exclude 'META-INF/ASL2.0' - } - - buildFeatures { - viewBinding true - buildConfig true - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-opt-in=kotlin.RequiresOptIn', - ] - } -} - -shot { - applicationId = "io.getstream.chat.ui.sample" -} - -dependencies { - implementation project(":stream-chat-android-ui-components") - implementation project(":stream-chat-android-markdown-transformer") - implementation project(":stream-chat-android-offline") - implementation files('../libraries/external/MiPush_SDK_Client_5_1_8-G_3rd.aar') - - implementation Dependencies.streamLog - implementation Dependencies.androidxActivityKtx - implementation Dependencies.androidxAppCompat - implementation Dependencies.androidxCoreKtx - implementation Dependencies.androidxLifecycleLiveDataKtx - implementation Dependencies.androidxPreferences - implementation Dependencies.constraintLayout - implementation Dependencies.androidxFragmentKtx - implementation Dependencies.materialComponents - implementation Dependencies.streamPushFirebase - implementation Dependencies.streamPushHuawei - implementation Dependencies.streamPushXiaomi - - implementation Dependencies.navigationRuntimeKTX - implementation Dependencies.navigationFragmentKTX - implementation Dependencies.navigationUIKTX - - implementation Dependencies.firebaseAnalytics - implementation Dependencies.firebaseCrashlytics - - implementation Dependencies.coil - implementation Dependencies.coilGif - implementation Dependencies.shimmer - - debugImplementation Dependencies.flipper - debugImplementation Dependencies.flipperNetwork - debugImplementation Dependencies.flipperLoader - debugImplementation Dependencies.fragmentTest - - // Instrumentation tests - androidTestImplementation Dependencies.junit4 - androidTestImplementation Dependencies.espressoCore - androidTestImplementation Dependencies.androidxTestJunit - androidTestImplementation Dependencies.navigationTest - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-ui-components-sample/build.gradle.kts b/stream-chat-android-ui-components-sample/build.gradle.kts new file mode 100644 index 00000000000..aec1d358605 --- /dev/null +++ b/stream-chat-android-ui-components-sample/build.gradle.kts @@ -0,0 +1,190 @@ +import io.getstream.chat.android.Configuration +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import java.io.FileInputStream +import java.util.Properties + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.androidx.navigation) + alias(libs.plugins.google.services) + alias(libs.plugins.firebase.crashlytics) + alias(libs.plugins.shot) +} + +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.ui.sample" + defaultConfig { + targetSdk = Configuration.sampleTargetSdk + applicationId = "io.getstream.chat.ui.sample" + versionCode = rootProject.extra.get("sampleAppVersionCode") as Int + versionName = rootProject.extra.get("sampleAppVersionName") as String + testInstrumentationRunner = "com.karumi.shot.ShotTestRunner" + testApplicationId = "io.getstream.chat.ui.sample" + } + + packaging { + resources.excludes += setOf( + "META-INF/*", + "META-INF/DEPENDENCIES", + "META-INF/LICENSE", + "META-INF/LICENSE.txt", + "META-INF/license.txt", + "META-INF/NOTICE", + "META-INF/NOTICE.txt", + "META-INF/notice.txt", + "META-INF/ASL2.0", + ) + } + + val signFile = rootProject.file(".sign/keystore.properties") + if (signFile.exists()) { + val properties = Properties() + properties.load(FileInputStream(signFile)) + + signingConfigs { + create("release") { + keyAlias = properties["keyAlias"] as? String + keyPassword = properties["keyPassword"] as? String + storeFile = rootProject.file(properties["keystore"] as String) + storePassword = properties["storePassword"] as? String + } + } + } else { + signingConfigs { + create("release") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore") + storePassword = "android" + } + } + } + + signingConfigs { + getByName("debug") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore") + storePassword = "android" + } + } + + buildTypes { + getByName("debug") { + versionNameSuffix = "-DEBUG" + applicationIdSuffix = ".debug" + isDebuggable = true + isMinifyEnabled = false + isShrinkResources = false + signingConfig = signingConfigs.getByName("debug") + buildConfigField("Boolean", "BENCHMARK", "false") + } + create("benchmark") { + isDebuggable = false + signingConfig = signingConfigs.getByName("debug") + matchingFallbacks += listOf("release") + proguardFiles("benchmark-rules.pro") + buildConfigField("Boolean", "BENCHMARK", "true") + } + getByName("release") { + isMinifyEnabled = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + signingConfig = signingConfigs.getByName("release") + buildConfigField("Boolean", "BENCHMARK", "false") + } + } + + flavorDimensions += "version" + productFlavors { + create("demo") { + dimension = "version" + } + create("full") { + dimension = "version" + } + } + + lint { + abortOnError = false + xmlReport = true + checkDependencies = true + disable += "MissingTranslation" + } + + buildFeatures { + viewBinding = true + buildConfig = true + } +} + +androidComponents { + beforeVariants { variantBuilder -> + if (variantBuilder.buildType != "debug" && + variantBuilder.productFlavors.any { it.second.contains("full") } + ) { + variantBuilder.enable = false + } + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-opt-in=kotlin.RequiresOptIn", + ), + ) +} + +shot { + applicationId = "io.getstream.chat.ui.sample" +} + +dependencies { + implementation(project(":stream-chat-android-ui-components")) + implementation(project(":stream-chat-android-markdown-transformer")) + implementation(project(":stream-chat-android-offline")) + implementation(files("../libraries/external/MiPush_SDK_Client_5_1_8-G_3rd.aar")) + + implementation(libs.stream.log) + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.livedata.ktx) + implementation(libs.androidx.preference) + implementation(libs.androidx.constraintlayout) + implementation(libs.androidx.fragment.ktx) + implementation(libs.androidx.compose.material) + implementation(libs.stream.push.firebase) + implementation(libs.stream.push.huawei) + implementation(libs.stream.push.xiaomi) + + implementation(libs.androidx.navigation.runtime.ktx) + implementation(libs.androidx.navigation.fragment.ktx) + implementation(libs.androidx.navigation.ui.ktx) + + implementation(libs.firebase.analytics.ktx) + implementation(libs.firebase.crashlytics) + + implementation(libs.coil) + implementation(libs.coil.gif) + implementation(libs.shimmer) + + debugImplementation(libs.flipper) + debugImplementation(libs.flipper.network) + debugImplementation(libs.flipper.so.loader) + debugImplementation(libs.androidx.fragment.testing) + + // Instrumentation tests + androidTestImplementation(libs.junit) + androidTestImplementation(libs.androidx.test.espresso.core) + androidTestImplementation(libs.androidx.test.junit) + androidTestImplementation(libs.androidx.navigation.testing) + + detektPlugins(libs.detekt.formatting) +} diff --git a/stream-chat-android-ui-components-sample/proguard-rules.pro b/stream-chat-android-ui-components-sample/proguard-rules.pro index 32fd850f12b..a264d418fb4 100644 --- a/stream-chat-android-ui-components-sample/proguard-rules.pro +++ b/stream-chat-android-ui-components-sample/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-ui-components/build.gradle b/stream-chat-android-ui-components/build.gradle deleted file mode 100644 index 27d4c9f962f..00000000000 --- a/stream-chat-android-ui-components/build.gradle +++ /dev/null @@ -1,107 +0,0 @@ -import io.getstream.chat.android.Configuration -import io.getstream.chat.android.Dependencies - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-parcelize' -apply plugin: 'de.mannodermaus.android-junit5' -apply plugin: 'androidx.baselineprofile' - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-ui-components' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.ui" - defaultConfig { - vectorDrawables.useSupportLibrary = true - } - - resourcePrefix 'stream_ui_' - - buildFeatures { - viewBinding true - } - - testOptions { - unitTests { - includeAndroidResources = true - unitTests.returnDefaultValues = true - // Show the result of every unit test, even if it passes. - all { - testLogging { - events 'passed', 'skipped', 'failed', 'standardOut', 'standardError' - } - } - } - } - - sourceSets { - all { - it.java.srcDir "src/$it.name/kotlin" - } - } -} - -baselineProfile { - baselineProfileOutputDir = "." - filter { - include("io.getstream.chat.android.ui.**") - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=kotlin.contracts.ExperimentalContracts', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi', - '-opt-in=io.getstream.chat.android.core.ExperimentalStreamChatApi', - ] - } -} - -dependencies { - api project(":stream-chat-android-ui-common") - implementation project(":stream-chat-android-ui-utils") - - implementation Dependencies.streamLog - implementation Dependencies.coroutinesCore - implementation Dependencies.androidxActivityKtx - implementation Dependencies.androidxAppCompat - implementation Dependencies.androidLegacySupport - implementation Dependencies.constraintLayout - implementation Dependencies.materialComponents - implementation Dependencies.androidxFragmentKtx - implementation Dependencies.androidxViewPager2 - implementation Dependencies.androidxCoreKtx - implementation Dependencies.photoviewDialog - implementation Dependencies.coil - implementation Dependencies.coilGif - implementation Dependencies.coilVideo - implementation Dependencies.androidxStartup - implementation Dependencies.androidxLifecycleLiveDataKtx - implementation Dependencies.keyboardVisibilityEvent - implementation Dependencies.permissionx - - // Tests - testImplementation project(":stream-chat-android-test") - testImplementation testFixtures(project(":stream-chat-android-core")) - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - testImplementation Dependencies.kluent - testImplementation Dependencies.mockitoKotlin - testImplementation Dependencies.androidxArchCoreTest - - detektPlugins(Dependencies.detektFormatting) - - baselineProfile(project(":stream-chat-android-benchmark")) -} diff --git a/stream-chat-android-ui-components/build.gradle.kts b/stream-chat-android-ui-components/build.gradle.kts new file mode 100644 index 00000000000..0934deb4c2d --- /dev/null +++ b/stream-chat-android-ui-components/build.gradle.kts @@ -0,0 +1,116 @@ +import io.getstream.chat.android.Configuration +import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.parcelize) + alias(libs.plugins.android.junit5) + alias(libs.plugins.androidx.baseline.profile) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-ui-components") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.ui" + defaultConfig { + vectorDrawables.useSupportLibrary = true + } + + resourcePrefix = "stream_ui_" + + buildFeatures { + viewBinding = true + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + unitTests.isReturnDefaultValues = true + // Show the result of every unit test, even if it passes. + all { + it.testLogging { + events = setOf( + TestLogEvent.PASSED, + TestLogEvent.SKIPPED, + TestLogEvent.FAILED, + TestLogEvent.STANDARD_OUT, + TestLogEvent.STANDARD_ERROR, + ) + } + } + } + } + + sourceSets { + all { + java.srcDir("src/$name/kotlin") + } + } +} + +baselineProfile { + baselineProfileOutputDir = "." + filter { + include("io.getstream.chat.android.ui.**") + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=kotlin.contracts.ExperimentalContracts", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + "-opt-in=io.getstream.chat.android.core.ExperimentalStreamChatApi", + ), + ) +} + +dependencies { + api(project(":stream-chat-android-ui-common")) + implementation(project(":stream-chat-android-ui-utils")) + + implementation(libs.stream.log) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.androidx.activity.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.legacy.support) + implementation(libs.androidx.constraintlayout) + implementation(libs.android.material) + implementation(libs.androidx.fragment.ktx) + implementation(libs.androidx.viewpager2) + implementation(libs.androidx.core.ktx) + implementation(libs.stream.photoview.dialog) + implementation(libs.coil) + implementation(libs.coil.gif) + implementation(libs.coil.video) + implementation(libs.androidx.startup.runtime) + implementation(libs.androidx.lifecycle.livedata.ktx) + implementation(libs.keyboardvisibilityevent) + implementation(libs.permissionx) + + // Tests + testImplementation(project(":stream-chat-android-test")) + testImplementation(testFixtures(project(":stream-chat-android-core"))) + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + testImplementation(libs.kluent) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.androidx.core.testing) + + detektPlugins(libs.detekt.formatting) + + baselineProfile(project(":stream-chat-android-benchmark")) +} diff --git a/stream-chat-android-ui-components/proguard-rules.pro b/stream-chat-android-ui-components/proguard-rules.pro index f1b424510da..2f9dc5a47ed 100644 --- a/stream-chat-android-ui-components/proguard-rules.pro +++ b/stream-chat-android-ui-components/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-ui-guides/build.gradle b/stream-chat-android-ui-guides/build.gradle deleted file mode 100644 index 3bfa88f9b46..00000000000 --- a/stream-chat-android-ui-guides/build.gradle +++ /dev/null @@ -1,69 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Versions - -plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' - id 'org.jetbrains.kotlin.plugin.compose' -} - -apply from: "${rootDir}/scripts/android.gradle" -apply from: "${rootDir}/scripts/detekt-compose.gradle" - -android { - namespace "io.getstream.chat.android.guides" - defaultConfig { - applicationId "io.getstream.chat.android.guides" - versionCode sampleAppVersionCode - versionName sampleAppVersionName - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - packagingOptions { - resources.excludes.add("META-INF/*") - } - - buildFeatures { - viewBinding true - compose true - } - - lintOptions { - disable 'MissingTranslation' - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-opt-in=kotlin.RequiresOptIn', - ] - } -} - -dependencies { - implementation project(":stream-chat-android-state") - implementation project(":stream-chat-android-offline") - implementation project(":stream-chat-android-ui-components") - implementation project(":stream-chat-android-compose") - - implementation Dependencies.androidxCoreKtx - implementation Dependencies.androidxAppCompat - implementation Dependencies.materialComponents - - // Compose - implementation Dependencies.composeUi - implementation Dependencies.composeUiTooling - implementation Dependencies.composeFoundation - implementation Dependencies.composeMaterial - implementation Dependencies.composeActivity - implementation Dependencies.composeViewModel - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-ui-guides/build.gradle.kts b/stream-chat-android-ui-guides/build.gradle.kts new file mode 100644 index 00000000000..3821e30dc90 --- /dev/null +++ b/stream-chat-android-ui-guides/build.gradle.kts @@ -0,0 +1,71 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) +} + +apply(from = "$rootDir/scripts/android.gradle") +apply(from = "$rootDir/scripts/detekt-compose.gradle") + +android { + namespace = "io.getstream.chat.android.guides" + defaultConfig { + applicationId = "io.getstream.chat.android.guides" + versionCode = rootProject.extra.get("sampleAppVersionCode") as Int + versionName = rootProject.extra.get("sampleAppVersionName") as String + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + } + } + + packagingOptions { + resources.excludes.add("META-INF/*") + } + + buildFeatures { + viewBinding = true + compose = true + } + + lint { + disable += "MissingTranslation" + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-opt-in=kotlin.RequiresOptIn", + ), + ) +} + +dependencies { + implementation(project(":stream-chat-android-state")) + implementation(project(":stream-chat-android-offline")) + implementation(project(":stream-chat-android-ui-components")) + implementation(project(":stream-chat-android-compose")) + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.android.material) + + // Compose + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + + detektPlugins(libs.detekt.formatting) +} diff --git a/stream-chat-android-ui-guides/proguard-rules.pro b/stream-chat-android-ui-guides/proguard-rules.pro index 481bb434814..ff59496d81a 100644 --- a/stream-chat-android-ui-guides/proguard-rules.pro +++ b/stream-chat-android-ui-guides/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-ui-uitests/build.gradle b/stream-chat-android-ui-uitests/build.gradle deleted file mode 100644 index 7f636cb0d24..00000000000 --- a/stream-chat-android-ui-uitests/build.gradle +++ /dev/null @@ -1,106 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Versions - -plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' - id 'org.jetbrains.kotlin.plugin.compose' - id 'shot' -} - -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.uitests" - defaultConfig { - applicationId "io.getstream.chat.android.uitests" - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "com.karumi.shot.ShotTestRunner" - testApplicationId "io.getstream.chat.android.uitests.test" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - packagingOptions { - resources.excludes.add("META-INF/*") - } - - buildFeatures { - viewBinding true - compose true - } - - lintOptions { - disable 'MissingTranslation' - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-opt-in=kotlin.RequiresOptIn', - ] - } -} - -shot { - applicationId = "io.getstream.chat.android.uitests" - tolerance = 1 -} - -dependencies { - implementation project(":stream-chat-android-offline") - implementation project(":stream-chat-android-ui-components") - implementation project(":stream-chat-android-compose") - - androidTestImplementation project(':stream-chat-android-test') - - implementation Dependencies.androidxCoreKtx - implementation Dependencies.androidxAppCompat - implementation Dependencies.materialComponents - - // Compose - implementation Dependencies.composeUi - implementation Dependencies.composeUiTooling - implementation Dependencies.composeFoundation - implementation Dependencies.composeMaterial - implementation Dependencies.composeActivity - implementation Dependencies.composeViewModel - implementation Dependencies.composeAccompanistPermissions - implementation Dependencies.composeAccompanistPager - implementation Dependencies.composeLandscapistCoil - - // Coil - androidTestImplementation Dependencies.coil - androidTestImplementation Dependencies.composeLandscapistCoil - androidTestImplementation Dependencies.coilGif - androidTestImplementation Dependencies.coilVideo - - // Instrumentation tests - debugImplementation(Dependencies.fragmentTest) { - exclude group: 'androidx.test', module: 'monitor' - } - androidTestImplementation(Dependencies.espressoContrib) { - exclude group: 'org.checkerframework' , module: 'checker' - } - androidTestImplementation Dependencies.junit4 - androidTestImplementation Dependencies.espressoCore - androidTestImplementation Dependencies.androidxArchCoreTest - androidTestImplementation Dependencies.espressoIdlingResources - androidTestImplementation Dependencies.androidxTestJunit - androidTestImplementation Dependencies.navigationTest - androidTestImplementation Dependencies.composeUiTest - androidTestImplementation Dependencies.composeUiTestManifest - androidTestImplementation Dependencies.testParameterInjector - androidTestImplementation Dependencies.okhttpMockWebserver - androidTestImplementation Dependencies.threeTenBp - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-ui-uitests/build.gradle.kts b/stream-chat-android-ui-uitests/build.gradle.kts new file mode 100644 index 00000000000..59ba87e89ea --- /dev/null +++ b/stream-chat-android-ui-uitests/build.gradle.kts @@ -0,0 +1,108 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.shot) +} + +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.uitests" + defaultConfig { + applicationId = "io.getstream.chat.android.uitests" + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "com.karumi.shot.ShotTestRunner" + testApplicationId = "io.getstream.chat.android.uitests.test" + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", + ) + } + } + + packagingOptions { + resources.excludes.add("META-INF/*") + } + + buildFeatures { + viewBinding = true + compose = true + } + + lintOptions { + disable += "MissingTranslation" + } +} + +tasks.withType { + compilerOptions.freeCompilerArgs.addAll( + listOf( + "-opt-in=kotlin.RequiresOptIn", + ), + ) +} + +shot { + applicationId = "io.getstream.chat.android.uitests" + tolerance = 1.0 +} + +dependencies { + implementation(project(":stream-chat-android-offline")) + implementation(project(":stream-chat-android-ui-components")) + implementation(project(":stream-chat-android-compose")) + + androidTestImplementation(project(":stream-chat-android-test")) + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.android.material) + + // Compose + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.google.accompanist.permissions) + implementation(libs.google.accompanist.pager) + implementation(libs.skydoves.landscapist.coil) + + // Coil + androidTestImplementation(libs.coil) + androidTestImplementation(libs.skydoves.landscapist.coil) + androidTestImplementation(libs.coil.gif) + androidTestImplementation(libs.coil.video) + + // Instrumentation tests + debugImplementation(libs.androidx.fragment.testing) { + exclude(group = "androidx.test", module = "monitor") + } + androidTestImplementation(libs.androidx.test.espresso.contrib) { + exclude(group = "org.checkerframework", module = "checker") + } + androidTestImplementation(libs.junit) + androidTestImplementation(libs.androidx.test.espresso.core) + androidTestImplementation(libs.androidx.core.testing) + androidTestImplementation(libs.androidx.test.espresso.idling.resource) + androidTestImplementation(libs.androidx.test.junit) + androidTestImplementation(libs.androidx.navigation.testing) + androidTestImplementation(libs.androidx.compose.ui.test.junit4) + androidTestImplementation(libs.androidx.compose.ui.test.manifest) + androidTestImplementation(libs.test.parameter.injector) + androidTestImplementation(libs.okhttp.mockwebserver) + androidTestImplementation(libs.threetenbp) + + detektPlugins(libs.detekt.formatting) +} diff --git a/stream-chat-android-ui-uitests/proguard-rules.pro b/stream-chat-android-ui-uitests/proguard-rules.pro index 481bb434814..ff59496d81a 100644 --- a/stream-chat-android-ui-uitests/proguard-rules.pro +++ b/stream-chat-android-ui-uitests/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/stream-chat-android-ui-utils/build.gradle b/stream-chat-android-ui-utils/build.gradle deleted file mode 100644 index 4f9d5fd6f70..00000000000 --- a/stream-chat-android-ui-utils/build.gradle +++ /dev/null @@ -1,76 +0,0 @@ -import io.getstream.chat.android.Dependencies -import io.getstream.chat.android.Configuration - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'de.mannodermaus.android-junit5' - -ext { - PUBLISH_GROUP_ID = Configuration.artifactGroup - PUBLISH_ARTIFACT_ID = 'stream-chat-android-ui-utils' - PUBLISH_VERSION = rootVersionName -} - -apply from: "${rootDir}/scripts/publish-module.gradle" -apply from: "${rootDir}/scripts/android.gradle" - -android { - namespace "io.getstream.chat.android.ui.utils" - defaultConfig { - vectorDrawables.useSupportLibrary = true - } - - resourcePrefix 'stream_' - - testOptions { - unitTests { - includeAndroidResources = true - unitTests.returnDefaultValues = true - // Show the result of every unit test, even if it passes. - all { - testLogging { - events 'passed', 'skipped', 'failed', 'standardOut', 'standardError' - } - } - } - } - - sourceSets { - all { - it.java.srcDir "src/$it.name/kotlin" - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - freeCompilerArgs += [ - '-progressive', - '-Xexplicit-api=strict', - '-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi' - ] - } -} - -dependencies { - implementation project(':stream-chat-android-client') - implementation project(':stream-chat-android-state') - - implementation Dependencies.androidxAnnotations - implementation Dependencies.coroutinesCore - - testImplementation project(":stream-chat-android-test") - testImplementation Dependencies.junitJupiterApi - testImplementation Dependencies.junitJupiterParams - testRuntimeOnly Dependencies.junitJupiterEngine - testRuntimeOnly Dependencies.junitVintageEngine - - testImplementation testFixtures(project(":stream-chat-android-core")) - - testImplementation Dependencies.kluent - testImplementation Dependencies.mockito - testImplementation Dependencies.mockitoKotlin - testImplementation Dependencies.coroutinesTest - - detektPlugins(Dependencies.detektFormatting) -} diff --git a/stream-chat-android-ui-utils/build.gradle.kts b/stream-chat-android-ui-utils/build.gradle.kts new file mode 100644 index 00000000000..6154439e671 --- /dev/null +++ b/stream-chat-android-ui-utils/build.gradle.kts @@ -0,0 +1,87 @@ +import io.getstream.chat.android.Configuration +import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.android.junit5) +} + +rootProject.extra.apply { + set("PUBLISH_GROUP_ID", Configuration.artifactGroup) + set("PUBLISH_ARTIFACT_ID", "stream-chat-android-ui-utils") + set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName")) +} + +apply(from = "$rootDir/scripts/publish-module.gradle") +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.ui.utils" + defaultConfig { + vectorDrawables.useSupportLibrary = true + } + + resourcePrefix = "stream_" + + testOptions { + unitTests { + isIncludeAndroidResources = true + unitTests.isReturnDefaultValues = true + // Show the result of every unit test, even if it passes. + all { + it.testLogging { + events = setOf( + TestLogEvent.PASSED, + TestLogEvent.SKIPPED, + TestLogEvent.FAILED, + TestLogEvent.STANDARD_OUT, + TestLogEvent.STANDARD_ERROR, + ) + } + } + } + } + + sourceSets { + all { + java.srcDir("src/$name/kotlin") + } + } +} + +tasks.withType().configureEach { + compilerOptions { + freeCompilerArgs.addAll( + listOf( + "-progressive", + "-Xexplicit-api=strict", + "-opt-in=io.getstream.chat.android.core.internal.InternalStreamChatApi", + ), + ) + } +} + +dependencies { + implementation(project(":stream-chat-android-client")) + implementation(project(":stream-chat-android-state")) + + implementation(libs.androidx.annotation) + implementation(libs.kotlinx.coroutines.core) + + testImplementation(project(":stream-chat-android-test")) + testImplementation(libs.junit.jupiter.api) + testImplementation(libs.junit.jupiter.params) + testRuntimeOnly(libs.junit.jupiter.engine) + testRuntimeOnly(libs.junit.vintage.engine) + + testImplementation(testFixtures(project(":stream-chat-android-core"))) + + testImplementation(libs.kluent) + testImplementation(libs.mockito) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.kotlinx.coroutines.test) + + detektPlugins(libs.detekt.formatting) +} From d0add9a4e8cd06f570a6ed20a87bd47e68be73cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jc=20Mi=C3=B1arro?= Date: Tue, 24 Dec 2024 17:40:07 +0100 Subject: [PATCH 2/2] Remove old dependencies --- .../io/getstream/chat/android/Dependencies.kt | 238 ------------------ 1 file changed, 238 deletions(-) diff --git a/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt b/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt index 2097a8320c4..a1de9123327 100644 --- a/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt +++ b/buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt @@ -2,245 +2,7 @@ package io.getstream.chat.android -object Versions { - internal const val ALLURE_KOTLIN = "2.4.0" - internal const val ANDROID_GRADLE_PLUGIN = "8.4.2" - internal const val ANDROID_JUNIT5_GRADLE_PLUGIN = "1.11.2.0" - internal const val ANDROID_LEGACY_SUPPORT = "1.0.0" - internal const val ANDROIDX_ACTIVITY_COMPOSE = "1.9.3" - internal const val ANDROIDX_ACTIVITY_KTX = "1.9.3" - internal const val ANDROIDX_ANNOTATIONS = "1.9.1" - internal const val ANDROIDX_APPCOMPAT = "1.7.0" - internal const val ANDROIDX_COMPOSE = "1.7.5" - internal const val ANDROIDX_COMPOSE_CONSTRAINT_LAYOUT = "1.1.0" - internal const val ANDROIDX_COMPOSE_MATERIAL3 = "1.3.1" - internal const val ANDROIDX_CORE_TEST = "2.2.0" - internal const val ANDROIDX_FRAGMENT = "1.8.5" - internal const val ANDROIDX_KTX = "1.13.1" - internal const val ANDROIDX_LIFECYCLE = "2.8.7" - internal const val ANDROIDX_NAVIGATION = "2.8.4" - internal const val ANDROIDX_PREFERENCES = "1.2.1" - internal const val ANDROIDX_RECYCLERVIEW = "1.3.2" - internal const val ANDROIDX_STARTUP = "1.2.0" - internal const val ANDROIDX_TEST_CORE = "1.5.0" - internal const val ANDROIDX_TEST_MONITOR = "1.7.2" - internal const val ANDROIDX_TEST_ORCHESTRATOR = "1.5.1" - internal const val ANDROIDX_TEST_JUNIT = "1.1.5" - internal const val ANDROIDX_VIEW_PAGER_2 = "1.1.0" - internal const val ANDROIDX_UI_AUTOMATOR = "2.4.0-alpha01" - internal const val ANDROIDX_TEST = "1.5.2" - internal const val BASE_PROFILE = "1.3.1" - internal const val COIL = "2.7.0" - internal const val COMPOSE_ACCOMPANIST = "0.36.0" - internal const val COMPOSE_STABLE_MARKER = "1.0.5" - internal const val COMPOSE_MARKDOWN = "0.5.4" - internal const val CONSTRAINT_LAYOUT = "2.2.0" - internal const val COROUTINES = "1.9.0" - internal const val DETEKT_PLUGIN = "1.23.7" - internal const val DOKKA = "1.9.20" - internal const val ESPRESSO = "3.5.1" - internal const val FIREBASE_ANALYTICS = "22.1.2" - internal const val FIREBASE_CRASHLYTICS = "19.2.1" - internal const val FIREBASE_CRASHLYTICS_PLUGIN = "3.0.2" - internal const val FIREBASE_MESSAGING = "24.1.0" - internal const val FLIPPER = "0.272.0" - internal const val FLIPPER_SO_LOADER = "0.12.1" - internal const val GITVERSIONER = "0.5.0" - internal const val GOOGLE_SERVICES = "4.4.2" - internal const val GRADLE_NEXUS_PUBLISH_PLUGIN = "1.3.0" - internal const val GRADLE_VERSIONS_PLUGIN = "0.47.0" - internal const val HUAWEI_PUSH = "6.11.0.300" - internal const val ITU_DATE_VERSION = "1.10.2" - internal const val JSON = "20240303" - internal const val JUNIT4 = "4.13.2" - internal const val JUNIT5 = "5.11.3" - internal const val KEYBOARD_VISIBILITY_EVENT = "2.3.0" - internal const val KLUENT = "1.73" - internal const val KOTLIN = "2.0.10" - internal const val KOTLIN_BINARY_VALIDATOR = "0.16.3" - internal const val KSP = "2.0.21-1.0.28" - internal const val LANDSCAPIST = "2.3.6" - internal const val LEAK_CANARY = "2.4" - internal const val MATERIAL_COMPONENTS = "1.12.0" - internal const val MACRO_BENCHMARK = "1.2.3" - internal const val MARKWON = "4.6.2" - internal const val MOCKITO_KOTLIN = "5.4.0" - internal const val MOCKITO = "5.14.2" - internal const val MOSHI = "1.15.1" - internal const val OK2CURL = "0.8.0" - internal const val OKHTTP = "4.12.0" - internal const val PAPARAZZI = "1.3.4" - internal const val PERMISSIONX = "1.8.1" - internal const val PHOTOVIEW = "1.0.2" - internal const val RETROFIT = "2.11.0" - internal const val ROBOLECTRIC = "4.10.3" - internal const val REORDERABLE = "2.4.0" - internal const val ROOM = "2.6.1" - internal const val SHIMMER = "0.5.0" - internal const val SHIMMER_COMPOSE = "1.3.1" - internal const val SHOT = "6.1.0" - internal const val SPOTLESS = "6.20.0" - internal const val STREAM_LOG = "1.3.1" - internal const val STREAM_PUSH = "1.1.9" - internal const val STREAM_RESULT = "1.3.2" - internal const val TEST_PARAMETER_INJECTOR = "1.12" - internal const val THREETENBP = "1.7.0" - internal const val TIMBER = "5.0.1" - internal const val TURBINE = "1.2.0" - internal const val WORK = "2.9.1" -} - object Dependencies { - const val androidGradlePlugin = "com.android.tools.build:gradle:${Versions.ANDROID_GRADLE_PLUGIN}" - const val androidJunit5GradlePlugin = "de.mannodermaus.gradle.plugins:android-junit5:${Versions.ANDROID_JUNIT5_GRADLE_PLUGIN}" - const val androidLegacySupport = "androidx.legacy:legacy-support-v4:${Versions.ANDROID_LEGACY_SUPPORT}" - const val androidxActivityKtx = "androidx.activity:activity-ktx:${Versions.ANDROIDX_ACTIVITY_KTX}" - const val androidxAnnotations = "androidx.annotation:annotation:${Versions.ANDROIDX_ANNOTATIONS}" - const val androidxAppCompat = "androidx.appcompat:appcompat:${Versions.ANDROIDX_APPCOMPAT}" - const val androidxArchCoreTest = "androidx.arch.core:core-testing:${Versions.ANDROIDX_CORE_TEST}" - const val androidxCoreKtx = "androidx.core:core-ktx:${Versions.ANDROIDX_KTX}" - const val androidxFragmentKtx = "androidx.fragment:fragment-ktx:${Versions.ANDROIDX_FRAGMENT}" - const val androidxLifecycleProcess = "androidx.lifecycle:lifecycle-process:${Versions.ANDROIDX_LIFECYCLE}" - const val androidxLifecycleLiveDataKtx = "androidx.lifecycle:lifecycle-livedata-ktx:${Versions.ANDROIDX_LIFECYCLE}" - const val androidxLifecycleViewModelKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.ANDROIDX_LIFECYCLE}" - const val androidxPreferences = "androidx.preference:preference:${Versions.ANDROIDX_PREFERENCES}" - const val androidxRecyclerview = "androidx.recyclerview:recyclerview:${Versions.ANDROIDX_RECYCLERVIEW}" - const val androidxStartup = "androidx.startup:startup-runtime:${Versions.ANDROIDX_STARTUP}" - const val androidxTest = "androidx.test:core:${Versions.ANDROIDX_TEST_CORE}" - const val androidxTestRunner = "androidx.test:runner:${Versions.ANDROIDX_TEST}" - const val androidxTestMonitor = "androidx.test:monitor:${Versions.ANDROIDX_TEST_MONITOR}" - const val androidxTestOrchestrator = "androidx.test:orchestrator:${Versions.ANDROIDX_TEST_ORCHESTRATOR}" - const val androidxUiAutomator = "androidx.test.uiautomator:uiautomator:${Versions.ANDROIDX_UI_AUTOMATOR}" - const val androidxTestKtx = "androidx.test:core-ktx:${Versions.ANDROIDX_TEST_CORE}" - const val androidxLifecycleTesting = "androidx.lifecycle:lifecycle-runtime-testing:${Versions.ANDROIDX_LIFECYCLE}" - const val androidxTestJunit = "androidx.test.ext:junit:${Versions.ANDROIDX_TEST_JUNIT}" - const val androidxTestJunitKtx = "androidx.test.ext:junit-ktx:${Versions.ANDROIDX_TEST_JUNIT}" - const val androidxViewPager2 = "androidx.viewpager2:viewpager2:${Versions.ANDROIDX_VIEW_PAGER_2}" - const val baseProfile = "androidx.profileinstaller:profileinstaller:${Versions.BASE_PROFILE}" - const val baselineProfilePlugin = "androidx.benchmark:benchmark-baseline-profile-gradle-plugin:${Versions.MACRO_BENCHMARK}" - const val coil = "io.coil-kt:coil:${Versions.COIL}" - const val coilGif = "io.coil-kt:coil-gif:${Versions.COIL}" - const val coilVideo = "io.coil-kt:coil-video:${Versions.COIL}" - const val composeCoil = "io.coil-kt:coil-compose:${Versions.COIL}" - const val composeCompilerPlugin = "org.jetbrains.kotlin:compose-compiler-gradle-plugin:${Versions.KOTLIN}" - const val composeRuntime = "androidx.compose.runtime:runtime:${Versions.ANDROIDX_COMPOSE}" - const val composeUi = "androidx.compose.ui:ui:${Versions.ANDROIDX_COMPOSE}" - const val composeConstraintLayout = "androidx.constraintlayout:constraintlayout-compose:${Versions.ANDROIDX_COMPOSE_CONSTRAINT_LAYOUT}" - const val composeUiTest = "androidx.compose.ui:ui-test-junit4:${Versions.ANDROIDX_COMPOSE}" - const val composeUiTestManifest = "androidx.compose.ui:ui-test-manifest:${Versions.ANDROIDX_COMPOSE}" - const val composeUiTooling = "androidx.compose.ui:ui-tooling:${Versions.ANDROIDX_COMPOSE}" - const val composeFoundation = "androidx.compose.foundation:foundation:${Versions.ANDROIDX_COMPOSE}" - const val composeMaterial = "androidx.compose.material:material:${Versions.ANDROIDX_COMPOSE}" - const val composeMaterial3 = "androidx.compose.material3:material3:${Versions.ANDROIDX_COMPOSE_MATERIAL3}" - const val composeMaterialIcons = "androidx.compose.material:material-icons-core:${Versions.ANDROIDX_COMPOSE}" - const val composeAccompanistPermissions = "com.google.accompanist:accompanist-permissions:${Versions.COMPOSE_ACCOMPANIST}" - const val composeAccompanistPager = "com.google.accompanist:accompanist-pager:${Versions.COMPOSE_ACCOMPANIST}" - const val composeAccompanistSystemUiController = "com.google.accompanist:accompanist-systemuicontroller:${Versions.COMPOSE_ACCOMPANIST}" - const val composeActivity = "androidx.activity:activity-compose:${Versions.ANDROIDX_ACTIVITY_COMPOSE}" - const val composeViewModel = "androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.ANDROIDX_LIFECYCLE}" - const val composeStableMarker = "com.github.skydoves:compose-stable-marker:${Versions.COMPOSE_STABLE_MARKER}" - const val composeMarkdown = "com.github.jeziellago:compose-markdown:${Versions.COMPOSE_MARKDOWN}" - const val composeLandscapistCoil = "com.github.skydoves:landscapist-coil:${Versions.LANDSCAPIST}" - const val composeLandscapistPlaceholder = "com.github.skydoves:landscapist-placeholder:${Versions.LANDSCAPIST}" - const val composeLandscapistAnimation = "com.github.skydoves:landscapist-animation:${Versions.LANDSCAPIST}" - const val composeLifecycle = "androidx.lifecycle:lifecycle-runtime-compose:${Versions.ANDROIDX_LIFECYCLE}" - const val composeAndroidLifecycle = "androidx.lifecycle:lifecycle-runtime-compose-android:${Versions.ANDROIDX_LIFECYCLE}" - const val coroutinesAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.COROUTINES}" - const val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.COROUTINES}" - const val coroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.COROUTINES}" - const val constraintLayout = "androidx.constraintlayout:constraintlayout:${Versions.CONSTRAINT_LAYOUT}" - const val detektPlugin = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${Versions.DETEKT_PLUGIN}" - const val detektFormatting = "io.gitlab.arturbosch.detekt:detekt-formatting:${Versions.DETEKT_PLUGIN}" - const val dokka = "org.jetbrains.dokka:dokka-gradle-plugin:${Versions.DOKKA}" - const val espressoCore = "androidx.test.espresso:espresso-core:${Versions.ESPRESSO}" - const val espressoContrib = "androidx.test.espresso:espresso-contrib:${Versions.ESPRESSO}" - const val espressoIdlingResources = "androidx.test.espresso:espresso-idling-resource:${Versions.ESPRESSO}" - const val fragmentTest = "androidx.fragment:fragment-testing:${Versions.ANDROIDX_FRAGMENT}" - const val firebaseAnalytics = "com.google.firebase:firebase-analytics-ktx:${Versions.FIREBASE_ANALYTICS}" - const val firebaseCrashlytics = "com.google.firebase:firebase-crashlytics:${Versions.FIREBASE_CRASHLYTICS}" - const val firebaseCrashlyticsPlugin = "com.google.firebase:firebase-crashlytics-gradle:${Versions.FIREBASE_CRASHLYTICS_PLUGIN}" - const val firebaseMessaging = "com.google.firebase:firebase-messaging:${Versions.FIREBASE_MESSAGING}" - const val flipper = "com.facebook.flipper:flipper:${Versions.FLIPPER}" - const val flipperNetwork = "com.facebook.flipper:flipper-network-plugin:${Versions.FLIPPER}" - const val flipperLoader = "com.facebook.soloader:soloader:${Versions.FLIPPER_SO_LOADER}" - const val gitversionerPlugin = "com.github.passsy:gradle-gitVersioner-plugin:${Versions.GITVERSIONER}" - const val googleServicesPlugin = "com.google.gms:google-services:${Versions.GOOGLE_SERVICES}" - const val gradleNexusPublishPlugin = "io.github.gradle-nexus:publish-plugin:${Versions.GRADLE_NEXUS_PUBLISH_PLUGIN}" - const val gradleVersionsPlugin = "com.github.ben-manes:gradle-versions-plugin:${Versions.GRADLE_VERSIONS_PLUGIN}" - const val huaweiPush = "com.huawei.hms:push:${Versions.HUAWEI_PUSH}" - const val ituDate = "com.ethlo.time:itu:${Versions.ITU_DATE_VERSION}" - const val json = "org.json:json:${Versions.JSON}" - const val junit4 = "junit:junit:${Versions.JUNIT4}" - const val junitJupiterApi = "org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT5}" - const val junitJupiterParams = "org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT5}" - const val junitJupiterEngine = "org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT5}" - const val junitVintageEngine = "org.junit.vintage:junit-vintage-engine:${Versions.JUNIT5}" - const val keyboardVisibilityEvent = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:${Versions.KEYBOARD_VISIBILITY_EVENT}" - const val kluent = "org.amshove.kluent:kluent:${Versions.KLUENT}" - const val kotlinBinaryValidator = "org.jetbrains.kotlinx:binary-compatibility-validator:${Versions.KOTLIN_BINARY_VALIDATOR}" - const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}" - const val kotlinReflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.KOTLIN}" - const val ksp = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:${Versions.KSP}" - const val leakCanary = "com.squareup.leakcanary:leakcanary-android:${Versions.LEAK_CANARY}" - const val macroBenchmark = "androidx.benchmark:benchmark-macro-junit4:${Versions.MACRO_BENCHMARK}" - const val materialComponents = "com.google.android.material:material:${Versions.MATERIAL_COMPONENTS}" - const val markwonCore = "io.noties.markwon:core:${Versions.MARKWON}" - const val markwonLinkify = "io.noties.markwon:linkify:${Versions.MARKWON}" - const val markwonextStrikethrough = "io.noties.markwon:ext-strikethrough:${Versions.MARKWON}" - const val markwonImage = "io.noties.markwon:image:${Versions.MARKWON}" - const val mockito = "org.mockito:mockito-core:${Versions.MOCKITO}" - const val mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:${Versions.MOCKITO_KOTLIN}" - const val moshi = "com.squareup.moshi:moshi:${Versions.MOSHI}" - const val moshiCodegen = "com.squareup.moshi:moshi-kotlin-codegen:${Versions.MOSHI}" - const val moshiKotlin = "com.squareup.moshi:moshi-kotlin:${Versions.MOSHI}" - const val moshiAdapters = "com.squareup.moshi:moshi-adapters:${Versions.MOSHI}" - const val navigationFragmentKTX = "androidx.navigation:navigation-fragment-ktx:${Versions.ANDROIDX_NAVIGATION}" - const val navigationSafeArgsGradlePlugin = "androidx.navigation:navigation-safe-args-gradle-plugin:${Versions.ANDROIDX_NAVIGATION}" - const val navigationRuntimeKTX = "androidx.navigation:navigation-runtime-ktx:${Versions.ANDROIDX_NAVIGATION}" - const val navigationTest = "androidx.navigation:navigation-testing:${Versions.ANDROIDX_NAVIGATION}" - const val navigationUIKTX = "androidx.navigation:navigation-ui-ktx:${Versions.ANDROIDX_NAVIGATION}" - const val navigationCompose = "androidx.navigation:navigation-compose:${Versions.ANDROIDX_NAVIGATION}" - const val ok2curl = "com.github.mrmike:ok2curl:${Versions.OK2CURL}" - const val okhttp = "com.squareup.okhttp3:okhttp:${Versions.OKHTTP}" - const val okhttpLoggingInterceptor = "com.squareup.okhttp3:logging-interceptor:${Versions.OKHTTP}" - const val okhttpMockWebserver = "com.squareup.okhttp3:mockwebserver:${Versions.OKHTTP}" - const val paparazziPlugin = "app.cash.paparazzi:paparazzi-gradle-plugin:${Versions.PAPARAZZI}" - const val permissionx = "com.guolindev.permissionx:permissionx:${Versions.PERMISSIONX}" - const val photoview = "io.getstream:photoview:${Versions.PHOTOVIEW}" - const val photoviewDialog = "io.getstream:photoview-dialog:${Versions.PHOTOVIEW}" - const val retrofit = "com.squareup.retrofit2:retrofit:${Versions.RETROFIT}" - const val retrofitMoshiConverter = "com.squareup.retrofit2:converter-moshi:${Versions.RETROFIT}" - const val robolectric = "org.robolectric:robolectric:${Versions.ROBOLECTRIC}" - const val roomCompiler = "androidx.room:room-compiler:${Versions.ROOM}" - const val roomKtx = "androidx.room:room-ktx:${Versions.ROOM}" - const val roomRuntime = "androidx.room:room-runtime:${Versions.ROOM}" - const val roomTesting = "androidx.room:room-testing:${Versions.ROOM}" - const val reorderable = "sh.calvin.reorderable:reorderable:${Versions.REORDERABLE}" - const val shimmer = "com.facebook.shimmer:shimmer:${Versions.SHIMMER}" - const val shimmerCompose = "com.valentinilk.shimmer:compose-shimmer:${Versions.SHIMMER_COMPOSE}" - const val shot = "com.karumi:shot:${Versions.SHOT}" - const val spotlessGradlePlugin = "com.diffplug.spotless:spotless-plugin-gradle:${Versions.SPOTLESS}" - const val streamLog = "io.getstream:stream-log:${Versions.STREAM_LOG}" - const val streamLogAndroidFile = "io.getstream:stream-log-android-file:${Versions.STREAM_LOG}" - const val streamPush = "io.getstream:stream-android-push:${Versions.STREAM_PUSH}" - const val streamPushPermissions = "io.getstream:stream-android-push-permissions:${Versions.STREAM_PUSH}" - const val streamPushPermissionsSnackbar = "io.getstream:stream-android-push-permissions-snackbar:${Versions.STREAM_PUSH}" - const val streamPushDelegate = "io.getstream:stream-android-push-delegate:${Versions.STREAM_PUSH}" - const val streamPushFirebase = "io.getstream:stream-android-push-firebase:${Versions.STREAM_PUSH}" - const val streamPushHuawei = "io.getstream:stream-android-push-huawei:${Versions.STREAM_PUSH}" - const val streamPushXiaomi = "io.getstream:stream-android-push-xiaomi:${Versions.STREAM_PUSH}" - const val streamResult = "io.getstream:stream-result:${Versions.STREAM_RESULT}" - const val streamResultCall = "io.getstream:stream-result-call:${Versions.STREAM_RESULT}" - const val testParameterInjector = "com.google.testparameterinjector:test-parameter-injector:${Versions.TEST_PARAMETER_INJECTOR}" - const val threeTenBp = "org.threeten:threetenbp:${Versions.THREETENBP}" - const val timber = "com.jakewharton.timber:timber:${Versions.TIMBER}" - const val turbine = "app.cash.turbine:turbine:${Versions.TURBINE}" - const val workRuntimeKtx = "androidx.work:work-runtime-ktx:${Versions.WORK}" - const val workTesting = "androidx.work:work-testing:${Versions.WORK}" - const val allureKotlinModel = "io.qameta.allure:allure-kotlin-model:${Versions.ALLURE_KOTLIN}" - const val allureKotlinCommons = "io.qameta.allure:allure-kotlin-commons:${Versions.ALLURE_KOTLIN}" - const val allureKotlinJunit = "io.qameta.allure:allure-kotlin-junit4:${Versions.ALLURE_KOTLIN}" - const val allureKotlinAndroid = "io.qameta.allure:allure-kotlin-android:${Versions.ALLURE_KOTLIN}" @JvmStatic fun isNonStable(version: String): Boolean = isStable(version).not()