build.gradle 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. plugins {
  2. id 'io.nexilis.ob-plugin' version '1.0.81'
  3. }
  4. def localProperties = new Properties()
  5. def localPropertiesFile = rootProject.file('local.properties')
  6. if (localPropertiesFile.exists()) {
  7. localPropertiesFile.withReader('UTF-8') { reader ->
  8. localProperties.load(reader)
  9. }
  10. }
  11. def flutterRoot = localProperties.getProperty('flutter.sdk')
  12. if (flutterRoot == null) {
  13. throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  14. }
  15. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  16. if (flutterVersionCode == null) {
  17. flutterVersionCode = '1'
  18. }
  19. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  20. if (flutterVersionName == null) {
  21. flutterVersionName = '1.0'
  22. }
  23. apply plugin: 'com.android.application'
  24. apply plugin: 'kotlin-android'
  25. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  26. android {
  27. namespace "com.example.nexilissamplecodeflutter"
  28. compileSdkVersion 35
  29. ndkVersion flutter.ndkVersion
  30. compileOptions {
  31. sourceCompatibility JavaVersion.VERSION_1_8
  32. targetCompatibility JavaVersion.VERSION_1_8
  33. }
  34. defaultConfig {
  35. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  36. applicationId "com.example.nexilissamplecodeflutter"
  37. // You can update the following values to match your application needs.
  38. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
  39. minSdkVersion 24
  40. targetSdkVersion 35
  41. versionCode flutterVersionCode.toInteger()
  42. versionName flutterVersionName
  43. }
  44. buildTypes {
  45. release {
  46. // TODO: Add your own signing config for the release build.
  47. // Signing with the debug keys for now, so `flutter run --release` works.
  48. signingConfig signingConfigs.debug
  49. minifyEnabled true
  50. shrinkResources true
  51. debuggable false
  52. jniDebuggable false
  53. renderscriptDebuggable false
  54. zipAlignEnabled true
  55. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  56. }
  57. }
  58. splits {
  59. density {
  60. enable true
  61. reset()
  62. include 'hdpi', 'mdpi', 'xhdpi', 'xxhdpi', 'xxxhdpi'
  63. }
  64. abi {
  65. enable true
  66. reset()
  67. include 'armeabi-v7a', 'arm64-v8a'
  68. universalApk false
  69. }
  70. }
  71. lintOptions {
  72. abortOnError false
  73. }
  74. packagingOptions {
  75. exclude 'META-INF/DEPENDENCIES'
  76. exclude 'META-INF/LICENSE'
  77. exclude 'META-INF/LICENSE.txt'
  78. exclude 'META-INF/license.txt'
  79. exclude 'META-INF/NOTICE'
  80. exclude 'META-INF/NOTICE.txt'
  81. exclude 'META-INF/notice.txt'
  82. exclude 'META-INF/ASL2.0'
  83. doNotStrip "/armeabi-v7a/.so"
  84. doNotStrip "/arm64-v8a/.so"
  85. jniLibs {
  86. useLegacyPackaging = true
  87. }
  88. }
  89. }
  90. flutter {
  91. source '../..'
  92. }
  93. dependencies {
  94. // *** Add Nexilis UI dependencies ***
  95. implementation('***REPLACE***WITH***NEXILIS***UI***VERSION***LIBRARY***') {
  96. transitive = true
  97. }
  98. // *** Add Nexilis UC dependencies ***
  99. implementation('***REPLACE***WITH***NEXILIS***UC***VERSION***LIBRARY***') {
  100. transitive = true
  101. }
  102. // *** Add Nexilis SS dependencies ***
  103. implementation('***REPLACE***WITH***NEXILIS***SS***VERSION***LIBRARY***') {
  104. transitive = true
  105. }
  106. }