build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ext {
  2. androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
  3. cordovaAndroidVersion = project.hasProperty('cordovaAndroidVersion') ? rootProject.ext.cordovaAndroidVersion : '10.1.1'
  4. }
  5. buildscript {
  6. repositories {
  7. google()
  8. mavenCentral()
  9. }
  10. dependencies {
  11. classpath 'com.android.tools.build:gradle:8.0.0'
  12. }
  13. }
  14. apply plugin: 'com.android.library'
  15. android {
  16. namespace "capacitor.cordova.android.plugins"
  17. compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
  18. defaultConfig {
  19. minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
  20. targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
  21. versionCode 1
  22. versionName "1.0"
  23. }
  24. lintOptions {
  25. abortOnError false
  26. }
  27. compileOptions {
  28. sourceCompatibility JavaVersion.VERSION_17
  29. targetCompatibility JavaVersion.VERSION_17
  30. }
  31. }
  32. repositories {
  33. google()
  34. mavenCentral()
  35. flatDir{
  36. dirs 'src/main/libs', 'libs'
  37. }
  38. }
  39. dependencies {
  40. implementation fileTree(dir: 'src/main/libs', include: ['*.jar'])
  41. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  42. implementation "org.apache.cordova:framework:$cordovaAndroidVersion"
  43. // SUB-PROJECT DEPENDENCIES START
  44. // SUB-PROJECT DEPENDENCIES END
  45. }
  46. // PLUGIN GRADLE EXTENSIONS START
  47. apply from: "cordova.variables.gradle"
  48. // PLUGIN GRADLE EXTENSIONS END
  49. for (def func : cdvPluginPostBuildExtras) {
  50. func()
  51. }