-
Notifications
You must be signed in to change notification settings - Fork 144
/
build.gradle
83 lines (74 loc) · 2.38 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
buildscript {
// ---- DEPENDENCIES ----
// @formatter:off
ext.buildConfig = [
compileSdk : 29,
targetSdk : 29,
minSdk : 14,
gradlePlugin : '4.0.0'
]
ext.versions = [
kotlin : '1.3.72',
androidx : '1.1.0',
material : '1.1.0',
preference : '1.0.0',
constraintlayout : '1.1.3',
colorpicker : '1.0.5',
junit : '4.12',
mockito_kotlin : '2.0.0',
mockito_core : '2.23.4'
]
ext.deps = [
'androidx': [
'appCompat' : "androidx.appcompat:appcompat:${versions.androidx}",
'constraintLayout' : "androidx.constraintlayout:constraintlayout:${versions.constraintlayout}",
'preferences' : "androidx.preference:preference:${versions.preference}"
],
'kotlin': [
'stdlib': [
'jdk' : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
]
],
'material' : "com.google.android.material:material:${versions.material}",
'colorpicker' : "com.jaredrummler:colorpicker-compat:${versions.colorpicker}",
'junit' : "junit:junit:${versions.junit}",
'mockito': [
'core' : "org.mockito:mockito-core:${versions.mockito_core}",
'kotlin' : "com.nhaarman.mockitokotlin2:mockito-kotlin:${versions.mockito_kotlin}"
]
]
// @formatter:on
repositories {
google()
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:${buildConfig.gradlePlugin}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath 'org.jlleitschuh.gradle:ktlint-gradle:8.0.0'
}
}
allprojects {
repositories {
google()
gradlePluginPortal()
}
apply plugin: 'org.jlleitschuh.gradle.ktlint'
configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'org.jetbrains.kotlin') {
details.useVersion versions.kotlin
}
}
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
allWarningsAsErrors = true
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}