From 3ccd3d41e6c7c93c37e305d44fb0efbe8456ee75 Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Mon, 1 Aug 2022 15:27:38 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=BC=95=E5=85=A5=20Jetpack=20Compose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index e3505992..de0d6962 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -36,6 +36,12 @@ android { useSupportLibrary true } } + buildFeatures { + compose true + } + composeOptions { + kotlinCompilerExtensionVersion '1.2.0' + } signingConfigs { release { keyAlias keystoreProperties["releaseKeyAlias"] @@ -65,6 +71,7 @@ android { } kotlinOptions { jvmTarget = '1.8' + freeCompilerArgs += ["-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"] } packagingOptions { resources { @@ -81,6 +88,19 @@ android { } dependencies { + def compose_version = '1.1.1' + + // Integration with activities + implementation 'androidx.activity:activity-compose:1.5.0' + // Compose Material Design + implementation "androidx.compose.material:material:$compose_version" + // Animations + implementation "androidx.compose.animation:animation:$compose_version" + // Tooling support (Previews, etc.) + implementation "androidx.compose.ui:ui-tooling:$compose_version" + // When using a MDC theme + implementation "com.google.android.material:compose-theme-adapter:1.1.1" + implementation 'com.google.protobuf:protobuf-java:3.21.1' implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.2.4'