-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle
94 lines (80 loc) · 2.26 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = "1.6.10"
dagger_hilt_version = "2.41"
coroutines_version = "1.6.0"
nav_version = "2.4.1"
ktlint_version = "0.43.2"
}
repositories {
google()
jcenter()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:7.1.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$dagger_hilt_version"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.3.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
gradlePluginPortal()
maven { url 'https://jitpack.io' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
subprojects {
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target("**/*.kt")
// Spotless doesn't read .editorconfig yet: https://github.com/diffplug/spotless/issues/142
ktlint(ktlint_version).userData([
'indent_size' : '2',
'ij_kotlin_imports_layout': '*',
'end_of_line' : 'lf',
'charset' : 'utf-8',
])
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
format("xml") {
target("**/res/**/*.xml")
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
groovyGradle {
target('*.gradle')
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
kotlinGradle {
target("**/*.gradle.kts", "*.gradle.kts")
ktlint(ktlint_version).userData([
"indent_size" : "2",
"ij_kotlin_imports_layout": "*",
"end_of_line" : "lf",
"charset" : "utf-8"
])
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}