mirror of
https://github.com/BetterAndroid/compose-multiplatform-template.git
synced 2025-09-05 10:15:24 +08:00
chore: use alpha compose android version and modify android configs
This commit is contained in:
@@ -23,6 +23,8 @@ android {
|
||||
compileSdk = property.project.android.compileSdk
|
||||
|
||||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
||||
sourceSets["main"].res.srcDirs("src/androidMain/res")
|
||||
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
|
||||
|
||||
defaultConfig {
|
||||
applicationId = property.project.groupName
|
||||
@@ -41,4 +43,13 @@ android {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
|
||||
val composeAndroidVersion = dependencies.androidx.compose.android.version
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency {
|
||||
if (requested.group.startsWith("androidx.compose."))
|
||||
useVersion(composeAndroidVersion)
|
||||
}
|
||||
}
|
@@ -7,6 +7,8 @@ repositories:
|
||||
scope: PLUGINS
|
||||
google:
|
||||
maven-central:
|
||||
jetbrains-compose-dev:
|
||||
url: https://maven.pkg.jetbrains.space/public/p/compose/dev
|
||||
|
||||
plugins:
|
||||
org.jetbrains.kotlin.multiplatform:
|
||||
@@ -25,6 +27,13 @@ plugins:
|
||||
version-ref: android-application
|
||||
|
||||
libraries:
|
||||
# Use a placeholder for the alpha compose version
|
||||
# In the project to use "androidx.compose.android.version" to obtain the version
|
||||
# and use the "resolutionStrategy" to replace all the current "stable" versions
|
||||
androidx.compose.runtime:
|
||||
runtime-android:
|
||||
alias: androidx-compose-android
|
||||
version: ^1.6.0-alpha01
|
||||
androidx.activity:
|
||||
activity:
|
||||
version: +
|
||||
@@ -33,9 +42,6 @@ libraries:
|
||||
androidx.core:
|
||||
core-ktx:
|
||||
version: +
|
||||
androidx.appcompat:
|
||||
appcompat:
|
||||
version: +
|
||||
com.google.android.material:
|
||||
material:
|
||||
version: +
|
||||
|
@@ -37,7 +37,6 @@ kotlin {
|
||||
dependencies {
|
||||
api(compose.foundation)
|
||||
api(androidx.core.core.ktx)
|
||||
api(androidx.appcompat.appcompat)
|
||||
api(androidx.activity.activity)
|
||||
api(androidx.activity.activity.compose)
|
||||
}
|
||||
|
Reference in New Issue
Block a user