diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0ce04c2..b6bbfa1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -30,9 +30,6 @@ android { versionCode = 1 versionName = appVersionName - ndk { - abiFilters += listOf("arm64-v8a", "armeabi-v7a") - } } buildTypes { @@ -68,22 +65,18 @@ android { packaging { resources { excludes += listOf( - "/META-INF/{AL2.0,LGPL2.1}", + "/META-INF/AL2.0", + "/META-INF/LGPL2.1", "/META-INF/LICENSE*", "/META-INF/NOTICE*", "META-INF/DEPENDENCIES", "**/*.kotlin_metadata", "**/*.kotlin_module", ) - pickFirsts += listOf( - "META-INF/INDEX.LIST", - "META-INF/io.netty.versions.properties", - ) } } bundle { - language { enableSplit = true } density { enableSplit = true } abi { enableSplit = true } } diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 4b250b2..2911c9e 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -49,8 +49,6 @@ dependencies { implementation(libs.compose.animation) implementation(libs.compose.material3) implementation(libs.compose.ui) - debugImplementation(libs.compose.uiToolingPreview) - debugImplementation(libs.compose.uiTooling) implementation(libs.kotlinx.datetime) implementation(libs.tyme4kt) diff --git a/core/src/main/kotlin/plus/rua/project/Platform.kt b/core/src/main/kotlin/plus/rua/project/Platform.kt index 707ae63..8608d19 100644 --- a/core/src/main/kotlin/plus/rua/project/Platform.kt +++ b/core/src/main/kotlin/plus/rua/project/Platform.kt @@ -1,13 +1,8 @@ package plus.rua.project import android.os.Build -import androidx.activity.BackEventCompat -import androidx.activity.compose.BackHandler -import androidx.activity.compose.PredictiveBackHandler import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext -import kotlinx.coroutines.CancellationException -import kotlinx.coroutines.flow.Flow /** * 获取 WebP 动画资源的 URI。 @@ -37,36 +32,3 @@ fun getAppVersion(): String { "unknown" } } - -/** - * 预测性返回手势处理器(Android 13+)。 - * - * @param enabled 是否启用 - * @param onProgress 手势进度回调(0.0~1.0),跟手过程中持续调用 - * @param onBack 手势完成回调(滑动距离足够,执行返回) - * @param onCancel 手势取消回调(滑动距离不足,回弹) - */ -@Composable -fun AppPredictiveBackHandler( - enabled: Boolean = true, - onProgress: (Float) -> Unit = {}, - onBack: () -> Unit, - onCancel: () -> Unit = {} -) { - // 官方 PredictiveBackHandler — Flow 模式:collect 完成=返回,CancellationException=取消 - PredictiveBackHandler(enabled = enabled) { progress: Flow -> - try { - progress.collect { event -> - onProgress(event.progress) - } - onBack() - } catch (e: CancellationException) { - onCancel() - } - } - - // 降级:部分设备(如 OPPO/ColorOS)不通过 OnBackInvokedCallback 分发返回事件 - BackHandler(enabled = enabled) { - onBack() - } -} diff --git a/core/src/main/kotlin/plus/rua/project/ui/CalendarMonthView.kt b/core/src/main/kotlin/plus/rua/project/ui/CalendarMonthView.kt index 87db486..8d15520 100644 --- a/core/src/main/kotlin/plus/rua/project/ui/CalendarMonthView.kt +++ b/core/src/main/kotlin/plus/rua/project/ui/CalendarMonthView.kt @@ -18,7 +18,6 @@ import androidx.compose.animation.scaleOut import androidx.compose.animation.slideInVertically import androidx.compose.animation.slideOutVertically import androidx.compose.animation.togetherWith -import androidx.compose.animation.core.animateFloatAsState import androidx.compose.ui.graphics.TransformOrigin import androidx.compose.foundation.Canvas import androidx.compose.foundation.background