build.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. // *** Add Nexilis UI dependencies ***
  53. implementation('***REPLACE***WITH***NEXILIS***VERSION***LIBRARY***') {
  54. transitive = true
  55. exclude group: 'org.apache.httpcomponents'
  56. }
  57. // *** Add Nexilis UC dependencies ***
  58. implementation('***REPLACE***WITH***NEXILIS***UC***VERSION***LIBRARY***') {
  59. transitive = true
  60. exclude group: 'org.apache.httpcomponents'
  61. }
  62. // *** Add Nexilis SS dependencies ***
  63. implementation('***REPLACE***WITH***NEXILIS***SS***VERSION***LIBRARY***') {
  64. transitive = true
  65. exclude group: 'org.apache.httpcomponents'
  66. }
  67. }
  68. apply from: 'capacitor.build.gradle'
  69. try {
  70. def servicesJSON = file('google-services.json')
  71. if (servicesJSON.text) {
  72. apply plugin: 'com.google.gms.google-services'
  73. }
  74. } catch (Exception e) {
  75. logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  76. }