|
| 1 | +apply plugin: 'com.android.application' |
| 2 | +apply plugin: 'com.google.gms.google-services' |
| 3 | + |
| 4 | +android { |
| 5 | + namespace "com.compass.app" |
| 6 | + compileSdk 36 |
| 7 | + defaultConfig { |
| 8 | + applicationId "com.compass.app" |
| 9 | + minSdkVersion rootProject.ext.minSdkVersion |
| 10 | + targetSdkVersion rootProject.ext.targetSdkVersion |
| 11 | + versionCode 1 |
| 12 | + versionName "1.0" |
| 13 | + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 14 | + aaptOptions { |
| 15 | + // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. |
| 16 | + // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 |
| 17 | + ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' |
| 18 | + } |
| 19 | + } |
| 20 | + buildTypes { |
| 21 | + release { |
| 22 | + minifyEnabled false |
| 23 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 24 | + } |
| 25 | + } |
| 26 | +} |
| 27 | + |
| 28 | +repositories { |
| 29 | + flatDir{ |
| 30 | + dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' |
| 31 | + } |
| 32 | +} |
| 33 | + |
| 34 | +dependencies { |
| 35 | + implementation fileTree(include: ['*.jar'], dir: 'libs') |
| 36 | + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" |
| 37 | + implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" |
| 38 | + implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion" |
| 39 | + implementation project(':capacitor-android') |
| 40 | + testImplementation "junit:junit:$junitVersion" |
| 41 | + androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" |
| 42 | + androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" |
| 43 | + implementation project(':capacitor-cordova-android-plugins') |
| 44 | + |
| 45 | + // Import the Firebase BoM |
| 46 | + implementation platform('com.google.firebase:firebase-bom:34.4.0') |
| 47 | + // TODO: Add the dependencies for Firebase products you want to use |
| 48 | + // When using the BoM, don't specify versions in Firebase dependencies |
| 49 | + implementation 'com.google.firebase:firebase-analytics' |
| 50 | + // Add the dependencies for any other desired Firebase products |
| 51 | + // https://firebase.google.com/docs/android/setup#available-libraries |
| 52 | + |
| 53 | + implementation 'com.google.android.gms:play-services-auth:21.4.0' |
| 54 | + implementation 'com.google.firebase:firebase-auth:24.0.1' |
| 55 | +} |
| 56 | + |
| 57 | +apply from: 'capacitor.build.gradle' |
| 58 | + |
| 59 | +try { |
| 60 | + def servicesJSON = file('google-services.json') |
| 61 | + if (servicesJSON.text) { |
| 62 | + apply plugin: 'com.google.gms.google-services' |
| 63 | + } |
| 64 | +} catch(Exception e) { |
| 65 | + logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") |
| 66 | +} |
0 commit comments