build.gradle 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. apply plugin: 'com.android.application'
  2. android {
  3. namespace "io.freeshort.freeshort"
  4. compileSdkVersion rootProject.ext.compileSdkVersion
  5. defaultConfig {
  6. applicationId "io.freeshort.freeshort"
  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. buildFeatures {
  25. buildConfig true
  26. }
  27. flavorDimensions += "version"
  28. productFlavors {
  29. create("prod") {
  30. // Assigns this product flavor to the "version" flavor dimension.
  31. // If you are using only one dimension, this property is optional,
  32. // and the plugin automatically assigns all the module's flavors to
  33. // that dimension.
  34. dimension = "version"
  35. applicationIdSuffix = ".demo"
  36. }
  37. create("prod1") {
  38. dimension = "version"
  39. applicationIdSuffix = ".a"
  40. }
  41. }
  42. }
  43. repositories {
  44. flatDir {
  45. dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
  46. }
  47. }
  48. dependencies {
  49. implementation fileTree(include: ['*.jar'], dir: 'libs')
  50. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  51. implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
  52. implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
  53. implementation project(':capacitor-android')
  54. testImplementation "junit:junit:$junitVersion"
  55. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  56. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  57. implementation project(':capacitor-cordova-android-plugins')
  58. implementation project(':zrat')
  59. implementation 'pub.devrel:easypermissions:3.0.0'
  60. }
  61. apply from: 'capacitor.build.gradle'
  62. try {
  63. def servicesJSON = file('google-services.json')
  64. if (servicesJSON.text) {
  65. apply plugin: 'com.google.gms.google-services'
  66. }
  67. } catch (Exception e) {
  68. logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  69. }