Spaces:
Sleeping
Sleeping
| apply plugin: 'com.android.application' | |
| android { | |
| namespace "com.sspl.app" | |
| compileSdk rootProject.ext.compileSdkVersion | |
| defaultConfig { | |
| applicationId "com.sspl.app" | |
| minSdkVersion rootProject.ext.minSdkVersion | |
| targetSdkVersion rootProject.ext.targetSdkVersion | |
| versionCode 1 | |
| versionName "1.0" | |
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
| aaptOptions { | |
| // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. | |
| // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 | |
| ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' | |
| } | |
| } | |
| signingConfigs { | |
| debug { | |
| storeFile file("${System.properties['user.home']}/.android/debug.keystore") | |
| storePassword "android" | |
| keyAlias "androiddebugkey" | |
| keyPassword "android" | |
| } | |
| release { | |
| def keystorePropertiesFile = rootProject.file("keystore.properties") | |
| def keystoreProperties = new Properties() | |
| // Load keystore properties if file exists | |
| if (keystorePropertiesFile.exists()) { | |
| keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | |
| storeFile file(keystoreProperties['storeFile']) | |
| storePassword keystoreProperties['storePassword'] | |
| keyAlias keystoreProperties['keyAlias'] | |
| keyPassword keystoreProperties['keyPassword'] | |
| } else { | |
| // Fallback to debug signing if properties file doesn't exist | |
| storeFile file("${System.properties['user.home']}/.android/debug.keystore") | |
| storePassword "android" | |
| keyAlias "androiddebugkey" | |
| keyPassword "android" | |
| logger.warn("Using debug signing for release build! Create a keystore.properties file for production signing.") | |
| } | |
| } | |
| } | |
| buildTypes { | |
| release { | |
| signingConfig signingConfigs.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 "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" | |
| implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" | |
| 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.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") | |
| } | |