46 lines
1.5 KiB
Groovy
46 lines
1.5 KiB
Groovy
|
apply plugin: 'com.android.application'
|
||
|
|
||
|
android {
|
||
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||
|
defaultConfig {
|
||
|
applicationId "io.ionic.starter"
|
||
|
minSdkVersion rootProject.ext.minSdkVersion
|
||
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||
|
versionCode 1
|
||
|
versionName "1.0"
|
||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
}
|
||
|
buildTypes {
|
||
|
release {
|
||
|
minifyEnabled false
|
||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
repositories {
|
||
|
flatDir{
|
||
|
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
||
|
implementation project(':capacitor-android')
|
||
|
testImplementation "junit:junit:$junitVersion"
|
||
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
||
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
||
|
implementation project(':capacitor-cordova-android-plugins')
|
||
|
}
|
||
|
|
||
|
apply from: 'capacitor.build.gradle'
|
||
|
|
||
|
try {
|
||
|
def servicesJSON = file('google-services.json')
|
||
|
if (servicesJSON.text) {
|
||
|
apply plugin: 'com.google.gms.google-services'
|
||
|
}
|
||
|
} catch(Exception e) {
|
||
|
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
||
|
}
|