-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.gradle
73 lines (64 loc) · 2.65 KB
/
build.gradle
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.versions)
alias(libs.plugins.dependencyGuard) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.android.test) apply false
alias(libs.plugins.androidx.baselineprofile) apply false
alias(libs.plugins.gms) apply false
alias(libs.plugins.firebase.crashlytics) apply false
}
subprojects {
apply from: rootProject.file('detekt.gradle')
afterEvaluate {
if (project.plugins.hasPlugin(libs.plugins.android.application.get().pluginId) ||
project.plugins.hasPlugin(libs.plugins.android.library.get().pluginId)
) {
android {
compileSdkVersion libs.versions.compileSdk.get() as Integer
defaultConfig {
minSdk libs.versions.minSdk.get() as Integer
targetSdk libs.versions.targetSdk.get() as Integer
vectorDrawables.useSupportLibrary true
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=" +
project.rootDir.absolutePath + "/compose_compiler_config.conf"
]
}
buildFeatures {
viewBinding true
}
}
dependencies {
coreLibraryDesugaring libs.desugarJdkLibs
}
}
}
}
tasks.named("dependencyUpdates").configure {
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA']
.any { keyword -> version.toUpperCase().contains(keyword) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
rejectVersionIf {
!it.currentVersion.contains(".") ||
(isNonStable(it.candidate.version) && !isNonStable(it.currentVersion))
}
}