Browse Source

Compose SDK版本

liuxiaolong 2 years ago
parent
commit
c19b4b645b
5 changed files with 24 additions and 20 deletions
  1. 17 13
      app/build.gradle
  2. 3 2
      build.gradle
  3. 2 1
      gradle.properties
  4. 2 2
      lib_common/build.gradle
  5. 0 2
      settings.gradle

+ 17 - 13
app/build.gradle

@@ -48,29 +48,33 @@ android {
 
 dependencies {
 
-    implementation 'androidx.core:core-ktx:1.7.0'
     implementation project(':lib_common')
 
-
+    //compose依赖
     implementation "androidx.compose.ui:ui:$compose_version"
-    implementation 'androidx.compose.material3:material3:1.0.0-alpha01'
+    implementation 'androidx.compose.material3:material3:1.0.0-alpha15'
     implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
-    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
-    implementation 'androidx.activity:activity-compose:1.3.1'
-    implementation "androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha03"
+    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
+    implementation 'androidx.activity:activity-compose:1.5.1'
+    implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
+
+    // compose 图片加载
     implementation("io.coil-kt:coil-compose:2.1.0")
+
+    implementation "com.google.accompanist:accompanist-systemuicontroller:0.23.1"
+    implementation "com.google.accompanist:accompanist-insets:0.23.1"
+    implementation "com.google.accompanist:accompanist-insets-ui:0.23.1"
+    implementation "com.google.accompanist:accompanist-systemuicontroller:0.23.1"
+
+    implementation "androidx.navigation:navigation-compose:2.5.1"
+    implementation "androidx.compose.runtime:runtime-livedata:1.2.0"
+    implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1"
+
     testImplementation 'junit:junit:4.13.2'
     androidTestImplementation 'androidx.test.ext:junit:1.1.3'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
     androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
     debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
     debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
-    implementation "com.google.accompanist:accompanist-systemuicontroller:0.23.1"
-    implementation "com.google.accompanist:accompanist-insets:0.23.1"
-    implementation "com.google.accompanist:accompanist-insets-ui:0.23.1"
-    implementation "com.google.accompanist:accompanist-systemuicontroller:0.23.1"
-    implementation "androidx.navigation:navigation-compose:2.5.0"
-    implementation "androidx.compose.runtime:runtime-livedata:1.1.0-beta01"
-    implementation "androidx.lifecycle:lifecycle-viewmodel-compose:1.1.0-alpha01"
 
 }

+ 3 - 2
build.gradle

@@ -1,14 +1,15 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
 buildscript {
     ext {
-        compose_version = '1.1.0-beta01'
+        compose_version = '1.2.0'
+        kotlin_version = '1.7.0'
     }
 }
 
 plugins {
     id 'com.android.application' version '7.2.0' apply false
     id 'com.android.library' version '7.2.0' apply false
-    id 'org.jetbrains.kotlin.android' version '1.5.31' apply false
+    id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
 }
 
 

+ 2 - 1
gradle.properties

@@ -20,4 +20,5 @@ kotlin.code.style=official
 # Enables namespacing of each library's R class so that its R class includes only the
 # resources declared in the library itself and none from the library's dependencies,
 # thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
+android.nonTransitiveRClass=true
+android.enableJetifier=true

+ 2 - 2
lib_common/build.gradle

@@ -36,7 +36,7 @@ android {
 
 dependencies {
 
-    api 'androidx.core:core-ktx:1.7.0'
+    api 'androidx.core:core-ktx:1.8.0'
     api 'androidx.appcompat:appcompat:1.4.2'
     api 'com.google.android.material:material:1.6.1'
     api 'androidx.recyclerview:recyclerview:1.2.1'
@@ -45,7 +45,7 @@ dependencies {
     androidTestImplementation 'androidx.test.ext:junit:1.1.3'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
 
-    def kotlin_version = '1.5.31'
+    def kotlin_version = '1.7.0'
     def lifecycle_version = '2.5.1'
     api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
 

+ 0 - 2
settings.gradle

@@ -15,8 +15,6 @@ pluginManagement {
 dependencyResolutionManagement {
     repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
     repositories {
-        google()
-        mavenCentral()
         google()
         mavenCentral()
         jcenter()