-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
97 lines (80 loc) · 2.83 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
buildscript {
repositories {
google()
gradlePluginPortal()
}
dependencies {
classpath libs.android.gradle
classpath libs.kotlin.gradle
classpath libs.objectbox
classpath libs.google.services.gradle
classpath libs.firebase.crashlytics.gradle
classpath libs.spotless
classpath libs.gradleVersionsPlugin
classpath libs.gradleLicensePlugin
}
}
plugins {
id 'com.google.devtools.ksp' version '2.0.20-1.0.25' apply false
}
allprojects {
repositories {
maven {
url "https://artifacts.alfresco.com/nexus/content/groups/public-snapshots"
content { includeGroup "com.alfresco.android" }
}
google()
mavenCentral()
maven {
url "https://jitpack.io"
content { includeGroup "com.github.chrisbanes" }
}
}
}
static def dependencyToString(dependency) {
return "${dependency.module}:${dependency.versionConstraint.requiredVersion}"
}
subprojects {
afterEvaluate {
if(it.hasProperty('android')) {
android {
compileSdkVersion 34
defaultConfig {
minSdkVersion 24
targetSdkVersion 34
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
sourceSets['main'].java.srcDir('src/main/kotlin')
configurations.all {
resolutionStrategy {
// Force kotlin-reflect version until Moshi is updated
force dependencyToString(libs.kotlin.reflect.get())
// Force Guava version until ExoPlayer is updated
force dependencyToString(libs.guava.get())
// Don't cache changing modules at all
cacheChangingModulesFor 0, 'seconds'
}
}
}
}
}
apply from: "$project.rootDir/config/spotless.gradle"
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
// Treat all Kotlin warnings as errors
// allWarningsAsErrors = true
// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.FlowPreview"
// Enable experimental Stdlib
freeCompilerArgs += "-Xopt-in=kotlin.ExperimentalStdlibApi"
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
// Set JVM target to 17
jvmTarget = "17"
}
}
}
apply from: "$rootDir/config/versions.gradle"