-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
165 lines (151 loc) · 5.28 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = "1.9.10"
}
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.hiya:jacoco-android:0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.project.starter:easylauncher:6.1.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id "com.diffplug.spotless" version "6.25.0"
id "com.google.devtools.ksp" version "1.9.10-1.0.13" apply false
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://jcenter.bintray.com" }
}
tasks.withType(Test).tap {
configureEach {
maxParallelForks = 8
maxHeapSize = "2g"
forkEvery = 4
failFast = true
}
}
}
spotless {
// update license header from first commit
// ratchetFrom='78b1a4cf3c0a9519be92ff8445f7dff2cd8722b1'
java {
licenseHeaderFile 'amaze.license.spotless.txt'
target '*/src/**/*.java'
googleJavaFormat('1.19.2')
removeUnusedImports() // removes any unused imports
importOrder 'java', 'javax', 'org', 'com', 'android', 'androidx', ''
}
kotlin {
licenseHeaderFile 'amaze.license.spotless.txt'
target '*/src/**/*.kt'
ktlint("1.1.1")
.setEditorConfigPath("$projectDir/.editorconfig")
}
}
configurations {
robo16
robo17
robo18
robo19
robo21
robo22
robo23
robo24
robo25
robo26
robo27
robo28
robo29
robo30
robo31
robo32
robo33
}
dependencies {
robo16 "org.robolectric:android-all-instrumented:4.1.2_r1-robolectric-r1-i4"
robo17 "org.robolectric:android-all-instrumented:4.2.2_r1.2-robolectric-r1-i4"
robo18 "org.robolectric:android-all-instrumented:4.3_r2-robolectric-r1-i4"
robo19 "org.robolectric:android-all-instrumented:4.4_r1-robolectric-r2-i4"
robo21 "org.robolectric:android-all-instrumented:5.0.2_r3-robolectric-r0-i4"
robo22 "org.robolectric:android-all-instrumented:5.1.1_r9-robolectric-r2-i4"
robo23 "org.robolectric:android-all-instrumented:6.0.1_r3-robolectric-r1-i4"
robo24 "org.robolectric:android-all-instrumented:7.0.0_r1-robolectric-r1-i4"
robo25 "org.robolectric:android-all-instrumented:7.1.0_r7-robolectric-r1-i4"
robo26 "org.robolectric:android-all-instrumented:8.0.0_r4-robolectric-r1-i4"
robo27 "org.robolectric:android-all-instrumented:8.1.0-robolectric-4611349-i4"
robo28 "org.robolectric:android-all-instrumented:9-robolectric-4913185-2-i4"
robo29 "org.robolectric:android-all-instrumented:10-robolectric-5803371-i4"
robo30 "org.robolectric:android-all-instrumented:11-robolectric-6757853-i4"
robo31 "org.robolectric:android-all-instrumented:12-robolectric-7732740-i4"
robo32 "org.robolectric:android-all-instrumented:12.1-robolectric-8229987-i4"
robo33 "org.robolectric:android-all-instrumented:13-robolectric-9030017-i4"
}
def robolectricDependencies = "${rootProject.buildDir.path}/robolectric"
tasks.register('fetchRobolectricDependencies', Copy) {
from configurations.robo16
from configurations.robo17
from configurations.robo18
from configurations.robo19
from configurations.robo21
from configurations.robo22
from configurations.robo23
from configurations.robo24
from configurations.robo25
from configurations.robo26
from configurations.robo27
from configurations.robo28
from configurations.robo29
from configurations.robo30
from configurations.robo31
from configurations.robo32
from configurations.robo33
into robolectricDependencies
}
subprojects {
afterEvaluate {
if (project.plugins.hasPlugin("com.android.application") || project.plugins.hasPlugin("com.android.library")) {
android {
testOptions.unitTests.all {
systemProperty 'robolectric.offline', 'true'
systemProperty 'robolectric.dependency.dir', robolectricDependencies
}
}
tasks.withType(Test).configureEach {
it.dependsOn fetchRobolectricDependencies
}
}
if (project.plugins.hasPlugin("jacoco-android")) {
android {
testOptions.unitTests.all {
jacoco {
excludes = ['jdk.internal.*']
}
}
}
}
dependencies {
compileOnly 'com.github.pengrad:jdk9-deps:1.0'
if (project.hasProperty('kapt')) {
kapt 'javax.xml.bind:jaxb-api:2.3.1'
kapt 'com.sun.xml.bind:jaxb-core:2.3.0.1'
kapt 'com.sun.xml.bind:jaxb-impl:2.3.2'
}
annotationProcessor 'javax.xml.bind:jaxb-api:2.3.1'
annotationProcessor 'com.sun.xml.bind:jaxb-core:2.3.0.1'
annotationProcessor 'com.sun.xml.bind:jaxb-impl:2.3.2'
}
}
}