Skip to content

Commit 95d521a

Browse files
committed
Merge branch 'release/1.0.7'
2 parents 6f35146 + 51250a7 commit 95d521a

File tree

103 files changed

+853
-570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+853
-570
lines changed

.github/workflows/deploy_foss_to_github.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ jobs:
5858
sed -i -e '/mlkit/,+14d' -e '/google-services/d' -e '/libs.firebase/d' build-logic/convention/build.gradle.kts
5959
6060
- name: Build release variant including baseline profile generation
61-
run: ./gradlew :app:assembleFossReliantRelease
61+
run: |
62+
./gradlew cleanManagedDevices --unused-only
63+
./gradlew generateFossReliantReleaseBaselineProfile
6264
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
6365
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
6466
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
6567
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
6668
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
69+
./gradlew :app:assembleFossReliantRelease
6770
6871
- name: Sign APK
6972
uses: r0adkll/sign-android-release@v1

.github/workflows/deploy_play_to_github.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,15 @@ jobs:
5151
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
5252

5353
- name: Build release variant including baseline profile generation
54-
run: ./gradlew :app:assembleGooglePlayRelease
54+
run: |
55+
./gradlew cleanManagedDevices --unused-only
56+
./gradlew generateGooglePlayReleaseBaselineProfile
5557
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
5658
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
5759
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
5860
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
5961
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
62+
./gradlew :app:assembleGooglePlayRelease
6063
6164
- name: Sign APK
6265
uses: r0adkll/sign-android-release@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.iml
22
.gradle
3+
.kotlin
34
/local.properties
45
/.idea/caches
56
/.idea/libraries

app/dependencies/fossReliantReleaseRuntimeClasspath.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ androidx.compose.ui:ui-geometry:1.7.0-beta03
4949
androidx.compose.ui:ui-graphics-android:1.7.0-beta03
5050
androidx.compose.ui:ui-graphics:1.7.0-beta03
5151
androidx.compose.ui:ui-text-android:1.7.0-beta03
52+
androidx.compose.ui:ui-text-google-fonts:1.7.0-beta03
5253
androidx.compose.ui:ui-text:1.7.0-beta03
5354
androidx.compose.ui:ui-tooling-preview-android:1.7.0-beta03
5455
androidx.compose.ui:ui-tooling-preview:1.7.0-beta03

app/dependencies/googlePlayDebugRuntimeClasspath.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ androidx.compose.ui:ui-graphics-android:1.7.0-beta03
5555
androidx.compose.ui:ui-graphics:1.7.0-beta03
5656
androidx.compose.ui:ui-test-manifest:1.7.0-beta03
5757
androidx.compose.ui:ui-text-android:1.7.0-beta03
58+
androidx.compose.ui:ui-text-google-fonts:1.7.0-beta03
5859
androidx.compose.ui:ui-text:1.7.0-beta03
5960
androidx.compose.ui:ui-tooling-android:1.7.0-beta03
6061
androidx.compose.ui:ui-tooling-data-android:1.7.0-beta03

app/src/androidTest/java/com/mshdabiola/skeletonandroid/FullTest.kt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,19 @@ class FullTest {
6565
fun full() {
6666
composeTestRule.apply {
6767
// VERIFY for you is selected
68-
repeat(10){
69-
onNodeWithText("Add Note").performClick()
68+
repeat(10) {
69+
onNodeWithText("Add Note").performClick()
7070

71-
this.waitForIdle()
71+
this.waitForIdle()
7272

73-
onNodeWithTag("detail:title").performTextInput("title")
73+
onNodeWithTag("detail:title").performTextInput("title")
7474

75-
onNodeWithTag("detail:content").performTextInput("content")
75+
onNodeWithTag("detail:content").performTextInput("content")
7676

77-
onNodeWithContentDescription("back").performClick()
78-
79-
}
77+
onNodeWithContentDescription("back").performClick()
78+
}
8079

8180
onNodeWithTag("main:list").performScrollTo()
8281
}
8382
}
84-
8583
}

app/src/googlePlay/kotlin/com/mshdabiola/skeletonandroid/MainActivity.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import androidx.activity.enableEdgeToEdge
1313
import androidx.activity.viewModels
1414
import androidx.compose.foundation.isSystemInDarkTheme
1515
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
16-
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
1716
import androidx.compose.runtime.Composable
1817
import androidx.compose.runtime.CompositionLocalProvider
1918
import androidx.compose.runtime.DisposableEffect
@@ -34,7 +33,6 @@ import com.mshdabiola.analytics.AnalyticsHelper
3433
import com.mshdabiola.analytics.LocalAnalyticsHelper
3534
import com.mshdabiola.data.util.NetworkMonitor
3635
import com.mshdabiola.designsystem.theme.SkTheme
37-
import com.mshdabiola.model.Contrast
3836
import com.mshdabiola.model.DarkThemeConfig
3937
import com.mshdabiola.model.ThemeBrand
4038
import com.mshdabiola.skeletonandroid.ui.SkApp
@@ -203,7 +201,6 @@ private fun shouldUseAndroidTheme(
203201
}
204202
}
205203

