Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Apr 30, 2023
1 parent ddbb29f commit dcb86b3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
7 changes: 6 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ android {
}
}

lint {
disable.add("ModifierFactoryUnreferencedReceiver")
// baseline = file("lint-baseline.xml")
}

signingConfigs {
create("release") {
storeFile = file("./android.jks")
Expand Down Expand Up @@ -95,7 +100,7 @@ android {
}
}
configurations.all {
resolutionStrategy{
resolutionStrategy {
// https://github.com/Kotlin/kotlinx.coroutines/issues/2023
exclude("org.jetbrains.kotlinx", "kotlinx-coroutines-debug")
}
Expand Down
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@ buildscript {

tasks.register<Delete>("clean").configure {
delete(rootProject.buildDir)
}

project.gradle.taskGraph.whenReady {
allTasks.forEach { task ->
// error: The binary version of its metadata is 1.8.0, expected version is 1.6.0.
// I don't know how to solve it, so just disable these tasks
if (task.name.contains("lintAnalyzeDebug") || task.name.contains("lintVitalAnalyzeRelease")) {
task.enabled = false
}
}
}
19 changes: 10 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ dependencyResolutionManagement {
version("android.targetSdk", "33")
version("android.buildToolsVersion", "33.0.0")

library("kotlin.gradle.plugin", "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
library("kotlin.serialization", "org.jetbrains.kotlin:kotlin-serialization:1.8.10")
library("kotlin.gradle.plugin", "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20")
library("kotlin.serialization", "org.jetbrains.kotlin:kotlin-serialization:1.8.20")
// library("kotlin.stdlib", "org.jetbrains.kotlin:kotlin-stdlib:1.8.10")

// compose 编译器的版本, 需要注意它与 compose 的版本没有关联
// https://mvnrepository.com/artifact/androidx.compose.compiler/compiler
version("compose.compiler", "1.4.4")
library("compose.ui", "androidx.compose.ui:ui:1.4.0")
library("compose.material", "androidx.compose.material:material:1.4.0")
library("compose.preview", "androidx.compose.ui:ui-tooling-preview:1.4.0")
library("compose.tooling", "androidx.compose.ui:ui-tooling:1.4.0")
library("compose.junit4", "androidx.compose.ui:ui-test-junit4:1.4.0")
version("compose.compiler", "1.4.6")
library("compose.ui", "androidx.compose.ui:ui:1.4.2")
library("compose.material", "androidx.compose.material:material:1.4.2")
library("compose.preview", "androidx.compose.ui:ui-tooling-preview:1.4.2")
library("compose.tooling", "androidx.compose.ui:ui-tooling:1.4.2")
library("compose.junit4", "androidx.compose.ui:ui-test-junit4:1.4.2")
library("compose.activity", "androidx.activity:activity-compose:1.7.0")

// https://github.com/Tencent/MMKV/blob/master/README_CN.md
Expand All @@ -58,7 +59,7 @@ dependencyResolutionManagement {
library("others.floating.bubble.view", "io.github.torrydo:floating-bubble-view:0.5.2")

library("androidx.appcompat", "androidx.appcompat:appcompat:1.6.1")
library("androidx.core.ktx", "androidx.core:core-ktx:1.9.0")
library("androidx.core.ktx", "androidx.core:core-ktx:1.10.0")
library(
"androidx.lifecycle.runtime.ktx",
"androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
Expand Down

0 comments on commit dcb86b3

Please sign in to comment.