Skip to content

Commit

Permalink
metrics renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
andremion committed Dec 31, 2024
1 parent c4dad55 commit c8b491b
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/sdk-size-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Assemble SDKs
run: |
for module in $MODULES; do
modules+=" :metrics:$module-baseline:assemble :metrics:$module-stream:assemble"
modules+=" :metrics:$module-metrics-baseline:assemble :metrics:$module-metrics-stream:assemble"
done
./gradlew $modules
Expand All @@ -43,8 +43,8 @@ jobs:
# Calculate sizes from the .apk files and save them into a temporary JSON file
# so it can be exported for the next job step
for module in $MODULES; do
baselineFile="metrics/$module-baseline/build/outputs/apk/debug/$module-baseline-debug.apk"
streamFile="metrics/$module-stream/build/outputs/apk/debug/$module-stream-debug.apk"
baselineFile="metrics/$module-metrics-baseline/build/outputs/apk/debug/$module-metrics-baseline-debug.apk"
streamFile="metrics/$module-metrics-stream/build/outputs/apk/debug/$module-metrics-stream-debug.apk"
baselineSize=$(du -k "$baselineFile" | awk '{print $1}')
streamSize=$(du -k "$streamFile" | awk '{print $1}')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sdk-size-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Assemble SDKs
run: |
for module in $MODULES; do
modules+=" :metrics:$module-baseline:assemble :metrics:$module-stream:assemble"
modules+=" :metrics:$module-metrics-baseline:assemble :metrics:$module-metrics-stream:assemble"
done
./gradlew $modules
Expand All @@ -45,8 +45,8 @@ jobs:
# Calculate sizes
for module in $MODULES; do
for variant in $VARIANTS; do
baselineFile="metrics/$module-baseline/build/outputs/apk/$variant/$module-baseline-$variant.apk"
streamFile="metrics/$module-stream/build/outputs/apk/$variant/$module-stream-$variant.apk"
baselineFile="metrics/$module-metrics-baseline/build/outputs/apk/$variant/$module-metrics-baseline-$variant.apk"
streamFile="metrics/$module-metrics-stream/build/outputs/apk/$variant/$module-metrics-stream-$variant.apk"
# Ensure files exist
if [[ -f "$baselineFile" && -f "$streamFile" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ apiValidation {
'stream-chat-android-test',
'stream-chat-android-compose-sample',
'stream-chat-android-ui-guides',
'stream-chat-android-compose-baseline',
'stream-chat-android-compose-stream',
'stream-chat-android-compose-metrics-baseline',
'stream-chat-android-compose-metrics-stream',
]

nonPublicMarkers += [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import io.getstream.chat.android.Dependencies

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}

apply(from = "$rootDir/scripts/android.gradle")

android {
namespace = "io.getstream.chat.android.compose.metrics.baseline"
buildFeatures.compose = true
buildTypes {
release {
signingConfig = signingConfigs.findByName("debug")
}
}
}

dependencies {
detektPlugins(Dependencies.detektFormatting)

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)
}
Original file line number Diff line number Diff line change
@@ -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.compose.metrics.baseline

import androidx.activity.ComponentActivity

class MainActivity : ComponentActivity()
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
apply(from = "$rootDir/scripts/android.gradle")

android {
namespace = "io.getstream.metrics.compose.stream"
namespace = "io.getstream.chat.android.compose.metrics.stream"
buildFeatures.compose = true
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.getstream.metrics.compose.baseline
package io.getstream.chat.android.compose.metrics.stream

import androidx.activity.ComponentActivity

Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ include (
':stream-chat-android-ui-uitests',
':stream-chat-android-benchmark',
':stream-chat-android-ai-assistant',
':metrics:stream-chat-android-compose-baseline',
':metrics:stream-chat-android-compose-stream'
':metrics:stream-chat-android-compose-metrics-baseline',
':metrics:stream-chat-android-compose-metrics-stream'
)

dependencyResolutionManagement {
Expand Down

0 comments on commit c8b491b

Please sign in to comment.