build.gradle 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. }
  55. }
  56. apply from: 'capacitor.build.gradle'
  57. try {
  58. def servicesJSON = file('google-services.json')
  59. if (servicesJSON.text) {
  60. apply plugin: 'com.google.gms.google-services'
  61. }
  62. } catch (Exception e) {
  63. logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  64. }