-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.gradle
250 lines (217 loc) · 9.56 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
buildscript {
repositories {
mavenCentral()
google()
// jcenter reached end-of-life, but is required for MQTT until migrated.
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' // add plugin
classpath 'com.google.gms:google-services:4.3.8' //added gms support
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.6.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
dependencies {
//firebase
implementation 'com.google.firebase:firebase-crashlytics:18.0.0'
implementation 'com.google.firebase:firebase-analytics:19.0.0'
implementation 'com.google.firebase:firebase-core:19.0.0'
//google api
implementation 'com.google.android.gms:play-services-base:17.6.0'
implementation 'com.google.android.gms:play-services-basement:17.6.0'
implementation 'com.google.android.gms:play-services-tasks:17.2.1'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
//greenDao
// implementation 'org.roboguice:roboguice:4.0.0'
implementation 'org.greenrobot:greendao:3.3.0'
implementation 'org.greenrobot:greendao-generator:3.3.0'
//COAP
//implementation 'com.mbed.java-coap:coap-core:5.0.0' //original package
implementation files('libs/coap-core-5.1.0-SNAPSHOT.jar') //forked repo https://github.com/irinil/java-coap
//AMQP
// https://mvnrepository.com/artifact/com.rabbitmq/amqp-client
implementation group: 'com.rabbitmq', name: 'amqp-client', version: '5.12.0'
implementation files('libs/qpid-broker-core-9.0.0-SNAPSHOT.jar') //forked repo https://github.com/irinil/qpid-broker-j
//implementation group: 'org.apache.qpid', name: 'qpid-broker-core', version: '8.0.0' //default package doesn't support android.
// https://mvnrepository.com/artifact/javax.naming/jndi
implementation files('libs/jndi-1.2.1.jar');
// https://mvnrepository.com/artifact/org.apache.qpid/qpid-broker-plugins-amqp-0-8-protocol
implementation group: 'org.apache.qpid', name: 'qpid-broker-plugins-amqp-0-8-protocol', version: '8.0.4'
// https://mvnrepository.com/artifact/org.apache.qpid/qpid-broker-plugins-amqp-1-0-protocol
implementation group: 'org.apache.qpid', name: 'qpid-broker-plugins-amqp-1-0-protocol', version: '8.0.4'
// https://mvnrepository.com/artifact/org.apache.qpid/qpid-broker-plugins-memory-store
implementation group: 'org.apache.qpid', name: 'qpid-broker-plugins-memory-store', version: '8.0.4'
//dependencies of AMQP broker
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation group: 'com.google.guava', name: 'guava', version: '30.1.1-android'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
// https://mvnrepository.com/artifact/joda-time/joda-time
implementation group: 'joda-time', name: 'joda-time', version: '2.10.10' //for min <26 sdk
//logback
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
implementation 'com.github.tony19:logback-android:2.0.0'
//MQTT
//moquette
implementation 'io.moquette:moquette-broker:0.12.1'
//hive-Mq
implementation group: 'com.hivemq', name: 'hivemq-mqtt-client', version: '1.2.2'
//SU Library for root
implementation 'eu.chainfire:libsuperuser:1.0.0.201704021214'
//RootTools Library
implementation 'com.github.Stericson:RootShell:1.6' //RootTolls depends on RootShell and it's not correctly setUped for the jitpack
implementation ('com.github.Stericson:RootTools:5.0') {//Refer to https://github.com/Stericson/RootTools/issues/65
exclude group: 'com.github.Stericson'
}
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
//androidX legacy support
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.preference:preference:1.1.1'
//other libraries
implementation files('libs/sshlib-v1.1.jar')
implementation files('libs/alfresco-jlan.jar')
implementation files('libs/nineoldandroids-2.4.0.jar')
implementation files('libs/cryptix-jce-provider.jar')
implementation group: 'org.snmp4j', name: 'snmp4j', version: '3.4.5'
// https://mvnrepository.com/artifact/org.snmp4j/snmp4j-agent
implementation group: 'org.snmp4j', name: 'snmp4j-agent', version: '3.3.6'
implementation files('libs/VirusTotalAPI.jar')
implementation 'com.google.firebase:firebase-analytics:19.0.0'
// https://mvnrepository.com/artifact/com.hierynomus/smbj
testImplementation group: 'com.hierynomus', name: 'smbj', version: '0.11.1'
// https://mvnrepository.com/artifact/commons-io/commons-io
implementation group: 'commons-io', name: 'commons-io', version: '2.9.0'
//device-Names
implementation 'com.jaredrummler:android-device-names:2.0.0'
//materialDesign
implementation 'com.google.android.material:material:1.4.0-beta01'
//leakcanary
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// Required -- JUnit 4 framework
testImplementation 'junit:junit:4.13.2'
//testImplementation 'androidx.test:core:1.2.0'
// Optional -- Mockito framework
testImplementation "org.mockito:mockito-core:3.10.0"
implementation 'androidx.annotation:annotation:1.0.0'
androidTestImplementation 'androidx.test:rules:1.4.0-beta01'
androidTestImplementation 'androidx.test:runner:1.4.0-beta01'
// Optional -- UI testing with Espresso
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//PowerMock
testImplementation 'org.powermock:powermock-api-mockito2:2.0.9'
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
testImplementation 'org.powermock:powermock-core:2.0.9'
testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.9'
implementation 'androidx.multidex:multidex:2.0.0'
// Optional -- Robolectric environment
testImplementation 'org.robolectric:robolectric:4.4.1'
}
greendao{
schemaVersion 1
//generateTests true
// targetGenDir "src/db/"
}
//The first is for the conflict of common apache libraries between moquette and VirusTotalApi
//The second one is for the conflict with an older version of deprecated slf4j
configurations {
all*.exclude group: 'commons-codec', module: 'commons-codec'
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
android {
compileSdkVersion 29
defaultConfig {
versionCode 11
versionName "2.3.4"
minSdkVersion 24
targetSdkVersion 29
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
// signingConfig signingConfigs.config
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
dexOptions {
incremental true
preDexLibraries = false
javaMaxHeapSize "4g"
}
sourceSets {
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default hostage.location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
packagingOptions {
pickFirst "META-INF/DEPENDENCIES"
pickFirst "META-INF/INDEX.LIST"
pickFirst "META-INF/io.netty.versions.properties"
}
// signing for release only works in the console
boolean doSigningForRelease = System.console() != null
if (doSigningForRelease) {
signingConfigs {
release {
storeFile file(System.console().readLine("\n\$ Enter keystore path: "))
storePassword System.console().readLine("\n\$ Enter keystore password: ")
keyAlias System.console().readLine("\n\$ Enter key alias: ")
keyPassword System.console().readLine("\n\$ Enter key password:")
}
}
}
buildTypes {
debug {
debuggable true
jniDebuggable true
// testCoverageEnabled true
//resValue "string", "google_maps_api_key", "AIzaSyDs3xp1-2KQojns5h7mWHHdQxAL-5AZ-q4"
}
if (doSigningForRelease) {
release {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
//resValue "string", "google_maps_api_key", "AIzaSyDs3xp1-2KQojns5h7mWHHdQxAL-5AZ-q4"
}
}
release {
// signingConfig signingConfigs.config
}
}
lintOptions {
abortOnError false
}
productFlavors {
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}