build.gradle 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion rootProject.ext.compileSdkVersion
  4. lintOptions {
  5. checkReleaseBuilds false
  6. abortOnError false
  7. }
  8. defaultConfig {
  9. applicationId "io.ionic.starter"
  10. minSdkVersion rootProject.ext.minSdkVersion
  11. targetSdkVersion rootProject.ext.targetSdkVersion
  12. versionCode 5
  13. versionName "5.0"
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. aaptOptions {
  16. // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
  17. // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
  18. ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
  19. }
  20. }
  21. buildTypes {
  22. release {
  23. minifyEnabled false
  24. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  25. }
  26. }
  27. }
  28. repositories {
  29. flatDir{
  30. dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
  31. }
  32. }
  33. dependencies {
  34. implementation fileTree(include: ['*.jar'], dir: 'libs')
  35. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  36. implementation project(':capacitor-android')
  37. testImplementation "junit:junit:$junitVersion"
  38. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  39. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  40. implementation project(':capacitor-cordova-android-plugins')
  41. }
  42. apply from: 'capacitor.build.gradle'
  43. try {
  44. def servicesJSON = file('google-services.json')
  45. if (servicesJSON.text) {
  46. apply plugin: 'com.google.gms.google-services'
  47. }
  48. } catch(Exception e) {
  49. logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  50. }