forked from Jays2Kings/tachiyomiJ2K
-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle.kts
81 lines (72 loc) · 2.62 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.BasePlugin
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.*
plugins {
alias(libs.plugins.kotlinter)
alias(libs.plugins.gradle.versions)
alias(androidx.plugins.application) apply false
alias(androidx.plugins.library) apply false
alias(kotlinx.plugins.android) apply false
alias(kotlinx.plugins.compose.compiler) apply false
alias(kotlinx.plugins.multiplatform) apply false
alias(kotlinx.plugins.parcelize) apply false
alias(kotlinx.plugins.serialization) apply false
alias(libs.plugins.aboutlibraries) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.moko) apply false
alias(libs.plugins.sqldelight) apply false
}
subprojects {
tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
}
plugins.withType<BasePlugin> {
configure<BaseExtension> {
compileSdkVersion(AndroidConfig.compileSdk)
ndkVersion = AndroidConfig.ndk
defaultConfig {
minSdk = AndroidConfig.minSdk
targetSdk = AndroidConfig.targetSdk
ndk {
version = AndroidConfig.ndk
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
isCoreLibraryDesugaringEnabled = true
}
dependencies {
add("coreLibraryDesugaring", libs.desugar)
}
}
}
}
tasks.named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class.java).configure {
rejectVersionIf {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { candidate.version.uppercase(Locale.ROOT).contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(candidate.version)
isStable.not()
}
// optional parameters
checkForGradleUpdate = true
outputFormatter = "json"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}