diff --git a/app/build.gradle b/app/build.gradle index 82ebd4de..3b026863 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,7 @@ plugins { id 'kotlinx-serialization' id 'dagger.hilt.android.plugin' id 'com.squareup.wire' - id 'com.google.devtools.ksp' version "$kotlin_version-1.0.9" + id 'com.google.devtools.ksp' version "$kotlin_version-1.0.11" } def keystoreProperties = new Properties() @@ -80,7 +80,7 @@ android { } kotlinOptions { jvmTarget = '1.8' - freeCompilerArgs += ["-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"] +// freeCompilerArgs += ["-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"] freeCompilerArgs += ["-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + project.buildDir.absolutePath + "/compose_metrics"] freeCompilerArgs += ["-P", "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + project.buildDir.absolutePath + "/compose_metrics"] } @@ -122,11 +122,11 @@ dependencies { implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1' // implementation 'androidx.compose.material3:material3:1.0.0' - def media3_version = "1.0.0-rc02" + def media3_version = "1.0.1" implementation "androidx.media3:media3-exoplayer:$media3_version" implementation "androidx.media3:media3-ui:$media3_version" - def compose_destinations_version = '1.7.33-beta' + def compose_destinations_version = '1.8.41-beta' implementation "io.github.raamcosta.compose-destinations:animations-core:$compose_destinations_version" ksp "io.github.raamcosta.compose-destinations:ksp:$compose_destinations_version" @@ -140,7 +140,7 @@ dependencies { implementation "androidx.hilt:hilt-navigation-compose:$hilt_androidx_version" kapt "androidx.hilt:hilt-compiler:$hilt_androidx_version" - def accompanist_version = '0.28.0' + def accompanist_version = '0.30.1' implementation "com.google.accompanist:accompanist-drawablepainter:$accompanist_version" implementation "com.google.accompanist:accompanist-insets-ui:$accompanist_version" implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version" @@ -176,11 +176,10 @@ dependencies { androidTestImplementation 'androidx.compose.ui:ui-test-junit4' debugImplementation 'androidx.compose.ui:ui-test-manifest' - implementation 'androidx.activity:activity-compose:1.6.1' implementation "com.google.android.material:compose-theme-adapter:1.2.1" implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1" - def activity_version = "1.6.1" + def activity_version = "1.7.1" implementation "androidx.activity:activity-ktx:$activity_version" implementation "androidx.activity:activity-compose:$activity_version" @@ -193,7 +192,7 @@ dependencies { api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' - def lifecycle_version = "2.6.0" + def lifecycle_version = "2.6.1" implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" @@ -206,8 +205,8 @@ dependencies { implementation "androidx.appcompat:appcompat:1.6.1" implementation "androidx.annotation:annotation:1.6.0" implementation "androidx.constraintlayout:constraintlayout:2.1.4" - implementation "androidx.core:core-ktx:1.9.0" - implementation 'androidx.core:core-splashscreen:1.0.0' + implementation "androidx.core:core-ktx:1.10.0" + implementation 'androidx.core:core-splashscreen:1.0.1' implementation "androidx.preference:preference-ktx:1.2.0" implementation "androidx.gridlayout:gridlayout:1.0.0" implementation "androidx.browser:browser:1.5.0" @@ -230,7 +229,7 @@ dependencies { kapt "com.github.bumptech.glide:compiler:$glide_version" implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version" - implementation "com.google.android.material:material:1.8.0" + implementation "com.google.android.material:material:1.9.0" implementation "com.squareup.okhttp3:okhttp:4.10.0" implementation "com.squareup.retrofit2:retrofit:$retrofit_version" diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/FeedCard.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/FeedCard.kt index 9ce00063..1c39571f 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/FeedCard.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/FeedCard.kt @@ -213,12 +213,12 @@ fun ThreadContent( EmoticonText( text = content, - style = MaterialTheme.typography.body1, + modifier = Modifier.fillMaxWidth(), fontSize = 15.sp, - maxLines = 5, - overflow = TextOverflow.Ellipsis, lineHeight = 22.sp, - modifier = Modifier.fillMaxWidth() + overflow = TextOverflow.Ellipsis, + maxLines = 5, + style = MaterialTheme.typography.body1 ) } diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Texts.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Texts.kt index 198bf261..406daf8e 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Texts.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/widgets/compose/Texts.kt @@ -55,6 +55,7 @@ fun EmoticonText( overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, + minLines: Int = 1, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current, ) { @@ -75,9 +76,10 @@ fun EmoticonText( overflow, softWrap, maxLines, - emptyMap(), - onTextLayout, - style + minLines, + inlineContent = emptyMap(), + onTextLayout = onTextLayout, + style = style ) } @@ -97,6 +99,7 @@ fun EmoticonText( overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, + minLines: Int = 1, inlineContent: Map = emptyMap(), onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current @@ -137,6 +140,7 @@ fun EmoticonText( overflow, softWrap, maxLines, + minLines, emoticonInlineContent + inlineContent, onTextLayout, style @@ -159,6 +163,7 @@ fun IconText( overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, + minLines: Int = 1, inlineContent: Map = emptyMap(), onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = LocalTextStyle.current @@ -234,6 +239,7 @@ fun IconText( overflow, softWrap, maxLines, + minLines, iconInlineContent + inlineContent, onTextLayout, style diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml index d342cefa..2a8dc27e 100644 --- a/app/src/main/res/xml/data_extraction_rules.xml +++ b/app/src/main/res/xml/data_extraction_rules.xml @@ -1,5 +1,5 @@ - + + path="error" + tools:ignore="FullBackupContent" /> + path="appcenter" + tools:ignore="FullBackupContent" /> + + + + + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 8178a104..1ef8c109 100644 --- a/build.gradle +++ b/build.gradle @@ -4,11 +4,11 @@ buildscript { ext { glide_version = '4.14.2' retrofit_version = "2.9.0" - kotlin_version = '1.8.10' + kotlin_version = '1.8.21' //https://developer.android.com/jetpack/androidx/releases/compose-kotlin - compose_compiler_version = '1.4.3' + compose_compiler_version = '1.4.7' //https://developer.android.com/jetpack/compose/setup#bom-version-mapping - compose_bom_version = '2023.01.00' + compose_bom_version = '2023.05.00' wire_version = '4.4.3' hilt_version = '2.44.2' booster_version = '4.15.0' @@ -23,7 +23,7 @@ buildscript { maven { url "https://maven.aliyun.com/repository/public" } } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index df070c89..4666ae27 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip