Skip to content

Commit 07d8e18

Browse files
authored
Merge pull request #8 from codeteo/build-gradle-fixes
Build gradle fixes
2 parents 6600ab9 + 20769f7 commit 07d8e18

File tree

12 files changed

+70
-37
lines changed

12 files changed

+70
-37
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111
}
1212

1313
plugins {
14-
id 'org.jetbrains.kotlin.plugin.compose' version "2.0.0"
14+
id 'org.jetbrains.kotlin.plugin.compose' version "2.2.0" apply false
1515
}
1616

1717
apply from: 'scripts/dependency-updates.gradle'

examples/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ plugins {
77
android {
88
namespace = "com.xm.examples"
99

10-
compileSdk 34
10+
compileSdk 35
1111

1212
defaultConfig {
1313
applicationId "com.xm.examples"
1414
minSdk 21
15-
targetSdk 34
15+
targetSdk 35
1616
versionCode 1
1717
versionName "1.0"
1818

@@ -42,20 +42,21 @@ android {
4242
dependencies {
4343
implementation project(':tka')
4444

45-
implementation "androidx.appcompat:appcompat:1.6.1"
45+
implementation "androidx.appcompat:appcompat:1.7.1"
46+
implementation 'com.google.android.material:material:1.12.0'
4647

4748
implementation libraries.rx.java
4849
implementation "io.reactivex.rxjava3:rxkotlin:3.0.1"
4950
implementation "io.reactivex.rxjava3:rxandroid:3.0.2"
5051

51-
implementation 'androidx.fragment:fragment-ktx:1.8.1'
52+
implementation 'androidx.fragment:fragment-ktx:1.8.8'
5253

5354
testImplementation libraries.junit
5455
testImplementation 'org.mockito:mockito-core:5.12.0'
5556

56-
implementation "androidx.activity:activity-compose:1.9.0"
57+
implementation "androidx.activity:activity-compose:1.10.1"
5758

58-
implementation platform("androidx.compose:compose-bom:2024.06.00")
59+
implementation platform("androidx.compose:compose-bom:2025.07.00")
5960
implementation "androidx.compose.foundation:foundation"
6061
implementation "androidx.compose.material:material"
6162
implementation "androidx.compose.runtime:runtime-rxjava3"

examples/src/main/java/com/xm/examples/cases/01-GettingStarted-Composition-TwoCounters-Compose.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class GettingStartedCompositionTwoCountersCompose : Fragment() {
6868
fun TwoCountersScreen(viewModel: TwoCountersViewModel) {
6969

7070
Column(Modifier.padding(horizontal = 22.dp)) {
71-
Text(readMe.uppercase(), fontSize = 14.sp, color = colorResource(R.color.grey))
71+
Text(readMe.uppercase(), fontSize = 14.sp, color = colorResource(R.color.textColorPrimary))
7272

7373
Row(
7474
horizontalArrangement = Arrangement.Center,
@@ -99,7 +99,7 @@ fun CounterScreenView(viewStore: ViewStore<CounterState, CounterAction>) {
9999
Text("-", fontSize = 22.sp)
100100
}
101101

102-
Text(counter.toString(), fontSize = 22.sp)
102+
Text(counter.toString(), fontSize = 22.sp, color = colorResource(R.color.textColorPrimary))
103103

104104
TextButton(onClick = { viewStore.send(CounterAction.IncrementButtonTapped) }) {
105105
Text("+", fontSize = 22.sp)

examples/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
android:id="@+id/main_container"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7+
android:fitsSystemWindows="true"
78
android:gravity="center"
89
tools:context=".MainActivity" />

examples/src/main/res/layout/fragment_main.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,35 @@
99

1010
<Button
1111
android:id="@+id/btn_basics"
12-
style="@style/Widget.AppCompat.Button.Borderless"
12+
style="@style/buttonStyle"
1313
android:layout_width="match_parent"
1414
android:layout_height="wrap_content"
1515
android:text="Basics" />
1616

1717
<Button
1818
android:id="@+id/btn_pullback"
19-
style="@style/Widget.AppCompat.Button.Borderless"
19+
style="@style/buttonStyle"
2020
android:layout_width="match_parent"
2121
android:layout_height="wrap_content"
2222
android:text="Pullback and Combine" />
2323

2424
<Button
2525
android:id="@+id/btn_pullback_compose"
26-
style="@style/Widget.AppCompat.Button.Borderless"
26+
style="@style/buttonStyle"
2727
android:layout_width="match_parent"
2828
android:layout_height="wrap_content"
2929
android:text="Pullback and Combine (Jetpack Compose)" />
3030

3131
<Button
3232
android:id="@+id/btn_effects"
33-
style="@style/Widget.AppCompat.Button.Borderless"
33+
style="@style/buttonStyle"
3434
android:layout_width="match_parent"
3535
android:layout_height="wrap_content"
3636
android:text="Effects" />
3737

3838
<Button
3939
android:id="@+id/btn_cancellation"
40-
style="@style/Widget.AppCompat.Button.Borderless"
40+
style="@style/buttonStyle"
4141
android:layout_width="match_parent"
4242
android:layout_height="wrap_content"
4343
android:text="Cancellation" />

examples/src/main/res/layout/view_counter.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<Button
1717
android:id="@+id/decrement"
18-
style="@style/Widget.AppCompat.Button.Borderless"
18+
style="@style/buttonStyle"
1919
android:layout_width="wrap_content"
2020
android:layout_height="wrap_content"
2121
android:text="-"
@@ -32,7 +32,7 @@
3232

3333
<Button
3434
android:id="@+id/increment"
35-
style="@style/Widget.AppCompat.Button.Borderless"
35+
style="@style/buttonStyle"
3636
android:layout_width="wrap_content"
3737
android:layout_height="wrap_content"
3838
android:text="+"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="purple_200">#FFBB86FC</color>
4+
<color name="purple_500">#FF9C27B0</color>
5+
<color name="purple_700">#FF6200EE</color>
6+
<color name="teal_200">#FF80CBC4</color>
7+
<color name="teal_700">#FF00695C</color>
8+
<color name="black">#FF121212</color>
9+
<color name="white">#FFFFFFFF</color>
10+
<color name="grey">#FF424242</color>
11+
<color name="textColorPrimary">@color/white</color>
12+
</resources>

examples/src/main/res/values-night/themes.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<attr name="colorReadmeText" format="reference|color" />
4+
</resources>
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<color name="purple_200">#FFBB86FC</color>
4-
<color name="purple_500">#FF6200EE</color>
5-
<color name="purple_700">#FF3700B3</color>
6-
<color name="teal_200">#FF03DAC5</color>
7-
<color name="teal_700">#FF018786</color>
8-
<color name="black">#FF000000</color>
9-
<color name="white">#FFFFFFFF</color>
10-
<color name="grey">#6C6666</color>
3+
<!-- Softer, lighter tones for dark background -->
4+
<color name="purple_200">#FFCE93F9</color> <!-- Light purple for highlights -->
5+
<color name="purple_500">#FF9C27B0</color> <!-- Lighter version for primary -->
6+
<color name="purple_700">#FF985EFF</color> <!-- Accent version for dark -->
7+
8+
<color name="teal_200">#FF03DAC5</color> <!-- Usually safe to keep same -->
9+
<color name="teal_700">#FF66FFF9</color> <!-- Bright teal for dark bg -->
10+
11+
<!-- Inverted tones for readability -->
12+
<color name="black">#FF121212</color> <!-- Use white in dark theme -->
13+
<color name="white">#FFFFFFFF</color> <!-- Use dark gray as "white" -->
14+
15+
<!-- Dimmed gray for dark theme elements -->
16+
<color name="grey">#FFB0B0B0</color> <!-- Softer contrast gray -->
17+
<color name="textColorPrimary">@color/black</color>
1118
</resources>

0 commit comments

Comments
 (0)