-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
54 lines (48 loc) · 1.53 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0-beta01'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
classpath libs.dagger.hilt.androidGradlePlugin
}
}
plugins {
alias(libs.plugins.ksp)
}
task clean(type: Delete) {
delete rootProject.buildDir
}
allprojects { project ->
project.afterEvaluate {
if (plugins.hasPlugin('com.johnbuhanan.android')) {
android.kotlinOptions {
useIR = true
jvmTarget = JavaVersion.VERSION_11.toString()
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlinx.coroutines.FlowPreview"
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}
kotlin {
sourceSets {
debug {
kotlin.srcDir("build/generated/ksp/debug/kotlin")
}
release {
kotlin.srcDir("build/generated/ksp/release/kotlin")
}
}
}
ksp {
// To turn off navigation graphs generation:
// (if you prefer creating NavGraph instances or you prefer using the normal NavHost)
// arg("compose-destinations.generateNavGraphs", "false")
// To change the package name where the generated files will be placed
// arg("compose-destinations.codeGenPackageName", "your.preferred.packagename")
}
}
}
}