| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | apply plugin: 'com.android.application' | 
					
						
							|  |  |  | apply plugin: 'kotlin-android' | 
					
						
							| 
									
										
										
										
											2020-12-07 12:33:29 +00:00
										 |  |  | apply plugin: 'kotlin-parcelize' | 
					
						
							| 
									
										
										
										
											2020-04-20 00:25:20 +00:00
										 |  |  | apply plugin: 'kotlinx-serialization' | 
					
						
							| 
									
										
										
										
											2022-02-08 21:50:21 +00:00
										 |  |  | apply plugin: 'dagger.hilt.android.plugin' | 
					
						
							| 
									
										
										
										
											2020-01-22 17:28:59 +00:00
										 |  |  | apply plugin: 'com.google.gms.google-services' | 
					
						
							| 
									
										
										
										
											2020-07-20 19:07:55 +00:00
										 |  |  | apply plugin: 'com.github.triplet.play' | 
					
						
							| 
									
										
										
										
											2021-03-19 09:42:26 +00:00
										 |  |  | apply plugin: 'de.mobilej.unmock' | 
					
						
							| 
									
										
										
										
											2020-07-20 19:07:55 +00:00
										 |  |  | // apply plugin: "app.brant.amazonappstorepublisher"
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-22 21:40:57 +00:00
										 |  |  | // Apply the Crashlytics Gradle plugin
 | 
					
						
							|  |  |  | apply plugin: 'com.google.firebase.crashlytics' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-23 02:32:21 +00:00
										 |  |  | // protobuf
 | 
					
						
							|  |  |  | apply plugin: 'com.google.protobuf' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-24 02:47:45 +00:00
										 |  |  | apply plugin: 'kotlin-kapt' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-19 09:42:26 +00:00
										 |  |  | unMock { | 
					
						
							|  |  |  |     keep "android.net.Uri" | 
					
						
							|  |  |  |     keep "android.util.Base64" | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-09 17:53:33 +00:00
										 |  |  | def keystorePropertiesFile = rootProject.file("keystore.properties") | 
					
						
							|  |  |  | def keystoreProperties = new Properties() | 
					
						
							|  |  |  | if (keystorePropertiesFile.exists()) { | 
					
						
							|  |  |  |     keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | android { | 
					
						
							| 
									
										
										
										
											2020-07-20 19:07:55 +00:00
										 |  |  |     signingConfigs { | 
					
						
							|  |  |  |         release { | 
					
						
							| 
									
										
										
										
											2021-12-09 17:53:33 +00:00
										 |  |  |             keyAlias keystoreProperties['keyAlias'] | 
					
						
							|  |  |  |             keyPassword keystoreProperties['keyPassword'] | 
					
						
							|  |  |  |             storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null | 
					
						
							|  |  |  |             storePassword keystoreProperties['storePassword'] | 
					
						
							| 
									
										
										
										
											2020-07-20 19:07:55 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2021-12-09 17:53:33 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-11-17 01:36:02 +00:00
										 |  |  |     compileSdkVersion 31 | 
					
						
							| 
									
										
										
										
											2021-01-03 02:29:40 +00:00
										 |  |  |     // leave undefined to use version plugin wants
 | 
					
						
							|  |  |  |     // buildToolsVersion "30.0.2" // Note: 30.0.2 doesn't yet work on Github actions CI
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |     defaultConfig { | 
					
						
							| 
									
										
										
										
											2020-01-23 05:46:41 +00:00
										 |  |  |         applicationId "com.geeksville.mesh" | 
					
						
							| 
									
										
										
										
											2020-06-11 00:13:26 +00:00
										 |  |  |         minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
 | 
					
						
							| 
									
										
										
										
											2021-06-10 16:29:14 +00:00
										 |  |  |         targetSdkVersion 30 // 30 can't work until an explicit location permissions dialog is added
 | 
					
						
							| 
									
										
										
										
											2022-03-08 13:16:22 +00:00
										 |  |  |         versionCode 20303 // format is Mmmss (where M is 1+the numeric major number
 | 
					
						
							|  |  |  |         versionName "1.3.3" | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 
					
						
							| 
									
										
										
										
											2021-01-30 06:44:55 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         // per https://developer.android.com/studio/write/vector-asset-studio
 | 
					
						
							|  |  |  |         vectorDrawables.useSupportLibrary = true | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  |     buildTypes { | 
					
						
							|  |  |  |         release { | 
					
						
							| 
									
										
										
										
											2021-12-09 17:53:33 +00:00
										 |  |  |             if (keystoreProperties['storeFile']) { | 
					
						
							|  |  |  |                 signingConfig signingConfigs.release | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2020-04-14 00:01:29 +00:00
										 |  |  |             minifyEnabled true | 
					
						
							|  |  |  |             shrinkResources true | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-04-11 00:25:55 +00:00
										 |  |  |         debug { | 
					
						
							|  |  |  |             pseudoLocalesEnabled true | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-01-22 03:16:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-11 17:21:26 +00:00
										 |  |  |     defaultConfig { | 
					
						
							|  |  |  |         // We have to list all translated languages here, because some of our libs have bogus languages that google play
 | 
					
						
							|  |  |  |         // doesn't like and we need to strip them (gr)
 | 
					
						
							| 
									
										
										
										
											2021-07-28 02:42:54 +00:00
										 |  |  |         resConfigs "cs", "de", "el", "en", "es", "fi", "fr", "ga", "ht", "it", "ja", "ko", "nl", "no", "pl", "pt", "pt-rBR", "ro", "ru", "sk", "sl", "sq", "sv", "tr", "zh" | 
					
						
							| 
									
										
										
										
											2020-04-11 20:20:30 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         // Needed to make mapbox work inside the firebase testlab - FIXME, alas, still doesn't work
 | 
					
						
							|  |  |  |         ndk { | 
					
						
							|  |  |  |             // abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
 | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-04-11 17:21:26 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-22 03:16:03 +00:00
										 |  |  |     buildFeatures { | 
					
						
							| 
									
										
										
										
											2020-12-07 12:33:29 +00:00
										 |  |  |         viewBinding true | 
					
						
							| 
									
										
										
										
											2020-01-22 03:16:03 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // Set both the Java and Kotlin compilers to target Java 8.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     compileOptions { | 
					
						
							|  |  |  |         sourceCompatibility JavaVersion.VERSION_1_8 | 
					
						
							|  |  |  |         targetCompatibility JavaVersion.VERSION_1_8 | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     kotlinOptions { | 
					
						
							|  |  |  |         jvmTarget = "1.8" | 
					
						
							| 
									
										
										
										
											2022-04-08 18:34:44 +00:00
										 |  |  |         freeCompilerArgs += [ '-Xopt-in=kotlin.RequiresOptIn' ] | 
					
						
							| 
									
										
										
										
											2020-01-22 03:16:03 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2022-02-01 01:01:33 +00:00
										 |  |  |     lint { | 
					
						
							| 
									
										
										
										
											2021-02-21 02:59:51 +00:00
										 |  |  |         abortOnError false | 
					
						
							| 
									
										
										
										
											2020-02-10 15:40:45 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2022-02-01 01:01:33 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-20 19:07:55 +00:00
										 |  |  | play { | 
					
						
							|  |  |  |     // configure per https://github.com/Triple-T/gradle-play-publisher#authenticating-gradle-play-publisher
 | 
					
						
							|  |  |  |     track = 'internal' | 
					
						
							|  |  |  |     defaultToAppBundles = true | 
					
						
							|  |  |  |     serviceAccountCredentials = file("../../play-credentials.json") | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-02-09 15:28:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-23 02:32:21 +00:00
										 |  |  | // per protobuf-gradle-plugin docs, this is recommended for android
 | 
					
						
							|  |  |  | protobuf { | 
					
						
							|  |  |  |     protoc { | 
					
						
							| 
									
										
										
										
											2021-02-27 01:49:25 +00:00
										 |  |  |         artifact = 'com.google.protobuf:protoc:3.15.3' | 
					
						
							| 
									
										
										
										
											2020-01-23 02:32:21 +00:00
										 |  |  |     } | 
					
						
							|  |  |  |     generateProtoTasks { | 
					
						
							|  |  |  |         all().each { task -> | 
					
						
							|  |  |  |             task.builtins { | 
					
						
							|  |  |  |                 java { | 
					
						
							| 
									
										
										
										
											2020-10-01 20:59:34 +00:00
										 |  |  |                     // turned off for now so I can use json printing in debug panel
 | 
					
						
							| 
									
										
										
										
											2020-05-11 04:39:59 +00:00
										 |  |  |                     // use the smaller android version of the library
 | 
					
						
							| 
									
										
										
										
											2020-10-01 20:59:34 +00:00
										 |  |  |                     //option "lite"
 | 
					
						
							| 
									
										
										
										
											2020-01-23 02:32:21 +00:00
										 |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | dependencies { | 
					
						
							| 
									
										
										
										
											2020-09-24 02:47:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |     implementation fileTree(dir: 'libs', include: ['*.jar']) | 
					
						
							| 
									
										
										
										
											2022-01-26 20:34:46 +00:00
										 |  |  |     implementation 'androidx.appcompat:appcompat:1.4.1' | 
					
						
							| 
									
										
										
										
											2021-11-17 01:36:02 +00:00
										 |  |  |     implementation 'androidx.core:core-ktx:1.7.0' | 
					
						
							| 
									
										
										
										
											2022-02-10 01:48:59 +00:00
										 |  |  |     implementation 'androidx.fragment:fragment-ktx:1.4.1' | 
					
						
							| 
									
										
										
										
											2020-04-08 22:25:57 +00:00
										 |  |  |     implementation 'androidx.cardview:cardview:1.0.0' | 
					
						
							| 
									
										
										
										
											2021-06-10 16:29:14 +00:00
										 |  |  |     implementation 'androidx.recyclerview:recyclerview:1.2.1' | 
					
						
							| 
									
										
										
										
											2022-01-26 20:34:46 +00:00
										 |  |  |     implementation 'androidx.constraintlayout:constraintlayout:2.1.3' | 
					
						
							|  |  |  |     implementation 'com.google.android.material:material:1.5.0' | 
					
						
							| 
									
										
										
										
											2020-04-07 16:36:12 +00:00
										 |  |  |     implementation 'androidx.viewpager2:viewpager2:1.0.0' | 
					
						
							| 
									
										
										
										
											2020-04-15 14:49:39 +00:00
										 |  |  |     implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' | 
					
						
							| 
									
										
										
										
											2022-03-08 13:12:59 +00:00
										 |  |  |     implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1' | 
					
						
							| 
									
										
										
										
											2020-09-24 02:47:45 +00:00
										 |  |  |     implementation "androidx.room:room-runtime:$room_version" | 
					
						
							| 
									
										
										
										
											2022-02-08 21:50:21 +00:00
										 |  |  |     implementation "com.google.dagger:hilt-android:$hilt_version" | 
					
						
							| 
									
										
										
										
											2020-09-24 02:47:45 +00:00
										 |  |  |     kapt "androidx.room:room-compiler:$room_version" | 
					
						
							| 
									
										
										
										
											2022-02-08 21:50:21 +00:00
										 |  |  |     kapt "com.google.dagger:hilt-compiler:$hilt_version" | 
					
						
							| 
									
										
										
										
											2020-09-24 02:47:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // optional - Kotlin Extensions and Coroutines support for Room
 | 
					
						
							|  |  |  |     implementation "androidx.room:room-ktx:$room_version" | 
					
						
							| 
									
										
										
										
											2020-08-24 20:28:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-24 02:47:45 +00:00
										 |  |  |     // optional - Test helpers
 | 
					
						
							|  |  |  |     testImplementation "androidx.room:room-testing:$room_version" | 
					
						
							| 
									
										
										
										
											2021-03-02 06:19:44 +00:00
										 |  |  |     testImplementation 'junit:junit:4.13.2' | 
					
						
							| 
									
										
										
										
											2021-07-26 16:30:02 +00:00
										 |  |  |     androidTestImplementation 'androidx.test.ext:junit:1.1.3' | 
					
						
							|  |  |  |     androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | 
					
						
							| 
									
										
										
										
											2020-01-22 03:16:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-20 00:25:20 +00:00
										 |  |  |     // kotlin serialization
 | 
					
						
							| 
									
										
										
										
											2020-08-18 18:25:16 +00:00
										 |  |  |     implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc" | 
					
						
							| 
									
										
										
										
											2020-04-20 00:25:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-11 16:39:34 +00:00
										 |  |  |     // rate this app
 | 
					
						
							|  |  |  |     implementation "com.vorlonsoft:androidrate:1.2.1" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-04 21:37:44 +00:00
										 |  |  |     // Coroutines
 | 
					
						
							|  |  |  |     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" | 
					
						
							|  |  |  |     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-25 04:35:42 +00:00
										 |  |  |     // For now I'm not using javalite, because I want JSON printing
 | 
					
						
							| 
									
										
										
										
											2022-03-08 13:12:59 +00:00
										 |  |  |     implementation 'com.google.protobuf:protobuf-java:3.15.8' | 
					
						
							| 
									
										
										
										
											2020-03-12 01:13:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-05 18:53:50 +00:00
										 |  |  |     // For UART access
 | 
					
						
							| 
									
										
										
										
											2020-06-06 03:22:45 +00:00
										 |  |  |     // implementation 'com.google.android.things:androidthings:1.0'
 | 
					
						
							| 
									
										
										
										
											2022-02-05 02:58:00 +00:00
										 |  |  |     implementation 'com.github.mik3y:usb-serial-for-android:3.4.3' | 
					
						
							| 
									
										
										
										
											2020-06-05 18:53:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-11 21:45:49 +00:00
										 |  |  |     // mapbox
 | 
					
						
							| 
									
										
										
										
											2022-03-08 13:12:59 +00:00
										 |  |  |     implementation 'com.mapbox.maps:android:10.2.0' | 
					
						
							| 
									
										
										
										
											2020-01-23 02:32:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-20 03:34:45 +00:00
										 |  |  |     // mapbox specifies a really old version of okhttp3 which causes lots of API warnings.  trying a newer version
 | 
					
						
							| 
									
										
										
										
											2020-09-21 03:40:15 +00:00
										 |  |  |     implementation 'com.squareup.okhttp3:okhttp:4.9.0' | 
					
						
							| 
									
										
										
										
											2020-04-20 03:34:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-16 22:22:24 +00:00
										 |  |  |     // location services
 | 
					
						
							| 
									
										
										
										
											2022-01-26 20:34:46 +00:00
										 |  |  |     implementation 'com.google.android.gms:play-services-location:19.0.1' | 
					
						
							| 
									
										
										
										
											2020-02-16 22:22:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-14 15:47:20 +00:00
										 |  |  |     // For Google Sign-In (owner name accesss)
 | 
					
						
							| 
									
										
										
										
											2022-02-10 01:48:59 +00:00
										 |  |  |     implementation 'com.google.android.gms:play-services-auth:20.1.0' | 
					
						
							| 
									
										
										
										
											2020-02-14 15:47:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-22 21:40:57 +00:00
										 |  |  |     // Add the Firebase SDK for Crashlytics.
 | 
					
						
							| 
									
										
										
										
											2021-12-15 15:42:12 +00:00
										 |  |  |     implementation 'com.google.firebase:firebase-crashlytics:18.2.6' | 
					
						
							| 
									
										
										
										
											2020-01-22 17:28:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-24 07:05:15 +00:00
										 |  |  |     // alas implementation bug deep in the bowels when I tried it for my SyncBluetoothDevice class
 | 
					
						
							|  |  |  |     // implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3"
 | 
					
						
							| 
									
										
										
										
											2020-01-24 05:58:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-22 17:28:59 +00:00
										 |  |  |     // add SDKs for any other desired Firebase products
 | 
					
						
							|  |  |  |     // https://firebase.google.com/docs/android/setup#available-libraries
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-02 15:46:03 +00:00
										 |  |  |     // barcode support
 | 
					
						
							| 
									
										
										
										
											2022-01-10 03:33:26 +00:00
										 |  |  |     // per https://github.com/journeyapps/zxing-android-embedded#older-sdk-versions for minSdkVersion 21
 | 
					
						
							|  |  |  |     implementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false } | 
					
						
							| 
									
										
										
										
											2022-02-10 01:48:59 +00:00
										 |  |  |     //noinspection GradleDependency
 | 
					
						
							| 
									
										
										
										
											2022-01-10 03:33:26 +00:00
										 |  |  |     implementation 'com.google.zxing:core:3.3.0' // <-- don't update
 | 
					
						
							| 
									
										
										
										
											2020-03-02 15:46:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-27 02:25:38 +00:00
										 |  |  |     def work_version = '2.7.1' | 
					
						
							| 
									
										
										
										
											2020-05-11 20:12:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Work Request - used to delay boot event handling
 | 
					
						
							|  |  |  |     // implementation "androidx.work:work-runtime:$work_version"
 | 
					
						
							|  |  |  |     implementation "androidx.work:work-runtime-ktx:$work_version" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-04 03:57:27 +00:00
										 |  |  |     implementation "androidx.core:core-splashscreen:1.0.0-beta01" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-22 04:32:19 +00:00
										 |  |  |     implementation project(':geeksville-androidlib') | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2022-02-08 21:50:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | kapt { | 
					
						
							|  |  |  |     correctErrorTypes true | 
					
						
							|  |  |  | } |