2021-11-07 16:50:28 +08:00
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
2022-10-09 10:51:27 +08:00
|
|
|
mavenLocal()
|
2021-11-07 16:50:28 +08:00
|
|
|
mavenCentral()
|
2022-10-09 10:51:27 +08:00
|
|
|
google()
|
2023-04-30 17:50:55 +08:00
|
|
|
maven("https://jitpack.io")
|
2021-11-07 16:50:28 +08:00
|
|
|
}
|
|
|
|
dependencies {
|
2023-04-30 17:50:55 +08:00
|
|
|
classpath(libs.android.gradle)
|
|
|
|
classpath(libs.kotlin.gradle.plugin)
|
|
|
|
classpath(libs.kotlin.serialization)
|
2023-07-10 11:25:17 +08:00
|
|
|
// classpath(libs.rikka.gradle)
|
2021-11-07 16:50:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-10 11:25:17 +08:00
|
|
|
// https://youtrack.jetbrains.com/issue/KTIJ-19369
|
|
|
|
@Suppress(
|
|
|
|
"DSL_SCOPE_VIOLATION",
|
|
|
|
)
|
|
|
|
plugins {
|
|
|
|
alias(libs.plugins.google.ksp) apply false
|
2023-08-10 22:02:12 +08:00
|
|
|
alias(libs.plugins.google.hilt) apply false
|
2023-07-10 11:25:17 +08:00
|
|
|
alias(libs.plugins.rikka.refine) apply false
|
2023-04-30 19:15:26 +08:00
|
|
|
}
|
|
|
|
|
2023-07-10 11:25:17 +08:00
|
|
|
// can not work with Kotlin Multiplatform
|
|
|
|
// https://youtrack.jetbrains.com/issue/KT-33191/
|
|
|
|
//tasks.register<Delete>("clean").configure {
|
|
|
|
// delete(rootProject.buildDir)
|
|
|
|
//}
|
|
|
|
|
2023-04-30 19:15:26 +08:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2023-07-10 11:25:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// https://kotlinlang.org/docs/js-project-setup.html#use-pre-installed-node-js
|
|
|
|
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
|
|
|
|
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().download =
|
|
|
|
false
|
2022-10-09 10:51:27 +08:00
|
|
|
}
|