-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
148 lines (123 loc) · 4.33 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
repositories {
google()
jcenter()
}
configurations {
ktlint
}
def database_version = 9
android {
compileSdkVersion 28
defaultConfig {
applicationId "me.camsteffen.polite"
minSdkVersion 21
targetSdkVersion 28
versionCode 62
versionName "1.4.7"
resConfigs "en", "de"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "int", "DATABASE_VERSION", "$database_version"
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString())
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
applicationIdSuffix ".debug"
}
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
dataBinding {
enabled = true
}
}
dependencies {
def dagger_version = '2.24'
def lifecycle_version = '2.1.0'
def nav_version = '2.1.0'
def room_version = '2.2.0'
def work_version = '2.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation 'androidx.core:core-ktx:1.1.0'
implementation "androidx.preference:preference-ktx:1.1.0"
implementation "com.google.android.material:material:1.0.0"
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.1'
implementation "com.google.dagger:dagger:$dagger_version"
implementation "com.google.dagger:dagger-android:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation "androidx.work:work-runtime-ktx:$work_version"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
androidTestImplementation "androidx.room:room-testing:$room_version"
testImplementation 'junit:junit:4.12'
testImplementation 'io.mockk:mockk:1.9.3'
testImplementation 'com.google.truth:truth:1.0'
androidTestImplementation 'com.google.truth:truth:1.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
testImplementation('org.threeten:threetenbp:1.4.0') {
exclude group: 'com.jakewharton.threetenabp', module: 'threetenabp'
}
ktlint "com.pinterest:ktlint:0.35.0"
}
task ktlint(type: JavaExec, group: 'verification') {
description = 'Check Kotlin code style.'
classpath = configurations.ktlint
main = 'com.pinterest.ktlint.Main'
args '--android', 'src/**/*.kt'
}
task ktlintFormat(type: JavaExec, group: 'formatting') {
description = 'Fix Kotlin code style deviations.'
classpath = configurations.ktlint
main = 'com.pinterest.ktlint.Main'
args '--android', '-F', 'src/**/*.kt'
}
check.dependsOn ktlint