Adds AppCenter config.
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user