-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
364 lines (309 loc) · 14.3 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
/*
* 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 <[email protected]>
*/
import com.google.gms.googleservices.GoogleServicesPlugin
/**
* Gradle build file*/
buildscript {
repositories {
google()
mavenCentral()
// maven {
// url 'http://dl.bintray.com/amulyakhare/maven'
// allowInsecureProtocol = true
// }
}
dependencies {
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-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
//apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'com.google.firebase.crashlytics'
repositories {
//jcenter()
google()
mavenCentral()
}
//apply plugin: 'com.github.triplet.play'
android {
compileSdkVersion android_sdk
// buildToolsVersion buildTools_version
// playConfigs {
// defaultAccountConfig {
// jsonFile = rootProject.getPlayStoreConfig()
// }
// }
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()
}
}
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 {
applicationId "org.rm3l.ddwrt.tasker"
testApplicationId "org.rm3l.ddwrt.tasker.tests"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion android_min_sdk
targetSdkVersion android_sdk
// 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")
// For debugging, friendly print the version output to the Gradle console
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())
}
// playConfig = playConfigs.defaultAccountConfig
}
packagingOptions {
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"
// Enables pre-dexing for command line builds. When using
// Android Studio 2.3 or higher, the IDE enables pre-dexing
// when deploying your app to a device running Android 5.0
// (API level 21) or higher—regardless of what you set for
// minSdkVersion.
// cf. https://developer.android.com/studio/build/multidex
minSdkVersion android_min_sdk
//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"
}
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"
}
}
buildTypes {
// release {
// minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// }
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())
}
}
}
// 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"
// View binding provides compile-time safety when referencing views in your code.
// You can now replace findViewById() with the auto-generated binding class reference
buildFeatures.viewBinding = true
lint {
abortOnError false
disable 'TypographyEllipsis'
}
namespace 'org.rm3l.router_companion.tasker'
}
//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
}
dependencies {
implementation "androidx.multidex:multidex:$multidex_version"
// Intentionally, no Kotlin support to reduce the number of classes in resulting DEX
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// implementation "androidx.core:core-ktx:$android_ktx_version"
// implementation "org.jetbrains.anko:anko-sdk25:$anko_version"
// implementation "org.jetbrains.anko:anko-sdk25-listeners:$anko_version"
// implementation "org.jetbrains.anko:anko:$anko_version"
// Anko Commons
// implementation "org.jetbrains.anko:anko-commons:$anko_version"
// implementation "androidx.appcompat:appcompat:$androidx_appcompat_version"
testImplementation "junit:junit:$junit_version"
testImplementation "org.robolectric:robolectric:$robolectric_version"
// androidTestImplementation "androidx.annotation:annotations:1.0.0"
testImplementation "org.mockito:mockito-core:$mockito_version"
implementation project(":libraries:parcelable")
implementation project(':common')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:1.4.1"
implementation "com.google.android.material:material:1.7.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.preference:preference:1.2.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.annotation:annotation:1.3.0"
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'
}
// implementation 'com.mikepenz:aboutlibraries:10.2.0'
implementation "com.mikepenz:aboutlibraries:$aboutLibraries_version"
// implementation group: 'net.jcip', name: 'jcip-annotations', version: "1.0"
// implementation group: 'com.twofortyfouram', name: 'android-annotation', version: "[3.0.0,4.0["
// implementation group: 'com.twofortyfouram', name: 'android-assertion', version: "[2.0.0,3.0)"
implementation group: 'com.twofortyfouram', name: 'android-plugin-api-for-locale', version: "[1.0.2,2.0["
implementation group: 'com.twofortyfouram', name: 'android-plugin-client-sdk-for-locale', version: "[4.0.3, 5.0["
// implementation group: 'com.twofortyfouram', name: 'android-spackle', version: "[2.0.0,4.0["
// androidTestImplementation group:'com.twofortyfouram', name:'android-test', version:'[6.0.1,7.0)'
// androidTestImplementation group:'com.twofortyfouram', name:'android-assertion', version:'[2.0.0,3.0)'
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:30.1.0')
// Declare the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.google.guava:guava:31.1-android'
// implementation 'org.apache.commons:commons-lang3:3.5'
//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'
//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 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.amazonaws:aws-android-sdk-core:2.45.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'
}
implementation 'com.sothree.slidinguppanel:library:3.4.0'
// debugImplementation 'com.amitshekhar.android:debug-db:0.4.0'
// implementation 'com.facebook.device.yearclass:yearclass:2.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'
implementation "com.karumi:dexter:${dexter_runtimePermissions_version}"
}
//play {
// // ...
// track = 'beta'
// untrackOld = true // will untrack 'alpha' while upload to 'beta'
// uploadImages = false
// errorOnSizeLimit = true
//}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
//Workaround from https://github.com/invertase/react-native-firebase/issues/1155#issuecomment-395944013
//GoogleServicesPlugin.config.disableVersionCheck = true