apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'com.google.gms.google-services' // Apply the Crashlytics Gradle plugin apply plugin: 'com.google.firebase.crashlytics' // protobuf apply plugin: 'com.google.protobuf' android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.geeksville.mesh" minSdkVersion 22 // The oldest emulator image I have tried is 22 (though 21 probably works) targetSdkVersion 29 versionCode 102 versionName "0.1.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } buildFeatures { // Enables Jetpack Compose for this module compose true // NOTE, if true main app crashes if you use regular view layout functions } // 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" } composeOptions { kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129" kotlinCompilerExtensionVersion "0.1.0-dev06" } } androidExtensions { experimental = true } // 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 { // turned off for now so I can use json printing option "lite" } } } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.2.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.google.android.material:material:1.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' // You need to depend on the lite runtime library, not protobuf-java // For now I'm not using javalite, because I want JSON printing //implementation 'com.google.protobuf:protobuf-java:3.11.1' //implementation 'com.google.protobuf:protobuf-java-util:3.11.1' implementation 'com.google.protobuf:protobuf-javalite:3.11.1' // You also need to include the following Compose toolkit dependencies. implementation("androidx.compose:compose-runtime:$compose_version") implementation("androidx.ui:ui-graphics:$compose_version") implementation("androidx.ui:ui-layout:$compose_version") implementation("androidx.ui:ui-material:$compose_version") implementation("androidx.ui:ui-unit:$compose_version") implementation("androidx.ui:ui-util:$compose_version") implementation "androidx.ui:ui-tooling:$compose_version" androidTestImplementation("androidx.ui:ui-platform:$compose_version") androidTestImplementation("androidx.ui:ui-test:$compose_version") // location services implementation 'com.google.android.gms:play-services-location:17.0.0' // For Google Sign-In (owner name accesss) implementation 'com.google.android.gms:play-services-auth:17.0.0' // Add the Firebase SDK for Crashlytics. implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01' // 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" // add SDKs for any other desired Firebase products // https://firebase.google.com/docs/android/setup#available-libraries // barcode support // implementation('com.google.zxing:core:3.4.0') implementation('com.journeyapps:zxing-android-embedded:3.6.0') implementation project(':geeksville-androidlib') }