From fd400c9b336371b2344a3dc7d569b10d2942060d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mion?= Date: Tue, 31 Dec 2024 13:17:46 +0000 Subject: [PATCH] add stream-chat-android-ui-components-metrics --- .github/workflows/sdk-size-checks.yml | 2 +- .github/workflows/sdk-size-updates.yml | 2 +- build.gradle | 2 ++ .../build.gradle.kts | 24 ++++++++++++++ .../src/main/AndroidManifest.xml | 33 +++++++++++++++++++ .../metrics/baseline/MainActivity.kt | 21 ++++++++++++ .../build.gradle.kts | 26 +++++++++++++++ .../src/main/AndroidManifest.xml | 33 +++++++++++++++++++ .../components/metrics/stream/MainActivity.kt | 21 ++++++++++++ settings.gradle | 2 ++ 10 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 metrics/stream-chat-android-ui-components-metrics-baseline/build.gradle.kts create mode 100644 metrics/stream-chat-android-ui-components-metrics-baseline/src/main/AndroidManifest.xml create mode 100644 metrics/stream-chat-android-ui-components-metrics-baseline/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/baseline/MainActivity.kt create mode 100644 metrics/stream-chat-android-ui-components-metrics-stream/build.gradle.kts create mode 100644 metrics/stream-chat-android-ui-components-metrics-stream/src/main/AndroidManifest.xml create mode 100644 metrics/stream-chat-android-ui-components-metrics-stream/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/stream/MainActivity.kt diff --git a/.github/workflows/sdk-size-checks.yml b/.github/workflows/sdk-size-checks.yml index dd81478ef13..e915aaa71bc 100644 --- a/.github/workflows/sdk-size-checks.yml +++ b/.github/workflows/sdk-size-checks.yml @@ -4,7 +4,7 @@ on: pull_request: env: - MODULES: "stream-chat-android-client stream-chat-android-offline stream-chat-android-compose" + MODULES: "stream-chat-android-client stream-chat-android-offline stream-chat-android-ui-components stream-chat-android-compose" METRICS_FILE: "metrics/size.json" MAX_TOLERANCE: 500 FINE_TOLERANCE: 250 diff --git a/.github/workflows/sdk-size-updates.yml b/.github/workflows/sdk-size-updates.yml index f8f636dce63..8882d39a53f 100644 --- a/.github/workflows/sdk-size-updates.yml +++ b/.github/workflows/sdk-size-updates.yml @@ -13,7 +13,7 @@ on: # cancel-in-progress: true env: - MODULES: "stream-chat-android-client stream-chat-android-offline stream-chat-android-compose" + MODULES: "stream-chat-android-client stream-chat-android-offline stream-chat-android-ui-components stream-chat-android-compose" VARIANTS: "debug release" METRICS_FILE: "metrics/size.json" BRANCH_NAME: ${{ github.head_ref || github.ref_name }} diff --git a/build.gradle b/build.gradle index 00e55867e53..cf6186babdc 100644 --- a/build.gradle +++ b/build.gradle @@ -131,6 +131,8 @@ apiValidation { 'stream-chat-android-client-metrics-stream', 'stream-chat-android-offline-metrics-baseline', 'stream-chat-android-offline-metrics-stream', + 'stream-chat-android-ui-components-metrics-baseline', + 'stream-chat-android-ui-components-metrics-stream', 'stream-chat-android-compose-metrics-baseline', 'stream-chat-android-compose-metrics-stream', ] diff --git a/metrics/stream-chat-android-ui-components-metrics-baseline/build.gradle.kts b/metrics/stream-chat-android-ui-components-metrics-baseline/build.gradle.kts new file mode 100644 index 00000000000..76331c69876 --- /dev/null +++ b/metrics/stream-chat-android-ui-components-metrics-baseline/build.gradle.kts @@ -0,0 +1,24 @@ +import io.getstream.chat.android.Dependencies + +plugins { + id("com.android.application") + id("org.jetbrains.kotlin.android") +} + +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.ui.components.metrics.baseline" + buildTypes { + release { + signingConfig = signingConfigs.findByName("debug") + } + } +} + +dependencies { + detektPlugins(Dependencies.detektFormatting) + + implementation(Dependencies.coroutinesCore) + implementation(Dependencies.androidxAppCompat) +} diff --git a/metrics/stream-chat-android-ui-components-metrics-baseline/src/main/AndroidManifest.xml b/metrics/stream-chat-android-ui-components-metrics-baseline/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..0b34f9b8797 --- /dev/null +++ b/metrics/stream-chat-android-ui-components-metrics-baseline/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/metrics/stream-chat-android-ui-components-metrics-baseline/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/baseline/MainActivity.kt b/metrics/stream-chat-android-ui-components-metrics-baseline/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/baseline/MainActivity.kt new file mode 100644 index 00000000000..2f5e2095fae --- /dev/null +++ b/metrics/stream-chat-android-ui-components-metrics-baseline/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/baseline/MainActivity.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2014-2024 Stream.io Inc. All rights reserved. + * + * Licensed under the Stream License; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://github.com/GetStream/stream-chat-android/blob/main/LICENSE + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.getstream.chat.android.ui.components.metrics.baseline + +import androidx.activity.ComponentActivity + +class MainActivity : ComponentActivity() diff --git a/metrics/stream-chat-android-ui-components-metrics-stream/build.gradle.kts b/metrics/stream-chat-android-ui-components-metrics-stream/build.gradle.kts new file mode 100644 index 00000000000..4960bce1210 --- /dev/null +++ b/metrics/stream-chat-android-ui-components-metrics-stream/build.gradle.kts @@ -0,0 +1,26 @@ +import io.getstream.chat.android.Dependencies + +plugins { + id("com.android.application") + id("org.jetbrains.kotlin.android") +} + +apply(from = "$rootDir/scripts/android.gradle") + +android { + namespace = "io.getstream.chat.android.ui.components.metrics.stream" + buildTypes { + release { + signingConfig = signingConfigs.findByName("debug") + } + } +} + +dependencies { + detektPlugins(Dependencies.detektFormatting) + + implementation(Dependencies.coroutinesCore) + implementation(Dependencies.androidxAppCompat) + + implementation(project(":stream-chat-android-ui-components")) +} diff --git a/metrics/stream-chat-android-ui-components-metrics-stream/src/main/AndroidManifest.xml b/metrics/stream-chat-android-ui-components-metrics-stream/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..0b34f9b8797 --- /dev/null +++ b/metrics/stream-chat-android-ui-components-metrics-stream/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/metrics/stream-chat-android-ui-components-metrics-stream/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/stream/MainActivity.kt b/metrics/stream-chat-android-ui-components-metrics-stream/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/stream/MainActivity.kt new file mode 100644 index 00000000000..1737f1141b7 --- /dev/null +++ b/metrics/stream-chat-android-ui-components-metrics-stream/src/main/kotlin/io/getstream/chat/android/ui/components/metrics/stream/MainActivity.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2014-2024 Stream.io Inc. All rights reserved. + * + * Licensed under the Stream License; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://github.com/GetStream/stream-chat-android/blob/main/LICENSE + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.getstream.chat.android.ui.components.metrics.stream + +import androidx.activity.ComponentActivity + +class MainActivity : ComponentActivity() diff --git a/settings.gradle b/settings.gradle index 98d51be0bb1..0d5028ac540 100644 --- a/settings.gradle +++ b/settings.gradle @@ -27,6 +27,8 @@ include ( ':metrics:stream-chat-android-client-metrics-stream', ':metrics:stream-chat-android-offline-metrics-baseline', ':metrics:stream-chat-android-offline-metrics-stream', + ':metrics:stream-chat-android-ui-components-metrics-baseline', + ':metrics:stream-chat-android-ui-components-metrics-stream', ':metrics:stream-chat-android-compose-metrics-baseline', ':metrics:stream-chat-android-compose-metrics-stream', )