forked from zotero/zotero-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
82 lines (75 loc) · 3.15 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
82
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
gradlePluginPortal()
}
dependencies {
classpath("com.android.tools.build:gradle:8.2.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
classpath(Libs.Kotlin.serialization)
classpath(Libs.Firebase.Crashlytics.crashlyticsGradle)
classpath(Libs.googleServices)
classpath(Libs.Dagger.hiltGradlePlugin)
classpath(Libs.realmGradlePlugin)
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id("com.google.dagger.hilt.android") version "2.47" apply false
}
allprojects {
repositories {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
maven {
url = uri("https://customers.pspdfkit.com/maven")
}
}
tasks.withType<KotlinCompile>().all {
kotlinOptions {
jvmTarget = javaVersion.toString()
suppressWarnings = true
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xopt-in=androidx.paging.ExperimentalPagingApi",
"-Xopt-in=kotlinx.coroutines.FlowPreview",
"-Xopt-in=androidx.compose.ui.ExperimentalComposeUiApi",
"-Xopt-in=androidx.compose.material.ExperimentalMaterialApi",
"-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-Xopt-in=androidx.compose.ui.text.ExperimentalTextApi",
"-Xopt-in=androidx.compose.animation.ExperimentalAnimationApi",
"-Xopt-in=com.google.accompanist.pager.ExperimentalPagerApi",
"-Xopt-in=coil.annotation.ExperimentalCoilApi",
"-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
"-Xopt-in=com.google.accompanist.permissions.ExperimentalPermissionsApi",
"-Xopt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-Xopt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi"
)
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${project.buildDir.absolutePath}/compose_compiler"
)
}
if (project.findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${project.buildDir.absolutePath}/compose_compiler"
)
}
}
}
}