forked from TeamAmaze/AmazeFileManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
186 lines (173 loc) · 6.13 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = "1.5.0"
robolectricVersion = '4.7'
glideVersion = '4.11.0'
sshjVersion = '0.32.0'
jcifsVersion = '2.1.6'
fabSpeedDialVersion = '3.1.1'
roomVersion = '2.4.0'
bouncyCastleVersion = '1.68'
awaitilityVersion = "3.1.6"
androidMaterialVersion = "1.4.0"
androidXFragmentVersion = "1.3.6"
androidXAppCompatVersion = "1.3.1"
androidXTestVersion = "1.4.0"
androidXTestExtVersion = "1.1.3"
uiAutomatorVersion = "2.2.0"
junitVersion = "4.13.2"
slf4jVersion = "1.7.25"
mockitoVersion = "3.9.0"
mockitoKotlinVersion = "3.2.0"
androidBillingVersion = "4.0.0"
junrarVersion = "7.4.0"
zip4jVersion = "2.6.4"
espressoVersion = "3.4.0"
androidXPrefVersion = "1.1.1"
materialDialogsVersion = "0.9.6.0"
jacocoVersion = "0.8.7"
commonsCompressVersion = "1.20"
libsuVersion = "3.2.1"
mockkVersion = "1.12.2"
logbackAndroidVersion = "2.0.0"
}
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.hiya:jacoco-android:0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
classpath "com.project.starter:easylauncher:4.0.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.5.0"
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://jcenter.bintray.com" }
}
tasks.withType(Test) {
maxParallelForks = 4
maxHeapSize = "4g"
forkEvery = 4
failFast = true
}
}
spotless {
java {
licenseHeaderFile 'spotless.license-java'
target 'app/src/**/*.java', 'commons_compress_7z/src/**/*.java', 'file_operations/src/**/*.java'
googleJavaFormat('1.15.0')
removeUnusedImports() // removes any unused imports
importOrder 'java', 'javax', 'org', 'com', 'android', 'androidx', ''
}
kotlin {
licenseHeaderFile 'spotless.license-java'
target 'app/src/**/*.kt', 'file_operations/src/**/*.kt'
ktlint("0.44.0").setUseExperimental(true).userData(['disabled_rules': 'no-wildcard-imports',
'kotlin_imports_layout': 'idea', 'indent_size': '4',
'max_line_length': '100'])
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
configurations {
robo16
robo17
robo18
robo19
robo21
robo22
robo23
robo24
robo25
robo26
robo27
robo28
robo29
robo30
robo31
}
dependencies {
robo16 "org.robolectric:android-all-instrumented:4.1.2_r1-robolectric-r1-i2"
robo17 "org.robolectric:android-all-instrumented:4.2.2_r1.2-robolectric-r1-i2"
robo18 "org.robolectric:android-all-instrumented:4.3_r2-robolectric-r1-i2"
robo19 "org.robolectric:android-all-instrumented:4.4_r1-robolectric-r2-i2"
robo21 "org.robolectric:android-all-instrumented:5.0.2_r3-robolectric-r0-i2"
robo22 "org.robolectric:android-all-instrumented:5.1.1_r9-robolectric-r2-i2"
robo23 "org.robolectric:android-all-instrumented:6.0.1_r3-robolectric-r1-i2"
robo24 "org.robolectric:android-all-instrumented:7.0.0_r1-robolectric-r1-i2"
robo25 "org.robolectric:android-all-instrumented:7.1.0_r7-robolectric-r1-i2"
robo26 "org.robolectric:android-all-instrumented:8.0.0_r4-robolectric-r1-i2"
robo27 "org.robolectric:android-all-instrumented:8.1.0-robolectric-4611349-i2"
robo28 "org.robolectric:android-all-instrumented:9-robolectric-4913185-2-i2"
robo29 "org.robolectric:android-all-instrumented:10-robolectric-5803371-i2"
robo30 "org.robolectric:android-all-instrumented:11-robolectric-6757853-i2"
robo31 "org.robolectric:android-all-instrumented:12-robolectric-7732740-i2"
}
def robolectricDependencies = "${rootProject.buildDir.path}/robolectric"
task fetchRobolectricDependencies(type: 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
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) {
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'
}
}
}