build.gradle 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. apply plugin: 'com.android.application'
  2. def keystorePropertiesFile = rootProject.file("key.properties")
  3. def keystoreProperties = new Properties()
  4. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  5. android {
  6. namespace = "br.com.serprati.associado"
  7. compileSdk = rootProject.ext.compileSdkVersion
  8. defaultConfig {
  9. applicationId "br.com.serprati.associado"
  10. minSdkVersion rootProject.ext.minSdkVersion
  11. targetSdkVersion rootProject.ext.targetSdkVersion
  12. versionCode 3
  13. versionName "1.0.2"
  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. signingConfigs {
  22. release {
  23. storeFile file(keystoreProperties['storeFile'])
  24. storePassword keystoreProperties['storePassword']
  25. keyAlias keystoreProperties['keyAlias']
  26. keyPassword keystoreProperties['keyPassword']
  27. }
  28. }
  29. buildTypes {
  30. release {
  31. signingConfig signingConfigs.release
  32. minifyEnabled false
  33. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  34. }
  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. }
  53. apply from: 'capacitor.build.gradle'
  54. try {
  55. def servicesJSON = file('google-services.json')
  56. if (servicesJSON.text) {
  57. apply plugin: 'com.google.gms.google-services'
  58. }
  59. } catch(Exception e) {
  60. logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  61. }