-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathbuild.gradle
130 lines (102 loc) · 3.46 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
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.8.1'
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.1.5'
classpath 'com.puppycrawl.tools:checkstyle:10.21.3'
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'idea'
dependencies {
// Android stuff
implementation 'androidx.appcompat:appcompat-resources:1.7.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.drawerlayout:drawerlayout:1.2.0'
implementation 'androidx.lifecycle:lifecycle-process:2.8.7'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.guava:guava:33.4.0-jre'
implementation 'javax.inject:javax.inject:1'
implementation 'joda-time:joda-time:2.13.1'
implementation 'org.apache.commons:commons-csv:1.12.0'
implementation 'org.apache.commons:commons-text:1.13.0'
compileOnly 'javax.annotation:jsr250-api:1.0'
kapt 'com.google.dagger:dagger-compiler:2.53'
kapt 'com.google.dagger:dagger-android-processor:2.53'
api 'com.google.dagger:dagger-android-support:2.53'
api 'com.google.dagger:dagger-android:2.53'
api 'com.google.dagger:dagger:2.53'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.15.2'
// For some reason without this build fails with duplicate classes exception.
implementation(platform('org.jetbrains.kotlin:kotlin-bom:2.1.0'))
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions.incremental = false
buildFeatures.buildConfig = true
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
namespace 'me.tsukanov.counter'
applicationId 'me.tsukanov.counter'
versionCode rootProject.ext.appVersion
versionName "${rootProject.ext.appVersion}"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
multiDexEnabled true
}
buildTypes {
release {
debuggable false
jniDebuggable false
renderscriptDebuggable false
pseudoLocalesEnabled false
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
testOptions {
unitTests {
returnDefaultValues = true
includeAndroidResources = true
}
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
apply plugin: 'com.github.spotbugs'
spotbugs {
ignoreFailures = true
}
apply plugin: 'checkstyle'
checkstyle {
configFile rootProject.file('checkstyle.xml')
ignoreFailures false
maxWarnings = 0
showViolations true
}
tasks.register('checkstyle', Checkstyle) {
source 'src/main/java'
source 'src/test/java'
include '**/*.java'
classpath = files()
}
preBuild.dependsOn('checkstyle')
assemble.dependsOn('lint')
check.dependsOn('checkstyle')