build.gradle 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ext {
  2. junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
  3. androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
  4. androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
  5. androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
  6. }
  7. buildscript {
  8. ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.24'
  9. repositories {
  10. google()
  11. mavenCentral()
  12. }
  13. dependencies {
  14. classpath 'com.android.tools.build:gradle:8.7.1'
  15. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  16. }
  17. }
  18. apply plugin: 'com.android.library'
  19. apply plugin: 'kotlin-android'
  20. android {
  21. namespace "com.capacitorjs.plugins.filesystem"
  22. compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
  23. defaultConfig {
  24. minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
  25. targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
  26. versionCode 1
  27. versionName "1.0"
  28. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  29. }
  30. buildTypes {
  31. release {
  32. minifyEnabled false
  33. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  34. }
  35. }
  36. lintOptions {
  37. abortOnError false
  38. }
  39. compileOptions {
  40. sourceCompatibility JavaVersion.VERSION_21
  41. targetCompatibility JavaVersion.VERSION_21
  42. }
  43. }
  44. kotlin {
  45. jvmToolchain(21)
  46. }
  47. repositories {
  48. google()
  49. mavenCentral()
  50. }
  51. dependencies {
  52. implementation fileTree(dir: 'libs', include: ['*.jar'])
  53. implementation "io.ionic.libs:ionfilesystem-android:1.0.0"
  54. implementation project(':capacitor-android')
  55. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  56. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
  57. testImplementation "junit:junit:$junitVersion"
  58. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  59. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  60. }