-
Notifications
You must be signed in to change notification settings - Fork 217
/
build.gradle
122 lines (105 loc) · 3.14 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
buildscript {
ext.kotlinVersion = '1.9.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
ext {
// From e.g. https://source.android.com/setup/start/build-numbers
// Android 14 34 Android14
// Android 13 33 Android13
// Android 12L 32 Android12L
// Android 12 31 Android12
// Android 11 30 Android11
// Android 10 29 Android10
// Android 9.0 28 PIE
// Android 8.1 27 OREO_MR1
// Android 8.0 26 OREO
// Android 7.1.1, 7.1 25 NOUGAT_MR1
// Android 7.0 24 NOUGAT
// Android 6.0 23 MARSHMALLOW
// Android 5.1 22 LOLLIPOP_MR1
// Android 5.0 21 LOLLIPOP
// Android 4.4W 20 KITKAT_WATCH
// Android 4.4 19 KITKAT
// Android 4.3 18 JELLY_BEAN_MR2
// Android 4.2, 4.2.2 17 JELLY_BEAN_MR1
// Remember to keep these values in sync with .travis.yml
compileSdkVersion=34
minSdkVersion=23
targetSdkVersion=34
// java version
javaVersion = JavaVersion.VERSION_11
// centrally manage some other dependencies
mapsforgeVersion = '0.20.0'
osmdroidVersion = '6.1.18'
// test dependencies
assertjVersion = '3.25.3'
junitVersion = '4.13.2'
mockitoVersion = '5.11.0'
robolectricVersion = '4.11.1'
}
// Configure common settings in all projects
subprojects {
if (!file("${projectDir}/build.gradle").exists())
return
gradle.projectsEvaluated {
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
tasks.withType(Test).tap {
configureEach {
testLogging {
exceptionFormat 'full'
showCauses true
showExceptions true
showStackTraces true
events = ['passed', 'failed', 'skipped']
}
}
}
}
buildscript {
repositories {
mavenCentral()
google() // required for Android plugins
}
}
repositories {
mavenCentral()
google() // required for Android libraries
maven { url "https://jitpack.io" } // required for https://github.com/smart-fun/XmlToJson
}
if (projectDir.getName().equals('cyclestreets.app')) {
apply plugin: 'com.android.application'
} else {
apply plugin: 'com.android.library'
}
apply plugin: 'kotlin-android'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility rootProject.ext.javaVersion
targetCompatibility rootProject.ext.javaVersion
}
kotlinOptions {
jvmTarget = '11'
}
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
}
lintOptions {
// Required due to strictness of the Android developer tools. See lint.xml for full details.
lintConfig rootProject.file('gradle/lint.xml')
// Kotlin (nullability) interop check - potentially useful but quite noisy
// check 'Interoperability'
}
buildFeatures.viewBinding = true
}
}