build.gradle 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. apply plugin: 'com.android.application'
  2. android {
  3. namespace "com.example.nexilissamplecodeionic"
  4. compileSdkVersion rootProject.ext.compileSdkVersion
  5. defaultConfig {
  6. applicationId "com.example.nexilissamplecodeionic"
  7. minSdkVersion rootProject.ext.minSdkVersion
  8. targetSdkVersion rootProject.ext.targetSdkVersion
  9. versionCode 1
  10. versionName "1.0"
  11. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  12. aaptOptions {
  13. // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
  14. // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
  15. ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
  16. }
  17. }
  18. buildTypes {
  19. release {
  20. minifyEnabled false
  21. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  22. }
  23. }
  24. packagingOptions {
  25. doNotStrip "*/armeabi-v7a/*.so"
  26. doNotStrip "*/arm64-v8a/*.so"
  27. exclude 'META-INF/DEPENDENCIES'
  28. exclude 'META-INF/LICENSE'
  29. exclude 'META-INF/LICENSE.txt'
  30. exclude 'META-INF/license.txt'
  31. exclude 'META-INF/NOTICE'
  32. exclude 'META-INF/NOTICE.txt'
  33. exclude 'META-INF/notice.txt'
  34. exclude 'META-INF/ASL2.0'
  35. }
  36. }
  37. repositories {
  38. flatDir {
  39. dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
  40. }
  41. }
  42. dependencies {
  43. implementation fileTree(include: ['*.jar'], dir: 'libs')
  44. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  45. implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
  46. implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
  47. implementation project(':capacitor-android')
  48. testImplementation "junit:junit:$junitVersion"
  49. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  50. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  51. implementation project(':capacitor-cordova-android-plugins')
  52. implementation('***REPLACE***WITH***NEXILIS***VERSION***LIBRARY***') {
  53. transitive = true
  54. exclude group: 'org.apache.httpcomponents'
  55. }
  56. }
  57. apply from: 'capacitor.build.gradle'
  58. try {
  59. def servicesJSON = file('google-services.json')
  60. if (servicesJSON.text) {
  61. apply plugin: 'com.google.gms.google-services'
  62. }
  63. } catch (Exception e) {
  64. logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  65. }