home-assistant-android/app/build.gradle
2019-12-03 23:28:46 +01:00

109 lines
3.5 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.firebase.appdistribution'
apply plugin: 'com.github.triplet.play'
apply plugin: 'de.mannodermaus.android-junit5'
apply plugin: 'io.fabric'
buildscript {
repositories {
google()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.google.firebase:firebase-appdistribution-gradle:1.1.0'
classpath 'com.github.triplet.gradle:play-publisher:2.5.0'
classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.5.2.0'
}
}
android {
compileSdkVersion projectSdkVersion.toInteger()
defaultConfig {
applicationId "io.homeassistant.companion.android"
minSdkVersion projectMinSdkVersion
targetSdkVersion 29
versionCode "${System.env.VERSION_CODE ?: 1}".toInteger()
versionName "${System.env.VERSION_NAME ?: "1.0.0"}"
}
firebaseAppDistribution {
serviceCredentialsFile = "firebaseAppDistributionServiceCredentialsFile.json"
releaseNotesFile = "CHANGES.md"
groups = "continuous-deployment"
}
signingConfigs {
release {
storeFile file('release_keystore.keystore')
storePassword "${System.env.KEYSTORE_PASSWORD ?: ""}"
keyAlias "$System.env.KEYSTORE_ALIAS" ?: ""
keyPassword "${System.env.KEYSTORE_ALIAS_PASSWORD ?: ""}"
v1SigningEnabled true
v2SigningEnabled true
}
}
buildTypes {
release {
debuggable false
jniDebuggable false
zipAlignEnabled true
signingConfig signingConfigs.release
}
}
testOptions {
unitTests.returnDefaultValues = true
junitPlatform {
filters {
engines {
include 'spek2'
}
}
}
}
}
play {
serviceAccountCredentials = file("playStorePublishServiceCredentialsFile.json")
}
dependencies {
implementation project(':common')
implementation project(':domain')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
implementation "com.google.dagger:dagger:${daggerVersion}"
kapt "com.google.dagger:dagger-compiler:${daggerVersion}"
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation 'com.google.android.material:material:1.0.0'
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutversion"
implementation("com.jakewharton.threetenabp:threetenabp:$threeTenAbpVersion") {
exclude group: 'org.threeten'
}
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation('com.lokalise.android:sdk:2.0.0-beta-2') { transitive = true }
implementation 'com.google.android.gms:play-services-location:17.0.0'
testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek2Version"
testImplementation "org.spekframework.spek2:spek-runner-junit5:$spek2Version"
testImplementation "org.assertj:assertj-core:$assertJVersion"
testImplementation "io.mockk:mockk:$mockkVersion"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion"
}
// This plugin must stay at the bottom
// https://developers.google.com/android/guides/google-services-plugin
apply plugin: 'com.google.gms.google-services'