Skip to content

Commit bd90acd

Browse files
committed
Compose 1.7.0
1 parent d464740 commit bd90acd

File tree

5 files changed

+24
-39
lines changed

5 files changed

+24
-39
lines changed

app/build.gradle.kts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ tasks.withType<KotlinCompile>().configureEach {
5454
)
5555
}
5656
}
57-
val compose_version = "1.6.7"
57+
val compose_version = libs.versions.compose.version.get()
58+
5859
dependencies {
5960
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
60-
implementation("androidx.activity:activity-compose:1.9.0")
61+
implementation("androidx.activity:activity-compose:1.9.2")
6162
implementation("androidx.appcompat:appcompat:1.7.0")
6263
implementation("androidx.compose.animation:animation-core:$compose_version")
6364
implementation("androidx.compose.animation:animation:$compose_version")
@@ -75,7 +76,7 @@ dependencies {
7576
implementation("androidx.compose.ui:ui-tooling:$compose_version")
7677
implementation("androidx.compose.ui:ui:$compose_version")
7778
implementation("androidx.core:core-ktx:1.13.1")
78-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.1")
79+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.5")
7980
implementation("com.google.android.material:material:1.12.0")
8081
implementation("androidx.compose.ui:ui-viewbinding:$compose_version")
8182
implementation("androidx.compose.ui:ui-text:$compose_version")
@@ -84,17 +85,17 @@ dependencies {
8485
implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
8586

8687
testImplementation("junit:junit:4.13.2")
87-
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
88-
androidTestImplementation("androidx.test:runner:1.5.2")
88+
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
89+
androidTestImplementation("androidx.test:runner:1.6.2")
8990
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$compose_version")
9091
androidTestImplementation("androidx.compose.ui:ui-test:$compose_version")
91-
androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1")
92-
androidTestImplementation("androidx.test.ext:junit:1.1.5")
93-
androidTestImplementation("androidx.test:core:1.5.0")
94-
androidTestImplementation("androidx.test:rules:1.5.0")
95-
androidTestImplementation("androidx.test:runner:1.5.2")
92+
androidTestImplementation("androidx.test.espresso:espresso-intents:3.6.1")
93+
androidTestImplementation("androidx.test.ext:junit:1.2.1")
94+
androidTestImplementation("androidx.test:core:1.6.1")
95+
androidTestImplementation("androidx.test:rules:1.6.1")
96+
androidTestImplementation("androidx.test:runner:1.6.2")
9697
androidTestImplementation("com.android.support.test.espresso:espresso-core:3.0.2")
97-
androidTestImplementation("org.mockito:mockito-core:5.3.1")
98+
androidTestImplementation("org.mockito:mockito-core:5.12.0")
9899
debugImplementation("androidx.compose.ui:ui-test-manifest:$compose_version")
99100

100101
androidTestImplementation("com.adevinta.android:barista:4.3.0") {

app/src/main/java/de/jensklingenberg/jetpackcomposeplayground/mysamples/github/foundation/basictextfield/BasicTextFieldDemo.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package de.jensklingenberg.jetpackcomposeplayground.mysamples.github.foundation.basictextfield
22

3+
import androidx.activity.compose.BackHandler
34
import androidx.compose.foundation.layout.Column
45
import androidx.compose.foundation.text.BasicTextField
56
import androidx.compose.material.Text
67
import androidx.compose.runtime.*
78
import androidx.compose.ui.text.input.TextFieldValue
89

10+
//# --8<-- [start:func]
911
@Composable
1012
fun BasicTextFieldDemo() {
1113
var textState by remember { mutableStateOf(TextFieldValue("Hello World")) }
@@ -15,4 +17,5 @@ fun BasicTextFieldDemo() {
1517
})
1618
Text("The textfield has this text: " + textState.text)
1719
}
18-
}
20+
}
21+
//# --8<-- [end:func]
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

3-
43
buildscript {
5-
ext {
6-
compose_version = '1.6.7'
7-
kotlin_version = "2.0.0"
8-
}
4+
95
repositories {
106
google()
117
mavenCentral()
128
}
139
dependencies {
14-
classpath 'com.android.tools.build:gradle:8.0.2'
15-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10+
classpath("com.android.tools.build:gradle:8.6.0")
11+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}")
1612

1713
// NOTE: Do not place your application dependencies here; they belong
1814
// in the individual module build.gradle files
1915
}
2016
}
2117

22-
tasks.register('clean', Delete) {
23-
delete rootProject.buildDir
24-
}
25-

docs/foundation/basictextfield.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,7 @@ BasicTextField can be used to insert text. See [TextField](../material/textfield
1111
</p>
1212

1313
```kotlin
14-
@Composable
15-
fun BasicTextFieldDemo() {
16-
var textState by remember { mutableStateOf(TextFieldValue("Hello World")) }
17-
Column {
18-
BasicTextField(value = textState, onValueChange = {
19-
textState = it
20-
})
21-
Text("The textfield has this text: " + textState.text)
22-
}
23-
}
14+
--8<-- "foundation/basictextfield/BasicTextFieldDemo.kt:func"
2415
```
2516

2617
-------------

gradle/libs.versions.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[versions]
2-
kotlin = "2.0.0"
3-
compose_version = "1.6.7"
4-
[plugins]
5-
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
6-
2+
kotlin = "2.0.20"
3+
compose_version = "1.7.0"
74

8-
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
5+
[plugins]
6+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

0 commit comments

Comments
 (0)