-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
72 lines (62 loc) · 2.11 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
// Define versions in a single place
ext {
// Sdk and tools
compileSdkVersion = 31
minSdkVersion = 21
targetSdkVersion = 31
ktlint = "0.42.1"
detekt_version = '1.18.1'
// App dependencies
appCompatVersion = '1.4.1'
activityComposeVersion = '1.6.0-alpha03'
composeVersion = '1.2.0-beta03'
composeNavigationVersion = '2.5.0-rc01'
coreTestingVersion = '2.1.0'
espressoVersion = '3.4.0'
gradleVersion = '7.2.1'
junitVersion = '4.13.2'
kotlinVersion = '1.6.21'
ktxVersion = '1.7.0'
materialVersion = '1.7.0-alpha02'
material3Version = '1.0.0-alpha12'
runnerVersion = '1.0.1'
truthVersion = '1.0.1'
testExtJunit = '1.1.2'
uiAutomatorVersion = '2.2.0'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradleVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id "com.github.ben-manes.versions" version "0.36.0"
id "io.gitlab.arturbosch.detekt" version "1.18.1"
id "org.jlleitschuh.gradle.ktlint" version "10.2.1"
}
subprojects {
repositories {
google()
mavenCentral()
}
apply from: "../buildscripts/ktlint.gradle"
apply from: "../buildscripts/detekt.gradle"
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
// Treat all Kotlin warnings as errors
// allWarningsAsErrors = true
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi'
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.FlowPreview'
freeCompilerArgs += '-Xopt-in=kotlin.Experimental'
jvmTarget = "11"
}
}
}