build.gradle 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. group 'com.ouj.shoesdk.shoes_sdk'
  2. version '1.0-SNAPSHOT'
  3. def localProperties = new Properties()
  4. def localPropertiesFile = rootProject.file('local.properties')
  5. if (localPropertiesFile.exists()) {
  6. localPropertiesFile.withReader('UTF-8') { reader ->
  7. localProperties.load(reader)
  8. }
  9. }
  10. def flutterRoot = localProperties.getProperty('flutter.sdk')
  11. if (flutterRoot == null) {
  12. throw new Exception("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  13. }
  14. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  15. if (flutterVersionCode == null) {
  16. flutterVersionCode = '1'
  17. }
  18. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  19. if (flutterVersionName == null) {
  20. flutterVersionName = '1.0'
  21. }
  22. buildscript {
  23. ext.kotlin_version = '1.3.72'
  24. repositories {
  25. google()
  26. jcenter()
  27. }
  28. dependencies {
  29. classpath 'com.android.tools.build:gradle:3.5.0'
  30. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  31. }
  32. }
  33. rootProject.allprojects {
  34. repositories {
  35. google()
  36. jcenter()
  37. }
  38. }
  39. apply plugin: 'com.android.library'
  40. apply plugin: 'kotlin-android'
  41. android {
  42. compileSdkVersion 30
  43. sourceSets {
  44. main.java.srcDirs += 'src/main/kotlin'
  45. }
  46. defaultConfig {
  47. minSdkVersion 16
  48. }
  49. externalNativeBuild {
  50. cmake {
  51. path "CMakeLists.txt"
  52. version "3.10.2"
  53. }
  54. }
  55. }
  56. dependencies {
  57. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  58. compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm64/flutter.jar")
  59. compileOnly "androidx.annotation:annotation:1.1.0"
  60. }