-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
528 lines (449 loc) · 20.4 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
/*
* DD-WRT Companion is a mobile app that lets you connect to,
* monitor and manage your DD-WRT routers on the go.
*
* Copyright (C) 2014-2022 Armel Soro
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact Info: Armel Soro <armel+router_companion@rm3l.org>
*/
import com.google.gms.googleservices.GoogleServicesPlugin
/**
* Gradle build file*/
buildscript {
repositories {
google()
// maven {
// url 'http://dl.bintray.com/amulyakhare/maven'
// allowInsecureProtocol = true
// }
mavenCentral()
}
dependencies {
//noinspection GradleDynamicVersion
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0'
// classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.0.0'
}
}
apply plugin: 'project-report'
apply plugin: 'com.android.application'
//apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
//apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'com.google.firebase.crashlytics'
//apply plugin: 'com.github.triplet.play'
//configurations.all {
// // Check for updates every build
// resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
//}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
signingConfigs {
release {
(keyAlias, storeFile, storePassword, keyPassword) = rootProject.getReleaseSigningConfig()
}
debug {
(keyAlias, storeFile, storePassword, keyPassword) = rootProject.getDebugSigningConfig()
}
}
compileSdkVersion android_sdk
// buildToolsVersion buildTools_version
// playConfigs {
// defaultAccountConfig {
// jsonFile = rootProject.getPlayStoreConfig()
// }
// }
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
//noinspection GroovyAssignabilityCheck
java.srcDirs = ['src/main/java']
//noinspection GroovyAssignabilityCheck
resources.srcDirs = ['src/main/res']
aidl.srcDirs = ['src/main/res']
renderscript.srcDirs = ['src/main/java']
res.srcDirs = ['src/main/res']
assets.srcDirs = ['src/main/assets']
}
main.java.srcDirs += 'src/main/kotlin'
// Move the tests to tests/java, tests/res, etc...
// instrumentTest.setRoot('src/androidTests')
// 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 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')
}
defaultConfig {
//FIXME Change applicationId for lite version
applicationId "org.rm3l.ddwrt"
testApplicationId "org.rm3l.ddwrt.tests"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion android_min_sdk
targetSdkVersion android_sdk
// Chooses the 'square' flavor from libraries that specify a 'shape'
// dimension.
// flavorSelection 'shape', 'square'
vectorDrawables.useSupportLibrary = true
// Enabling multidex support.
// multiDexEnabled true
// Fetch the version according to git latest tag and "how far are we from last tag"
(versionCode, versionName) = rootProject.getVersionCodeAndName("default")
printf("\n-------- VERSION DATA for '$project.name' --------" +
"\n" +
"- CODE: " +
versionCode +
"\n" +
"- NAME: " +
versionName +
"\n----------------------------\n")
rootProject.localProperties.each { key, val ->
resValue("string",
key.toUpperCase().replaceAll("\\.", "_").replaceAll("-", "_"),
val.toString())
}
// testInstrumentationRunner "android.support.multidex.MultiDexTestRunner"
// playConfig = playConfigs.defaultAccountConfig
}
packagingOptions {
jniLibs {
excludes += ['lib/**/libwizardroid.so']
}
resources {
excludes += ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt']
}
}
//Those files, from Apache Commons lib cause build errors
/**
* Flavors: this is because apps uploaded to Play Store will certainly be banned if
* they contain link to billing platforms other than Google*/
productFlavors {
dev {
dimension "mode"
//Disable 'Donations' menu item for Play Store app (it will certainly be a paid app)
buildConfigField "boolean", "DONATIONS", "false"
//PlayStore app will contain an In-App Billing (IAB) link to Google Play only
buildConfigField "boolean", "DONATIONS_GOOGLE", "false"
buildConfigField "boolean", "WITH_ADS", "false"
buildConfigField "boolean", "WITH_INTERSTITIAL_ADS", "false"
buildConfigField "boolean", "WITH_TASKER", "false"
}
google {
dimension "mode"
//Disable 'Donations' menu item for Play Store app (it will certainly be a paid app)
buildConfigField "boolean", "DONATIONS", "false"
//PlayStore app will contain an In-App Billing (IAB) link to Google Play only
buildConfigField "boolean", "DONATIONS_GOOGLE", "true"
buildConfigField "boolean", "WITH_ADS", "false"
buildConfigField "boolean", "WITH_INTERSTITIAL_ADS", "false"
buildConfigField "boolean", "WITH_TASKER", "true"
}
// For FOSS version only (no ads)
fdroid {
dimension "mode"
//Enable 'Donations' menu item
buildConfigField "boolean", "DONATIONS", "true"
//F-Droid (pure OSS) will contain links to Google Play IAB, Paypal, Flattr, and Bitcoin
buildConfigField "boolean", "DONATIONS_GOOGLE", "false"
buildConfigField "boolean", "WITH_ADS", "false"
buildConfigField "boolean", "WITH_INTERSTITIAL_ADS", "false"
buildConfigField "boolean", "WITH_TASKER", "false"
}
}
// dexOptions {
// incremental true
// javaMaxHeapSize "2048M"
// }
buildTypes {
release {
minifyEnabled true
proguardFiles 'proguard-rules-r8.pro'
signingConfig signingConfigs.release
zipAlignEnabled true
rootProject.localProperties.each { key, val ->
resValue("string",
key.toUpperCase().replaceAll("\\.", "_").replaceAll("-", "_"),
val.toString())
}
}
debug {
// Disable fabric build ID generation for debug builds
ext.enableCrashlytics = false
minifyEnabled true
proguardFiles 'proguard-rules-r8.pro'
zipAlignEnabled true
rootProject.localProperties.each { key, val ->
resValue("string",
key.toUpperCase().replaceAll("\\.", "_").replaceAll("-", "_"),
val.toString())
}
//Android-Debug-Database - not needed anymore as FB's Stetho superseedes this
// resValue("string", "PORT_NUMBER", "8080")
}
}
// Specifies the flavor dimensions you want to use. The order in which you
// list each dimension determines its priority, from highest to lowest,
// when Gradle merges variant sources and configurations. You must assign
// each product flavor you configure to one of the flavor dimensions.
flavorDimensions "mode"
buildFeatures {
// Determines whether to generate a BuildConfig class.
buildConfig = true
// Determines whether to support View Binding.
// View binding provides compile-time safety when referencing views in your code.
// You can now replace findViewById() with the auto-generated binding class reference
viewBinding = true
// Determines whether to support Data Binding.
// Note that the dataBinding.enabled property is now deprecated.
dataBinding = false
// Determines whether to generate binder classes for your AIDL files.
aidl = true
// Determines whether to support RenderScript.
renderScript = true
// Determines whether to support injecting custom variables into the module's R class.
resValues = true
// Determines whether to support shader AOT compilation.
shaders = true
}
lint {
abortOnError false
disable 'TypographyEllipsis'
}
namespace 'org.rm3l.ddwrt'
}
//Automate the way version name is built for each flavor
android.productFlavors.each {
flavor ->
def (versionCode, versionName) = rootProject.getVersionCodeAndName(flavor.name)
flavor.versionCode = versionCode
flavor.versionName = versionName
}
//Other external repositories, to be used besides jcenter
repositories {
// maven {
//Statically added in the libs folder, to avoid surprises with this repository suddenly becoming unavailable
// url "https://repository-achartengine.forge.cloudbees.com/snapshot/"
// }
//jcenter()
google()
mavenCentral()
// maven {
// url 'http://dl.bintray.com/igenius-code/maven'
// allowInsecureProtocol = true
// }
// maven {
// url 'http://dl.bintray.com/amulyakhare/maven'
// allowInsecureProtocol = true
// }
maven { url "https://s3.amazonaws.com/avocarrot-android-builds/dist/" }
}
/*
play {
serviceAccountEmail = '294046724212-r3bef6kl46pb9gk0h1pl5rcjmpfrdpjl@developer.gserviceaccount.com'
pk12File = file("${homePath}/src/583631bdd16d.p12")
track = 'beta'
}
*/
//Dependencies
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// implementation "androidx.core:core-ktx:$android_ktx_version"
// Anko Commons
// implementation "org.jetbrains.anko:anko-commons:$anko_version"
// Anko Layouts
// compile "org.jetbrains.anko:anko-sdk25:$anko_version" // sdk15, sdk19, sdk21, sdk23 are also available
// compile "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
// implementation "org.jetbrains.anko:anko-sdk25:$anko_version"
// implementation "org.jetbrains.anko:anko-sdk25-coroutines:$anko_version"
// implementation "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
// implementation "androidx.appcompat:appcompat:$androidx_appcompat_version"
testImplementation "junit:junit:$junit_version"
testImplementation "org.robolectric:robolectric:$robolectric_version"
androidTestImplementation "androidx.annotation:annotation:1.3.0"
testImplementation "org.mockito:mockito-core:$mockito_version"
implementation project(":libraries:parcelable")
implementation project(':common')
implementation fileTree(include: '*.jar', dir: 'libs')
implementation fileTree(include: '*.aar', dir: 'libs')
// implementation "com.mikepenz:aboutlibraries:10.2.0"
// implementation "com.mikepenz:aboutlibraries-core:$aboutLibraries_version"
implementation ("com.mikepenz:aboutlibraries:$aboutLibraries_version") {
exclude module: 'fastadapter'
}
implementation('com.mikepenz:materialdrawer:9.0.0@aar') {
transitive = true
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'animated-vector-drawable'
exclude group: 'com.android.support', module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-compat'
}
implementation platform('com.google.firebase:firebase-bom:30.1.0')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.guava:guava:31.1-android'
implementation 'commons-net:commons-net:3.8.0'
//WARNING: Test that changing JSCh versions do not produce unwanted side-effects, such as an inability to connect
implementation 'com.jcraft:jsch:0.1.55'
implementation 'com.google.code.gson:gson:2.9.0'
implementation "com.google.android.material:material:1.6.1"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.appcompat:appcompat:1.4.2"
// implementation "androidx.palette:palette:1.0.0"
implementation "androidx.browser:browser:1.4.0"
implementation "androidx.preference:preference:1.2.0"
// implementation "androidx.constraintlayout:constraintlayout:1.1.2"
// implementation 'com.cocosw:undobar:1.8.1@aar'
implementation 'com.google.zxing:core:3.5.0'
implementation 'com.github.curioustechizen.android-ago:library:1.4.0'
// implementation 'com.github.danielemaddaluno.androidupdatechecker:library:1.0.2'
// implementation 'com.google.android.gms:play-services-ads:11.4.0'
// implementation "com.google.android.gms:play-services-ads-lite:${playServices_version}" //only for distrib. via Play Store
// implementation "com.google.firebase:firebase-ads:${playServices_version}"
// //Avocarrot => acquired by Glispa => acquired by MobFox
// implementation "com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:${avocarrot_glispa_mobfox_version}"
//
//// implementation "com.avocarrot.sdk:mediation-sdk-banner:${avocarrot_glispa_version}"
//// implementation "com.avocarrot.sdk:mediation-sdk-interstitial:${avocarrot_glispa_version}"
//// implementation "com.avocarrot.sdk:mediation-sdk-nativead:${avocarrot_glispa_version}"
//// implementation "com.avocarrot.sdk:mediation-sdk-native-assets:${avocarrot_glispa_version}"
//// implementation "com.avocarrot.sdk:mediation-sdk-video:${avocarrot_glispa_version}"
implementation 'fr.nicolaspomepuy:discreetapprate:2.0.4@aar'
implementation 'com.squareup.picasso:picasso:2.71828'
// implementation 'com.github.halysongoncalves:pugnotification:1.8.1'
implementation 'org.osmdroid:osmdroid-android:6.1.13@aar'
implementation 'com.github.lzyzsd:circleprogress:1.2.1@aar'
// implementation 'mbanje.kurt:fabbutton:1.2.5@aar'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
// implementation "com.google.firebase:firebase-core:${firebase_core_version}"
implementation "com.google.firebase:firebase-appindexing:${firebase_appindexing_version}"
/*
* AirBnB DeepLinkDispatch
*/
implementation 'com.airbnb:deeplinkdispatch:4.1.0'
//FIXME To make the build compatible w/ Buck,
// classes generated by this APT have been manually copied to the source code.
//Remember to uncomment this when deep links are updated, then generate then copy the classes.
// kapt 'com.airbnb:deeplinkdispatch-processor:3.1.1'
implementation 'org.codepond:wizardroid:1.3.1'
//Otto EventBus
// implementation 'com.squareup:otto:1.3.8'
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3'
implementation("org.rm3l:maoni:${maoni_version}") {
transitive = true
//Needed because of https://github.com/rm3l/maoni/issues/294
exclude module: 'unspecified'
}
implementation("org.rm3l:maoni-doorbell:${maoni_version}") {
transitive = true
//Needed because of https://github.com/rm3l/maoni/issues/294
exclude module: 'unspecified'
}
//LeakCanary - to detect memory leaks (only in debug flavor)
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
androidTestImplementation "com.squareup.leakcanary:leakcanary-android-instrumentation:${leakCanaryVersion}"
debugImplementation 'com.facebook.stetho:stetho:1.6.0'
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.6.0'
releaseImplementation "net.igenius:stetho-no-op:1.1"
testImplementation "net.igenius:stetho-no-op:1.1"
// implementation 'io.reactivex:rxandroid:1.2.0'
// implementation 'io.reactivex:rxjava:1.1.5'
implementation 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.amazonaws:aws-android-sdk-core:2.47.0'
implementation 'com.amazonaws:aws-android-sdk-s3:2.47.0'
implementation('com.stephentuso:welcome:1.4.1') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'preference-v7'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'support-annotations'
}
// use the latest 1.x version
implementation('org.wordpress:passcodelock:1.2.0') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
// implementation 'com.google.firebase:firebase-messaging:11.4.2'
//Stetho already does the same
// debugImplementation 'com.amitshekhar.android:debug-db:1.0.0'
// implementation 'com.facebook.device.yearclass:yearclass:2.0.0'
// implementation('io.hypertrack:smart-scheduler:0.0.2') {
// exclude group: 'com.android.support', module: 'appcompat-v7'
// exclude group: 'com.google.android.gms', module: 'play-services-gcm'
// }
//Allows to expose the app SharedPreferences from within the app itself
// implementation 'com.sloydev:preferator:1.0.0'
//Chuck: in-app HTTP inspector for OkHttp
debugImplementation('com.readystatesoftware.chuck:library:1.1.0') {
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'support-v4'
}
releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
debugImplementation "com.github.nekocode.ResourceInspector:resinspector:0.5.3"
releaseImplementation "com.github.nekocode.ResourceInspector:resinspector-no-op:0.5.3"
testImplementation "com.github.nekocode.ResourceInspector:resinspector-no-op:0.5.3"
implementation 'com.evernote:android-job:1.4.3'
// implementation "android.arch.work:work-runtime:$work_version"
implementation 'com.jakewharton.byteunits:byteunits:0.9.1'
implementation 'com.github.florent37:viewtooltip:1.2.2'
implementation 'com.github.mrgames13:SplashScreen:1.0.3'
implementation "com.karumi:dexter:${dexter_runtimePermissions_version}"
// implementation "com.yelp.android:varanus:2.0.5"
}
//play {
// // ...
// track = 'beta'
// untrackOld = true // will untrack 'alpha' while upload to 'beta'
//
// uploadImages = false
// errorOnSizeLimit = true
//}
////Add support for Kotlin co-routines
//kotlin {
// experimental {
// coroutines "enable"
// }
//}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
//kapt {
// javacOptions {
// // Generate doc for Deeplinks
// option("-AdeepLinkDoc.output=${buildDir}/doc/deeplinks.txt")
// }
//}
//Workaround from https://github.com/invertase/react-native-firebase/issues/1155#issuecomment-395944013
//GoogleServicesPlugin.config.disableVersionCheck = true