206-
207204
@Composable
208205
private fun shouldDisableDynamicTheming(
209206
uiState: MainActivityUiState,
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

benchmarks/src/main/kotlin/com/mshdabiola/benchmarks/baselineprofile/GenerateBaselineProfile.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
package com.mshdabiola.benchmarks.baselineprofile
66

77
import androidx.benchmark.macro.junit4.BaselineProfileRule
8-
import androidx.test.uiautomator.By
98
import com.mshdabiola.benchmarks.PACKAGE_NAME
109
import com.mshdabiola.benchmarks.detail.addNote
1110
import com.mshdabiola.benchmarks.detail.goBack
1211
import com.mshdabiola.benchmarks.main.goToDetailScreen
1312
import com.mshdabiola.benchmarks.main.mainScrollNoteDownUp
1413
import com.mshdabiola.benchmarks.startActivity
15-
import com.mshdabiola.benchmarks.waitAndFindObject
1614
import org.junit.Rule
1715
import org.junit.Test
1816

@@ -24,7 +22,7 @@ class GenerateBaselineProfile {
2422
baselineProfileRule.collect(PACKAGE_NAME) {
2523
startActivity()
2624

27-
repeat(10){
25+
repeat(10) {
2826
goToDetailScreen()
2927
addNote()
3028
goBack()
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1+
/*
2+
*abiola 2024
3+
*/
4+
15
package com.mshdabiola.benchmarks.detail
26

37
import androidx.benchmark.macro.MacrobenchmarkScope
48
import androidx.test.uiautomator.By
5-
import androidx.test.uiautomator.Condition
69
import androidx.test.uiautomator.Until
710

811
fun MacrobenchmarkScope.goBack() {
912
val selector = By.desc("back")
1013

11-
device.wait(Until.hasObject(selector),5000)
14+
device.wait(Until.hasObject(selector), 5000)
1215

1316
val backButton = device.findObject(selector)
1417
backButton.click()
@@ -20,8 +23,7 @@ fun MacrobenchmarkScope.addNote() {
2023
val titleSelector = By.res("detail:title")
2124
val contentSelector = By.res("detail:content")
2225

23-
device.wait(Until.hasObject(titleSelector),5000)
24-
26+
device.wait(Until.hasObject(titleSelector), 5000)
2527

2628
val titleTextField = device.findObject(titleSelector)
2729
val contentTextField = device.findObject(contentSelector)
@@ -30,4 +32,4 @@ fun MacrobenchmarkScope.addNote() {
3032
contentTextField.text = "content"
3133

3234
// Wait until saved title are shown on screen
33-
}
35+
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1+
/*
2+
*abiola 2024
3+
*/
4+
15
package com.mshdabiola.benchmarks.main
26

37
import androidx.benchmark.macro.MacrobenchmarkScope
48
import androidx.test.uiautomator.By
59
import androidx.test.uiautomator.Until
610
import com.mshdabiola.benchmarks.flingElementDownUp
711

8-
912
fun MacrobenchmarkScope.goToDetailScreen() {
1013
val savedSelector = By.res("main:add")
1114

12-
device.wait(Until.hasObject(savedSelector),5000)
15+
device.wait(Until.hasObject(savedSelector), 5000)
1316

1417
val addButton = device.findObject(savedSelector)
1518
addButton.click()
1619
device.waitForIdle()
1720
// Wait until saved title are shown on screen
1821
}
1922

20-
21-
2223
fun MacrobenchmarkScope.mainScrollNoteDownUp() {
23-
24-
val selector=By.res("main:list")
25-
device.wait(Until.hasObject(selector),5000)
24+
val selector = By.res("main:list")
25+
device.wait(Until.hasObject(selector), 5000)
2626

2727
val feedList = device.findObject(selector)
2828
device.flingElementDownUp(feedList)
@@ -36,4 +36,4 @@ fun MacrobenchmarkScope.mainWaitForContent() {
3636
// val obj = device.waitAndFindObject(By.res("forYou:topicSelection"), 10_000)
3737
// Timeout here is quite big, because sometimes data loading takes a long time!
3838
// obj.wait(untilHasChildren(), 60_000)
39-
}
39+
}

benchmarks/src/main/kotlin/com/mshdabiola/benchmarks/main/MainScreenRecompositionBenchmark.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MainScreenRecompositionBenchmark {
3636
pressHome()
3737
startActivityAndAllowNotifications()
3838

39-
// device.findObject(By.res("main:add")).click()
39+
// device.findObject(By.res("main:add")).click()
4040
},
4141
) {
4242
mainScrollNoteDownUp()

benchmarks/src/main/kotlin/com/mshdabiola/benchmarks/main/ScrollNotePowerMetricsBenchmark.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ class ScrollNotePowerMetricsBenchmark {
4949
// Start the app
5050
pressHome()
5151
startActivityAndWait()
52-
5352
},
5453
) {
55-
mainScrollNoteDownUp()
54+
mainScrollNoteDownUp()
5655
}
5756
}

build-logic/convention/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dependencies {
4343
compileOnly(libs.ksp.gradlePlugin)
4444
compileOnly(libs.room.gradlePlugin)
4545
implementation(libs.truth)
46+
compileOnly(libs.kotlin.powerAssert)
4647

4748
}
4849

build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,22 @@ import org.gradle.api.Project
2727
import org.gradle.kotlin.dsl.configure
2828
import org.gradle.kotlin.dsl.dependencies
2929
import org.gradle.kotlin.dsl.kotlin
30+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
31+
import org.jetbrains.kotlin.powerassert.gradle.PowerAssertGradleExtension
3032

3133
class AndroidLibraryConventionPlugin : Plugin<Project> {
34+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
3235
override fun apply(target: Project) {
3336
with(target) {
3437
with(pluginManager) {
3538
apply("com.android.library")
3639
apply("org.jetbrains.kotlin.android")
3740
apply("mshdabiola.android.lint")
41+
apply( "org.jetbrains.kotlin.plugin.power-assert")
3842
}
3943

44+
45+
4046
extensions.configure<LibraryExtension> {
4147
configureKotlinAndroid(this)
4248
defaultConfig.targetSdk = 34
@@ -53,6 +59,9 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
5359
configurePrintApksTask(this)
5460
disableUnnecessaryAndroidTests(target)
5561
}
62+
extensions.configure<PowerAssertGradleExtension> {
63+
functions.set(listOf("kotlin.assert", "kotlin.test.assertTrue", "kotlin.test.assertEquals", "kotlin.test.assertNull"))
64+
}
5665
dependencies {
5766
add("testImplementation", kotlin("test"))
5867
add("implementation", libs.findLibrary("androidx.tracing.ktx").get())

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
plugins {
44
alias(libs.plugins.android.application) apply false
55
alias(libs.plugins.android.library) apply false
6+
alias(libs.plugins.powerAssert) apply false
67
alias(libs.plugins.android.test) apply false
78
alias(libs.plugins.baselineprofile) apply false
89
alias(libs.plugins.compose) apply false

features/detail/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ android {
1414
}
1515

1616
dependencies {
17-
implementation(project(":modules:data"))
18-
implementation(project(":modules:domain"))
17+
implementation(projects.modules.data)
18+
implementation(projects.modules.domain)
1919

2020
testImplementation(libs.hilt.android.testing)
2121
testImplementation(libs.robolectric)
22-
testImplementation(project(":modules:testing"))
22+
testImplementation(projects.modules.testing)
2323
testImplementation(projects.modules.screenshotTesting)
2424

2525

26-
androidTestImplementation(project(":modules:testing"))
26+
androidTestImplementation(projects.modules.testing)
2727
}

gradle/libs.versions.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ firebaseCrashlyticsKts = "18.3.6"
7373
firebaseCrashylyticsPlugins = "2.9.9"
7474

7575
ktor = "2.3.11"
76+
uiTextGoogleFonts = "1.6.8"
7677

7778

7879
[libraries]
@@ -100,6 +101,7 @@ androidx-compose-ui-testManifest = { group = "androidx.compose.ui", name = "ui-t
100101
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
101102
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
102103
androidx-compose-ui-util = { group = "androidx.compose.ui", name = "ui-util" }
104+
androidx-ui-text-google-fonts = { group = "androidx.compose.ui", name = "ui-text-google-fonts", version.ref = "uiTextGoogleFonts" }
103105
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" }
104106
androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "androidxCoreSplashscreen" }
105107
androidx-dataStore-core = { group = "androidx.datastore", name = "datastore", version.ref = "androidxDataStore" }
@@ -190,6 +192,7 @@ firebase-performance-gradlePlugin = { group = "com.google.firebase", name = "per
190192
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
191193
ksp-gradlePlugin = { group = "com.google.devtools.ksp", name = "com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }
192194
room-gradlePlugin = { group = "androidx.room", name = "room-gradle-plugin", version.ref = "room" }
195+
kotlin-powerAssert = { module = "org.jetbrains.kotlin:kotlin-power-assert", version.ref = "kotlin" }
193196

194197
[plugins]
195198
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
@@ -210,6 +213,7 @@ protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }
210213
roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" }
211214
room = { id = "androidx.room", version.ref = "room" }
212215
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }
216+
powerAssert = { id = "org.jetbrains.kotlin.plugin.power-assert", version.ref = "kotlin" }
213217

214218

215219

instuctions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010

1111
./gradlew :app:generateReleaseBaselineProfile
1212

13+
./gradlew pixel6api33FossReliantBenchmarkBenchmarkAndroidTest

modules/designsystem/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies {
3030
api(libs.androidx.compose.ui.util)
3131

3232
implementation(libs.coil.kt.compose)
33+
implementation(libs.androidx.ui.text.google.fonts)
3334

3435
testImplementation(libs.androidx.compose.ui.test)
3536
testImplementation(libs.androidx.compose.ui.testManifest)

0 commit comments

Comments
 (0)