| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | apply plugin: 'com.android.application' | 
					
						
							|  |  |  | apply plugin: 'kotlin-android' | 
					
						
							|  |  |  | apply plugin: 'kotlin-android-extensions' | 
					
						
							| 
									
										
										
										
											2020-04-20 00:25:20 +00:00
										 |  |  | apply plugin: 'kotlinx-serialization' | 
					
						
							| 
									
										
										
										
											2020-01-22 17:28:59 +00:00
										 |  |  | apply plugin: 'com.google.gms.google-services' | 
					
						
							| 
									
										
										
										
											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-01-20 23:53:22 +00:00
										 |  |  | android { | 
					
						
							|  |  |  |     compileSdkVersion 29 | 
					
						
							| 
									
										
										
										
											2020-04-12 23:19:01 +00:00
										 |  |  |     buildToolsVersion "29.0.3" | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |     defaultConfig { | 
					
						
							| 
									
										
										
										
											2020-01-23 05:46:41 +00:00
										 |  |  |         applicationId "com.geeksville.mesh" | 
					
						
							| 
									
										
										
										
											2020-02-14 15:47:20 +00:00
										 |  |  |         minSdkVersion 22 // The oldest emulator image I have tried is 22 (though 21 probably works)
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |         targetSdkVersion 29 | 
					
						
							| 
									
										
										
										
											2020-05-05 18:00:06 +00:00
										 |  |  |         versionCode 162 | 
					
						
							| 
									
										
										
										
											2020-05-05 03:14:01 +00:00
										 |  |  |         versionName "0.6.2" | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  |         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     buildTypes { | 
					
						
							|  |  |  |         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)
 | 
					
						
							| 
									
										
										
										
											2020-04-11 20:42:12 +00:00
										 |  |  |         resConfigs "en", "de", "es", "fi", "fr", "ga", "it", "nl", "ru", "sv", "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 { | 
					
						
							|  |  |  |         // Enables Jetpack Compose for this module
 | 
					
						
							| 
									
										
										
										
											2020-04-08 16:53:04 +00:00
										 |  |  |         // compose true // NOTE, if true main app crashes if you use regular view layout functions
 | 
					
						
							| 
									
										
										
										
											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" | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-02-10 15:40:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     composeOptions { | 
					
						
							| 
									
										
										
										
											2020-04-08 16:53:04 +00:00
										 |  |  |         //kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
 | 
					
						
							|  |  |  |         //kotlinCompilerExtensionVersion "$compose_version"
 | 
					
						
							| 
									
										
										
										
											2020-02-10 15:40:45 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-09 15:28:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-10 15:40:45 +00:00
										 |  |  | androidExtensions { | 
					
						
							|  |  |  |     experimental = true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-23 02:32:21 +00:00
										 |  |  | // per protobuf-gradle-plugin docs, this is recommended for android
 | 
					
						
							|  |  |  | protobuf { | 
					
						
							|  |  |  |     protoc { | 
					
						
							|  |  |  |         artifact = 'com.google.protobuf:protoc:3.9.0' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     generateProtoTasks { | 
					
						
							|  |  |  |         all().each { task -> | 
					
						
							|  |  |  |             task.builtins { | 
					
						
							|  |  |  |                 java { | 
					
						
							| 
									
										
										
										
											2020-01-25 04:35:42 +00:00
										 |  |  |                     // turned off for now so I can use json printing
 | 
					
						
							| 
									
										
										
										
											2020-02-05 00:06:33 +00:00
										 |  |  |                     option "lite" | 
					
						
							| 
									
										
										
										
											2020-01-23 02:32:21 +00:00
										 |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | dependencies { | 
					
						
							|  |  |  |     implementation fileTree(dir: 'libs', include: ['*.jar']) | 
					
						
							| 
									
										
										
										
											2020-04-07 16:36:12 +00:00
										 |  |  |     implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | 
					
						
							| 
									
										
										
										
											2020-01-21 00:13:40 +00:00
										 |  |  |     implementation 'androidx.appcompat:appcompat:1.1.0' | 
					
						
							| 
									
										
										
										
											2020-02-12 23:47:06 +00:00
										 |  |  |     implementation 'androidx.core:core-ktx:1.2.0' | 
					
						
							| 
									
										
										
										
											2020-04-08 00:42:31 +00:00
										 |  |  |     implementation "androidx.fragment:fragment-ktx:1.2.4" | 
					
						
							| 
									
										
										
										
											2020-04-08 22:25:57 +00:00
										 |  |  |     implementation 'androidx.cardview:cardview:1.0.0' | 
					
						
							|  |  |  |     implementation 'androidx.recyclerview:recyclerview:1.1.0' | 
					
						
							| 
									
										
										
										
											2020-05-10 04:20:02 +00:00
										 |  |  |     implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta5' | 
					
						
							| 
									
										
										
										
											2020-04-07 16:36:12 +00:00
										 |  |  |     implementation 'com.google.android.material:material:1.1.0' | 
					
						
							|  |  |  |     implementation 'androidx.viewpager2:viewpager2:1.0.0' | 
					
						
							| 
									
										
										
										
											2020-04-15 14:49:39 +00:00
										 |  |  |     implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' | 
					
						
							|  |  |  |     implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' | 
					
						
							| 
									
										
										
										
											2020-04-29 18:39:43 +00:00
										 |  |  |     testImplementation 'junit:junit:4.13' | 
					
						
							| 
									
										
										
										
											2020-01-21 00:13:40 +00:00
										 |  |  |     androidTestImplementation 'androidx.test.ext:junit:1.1.1' | 
					
						
							|  |  |  |     androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | 
					
						
							| 
									
										
										
										
											2020-01-22 03:16:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-20 00:25:20 +00:00
										 |  |  |     // kotlin serialization
 | 
					
						
							|  |  |  |     implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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-23 02:32:21 +00:00
										 |  |  |     // You need to depend on the lite runtime library, not protobuf-java
 | 
					
						
							| 
									
										
										
										
											2020-01-25 04:35:42 +00:00
										 |  |  |     // For now I'm not using javalite, because I want JSON printing
 | 
					
						
							| 
									
										
										
										
											2020-02-05 00:06:33 +00:00
										 |  |  |     //implementation 'com.google.protobuf:protobuf-java:3.11.1'
 | 
					
						
							|  |  |  |     //implementation 'com.google.protobuf:protobuf-java-util:3.11.1'
 | 
					
						
							| 
									
										
										
										
											2020-04-29 18:39:43 +00:00
										 |  |  |     implementation 'com.google.protobuf:protobuf-javalite:3.11.4' | 
					
						
							| 
									
										
										
										
											2020-03-12 01:13:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-11 21:45:49 +00:00
										 |  |  |     // mapbox
 | 
					
						
							| 
									
										
										
										
											2020-04-12 15:48:37 +00:00
										 |  |  |     implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.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-05-05 03:14:01 +00:00
										 |  |  |     implementation 'com.squareup.okhttp3:okhttp:4.6.0' | 
					
						
							| 
									
										
										
										
											2020-04-20 03:34:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-16 22:22:24 +00:00
										 |  |  |     // location services
 | 
					
						
							|  |  |  |     implementation 'com.google.android.gms:play-services-location:17.0.0' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-14 15:47:20 +00:00
										 |  |  |     // For Google Sign-In (owner name accesss)
 | 
					
						
							| 
									
										
										
										
											2020-04-15 14:49:39 +00:00
										 |  |  |     implementation 'com.google.android.gms:play-services-auth:18.0.0' | 
					
						
							| 
									
										
										
										
											2020-02-14 15:47:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-22 21:40:57 +00:00
										 |  |  |     // Add the Firebase SDK for Crashlytics.
 | 
					
						
							| 
									
										
										
										
											2020-04-29 18:39:43 +00:00
										 |  |  |     implementation 'com.google.firebase:firebase-crashlytics:17.0.0' | 
					
						
							| 
									
										
										
										
											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
 | 
					
						
							| 
									
										
										
										
											2020-04-12 23:11:16 +00:00
										 |  |  |     // per https://github.com/journeyapps/zxing-android-embedded for support of android version 22
 | 
					
						
							|  |  |  |     implementation('com.journeyapps:zxing-android-embedded:4.1.0') { transitive = false } | 
					
						
							| 
									
										
										
										
											2020-04-29 18:39:43 +00:00
										 |  |  |     implementation 'com.google.zxing:core:3.4.0' | 
					
						
							| 
									
										
										
										
											2020-03-02 15:46:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-22 04:32:19 +00:00
										 |  |  |     implementation project(':geeksville-androidlib') | 
					
						
							| 
									
										
										
										
											2020-01-20 23:53:22 +00:00
										 |  |  | } |