Adds AppCenter config.

This commit is contained in:
2020-08-31 22:38:29 -07:00
parent c07eb7c74c
commit 44dd68eabc
2 changed files with 25 additions and 0 deletions

View File

@@ -1,3 +1,12 @@
Properties properties = new Properties()
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
properties.load(propertiesFile.newDataInputStream())
}
def appCenterLocalSecret = properties.getProperty('appCenter.localSecret')
def appCenterEnvSecret = System.getenv('APPCENTER_SECRET')
def appCenterSecret = appCenterLocalSecret != null ? appCenterLocalSecret : appCenterEnvSecret != null ? appCenterEnvSecret : ""
apply plugin: 'com.android.application'
android {
@@ -10,6 +19,7 @@ android {
targetSdkVersion 29
versionCode 1
versionName "1.0"
buildConfigField "String", "APPCENTER_SECRET", "\"${appCenterSecret}\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -23,6 +33,10 @@ android {
}
dependencies {
def appCenterSdkVersion = '3.3.0'
implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.0'