You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

68 line
1.8 KiB

  1. plugins{
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. }
  5. def localProperties = new Properties()
  6. def localPropertiesFile = rootProject.file('local.properties')
  7. if (localPropertiesFile.exists()) {
  8. localPropertiesFile.withReader('UTF-8') { reader ->
  9. localProperties.load(reader)
  10. }
  11. }
  12. def flutterRoot = localProperties.getProperty('flutter.sdk')
  13. if (flutterRoot == null) {
  14. throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  15. }
  16. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  17. if (flutterVersionCode == null) {
  18. flutterVersionCode = '1'
  19. }
  20. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  21. if (flutterVersionName == null) {
  22. flutterVersionName = '1.0'
  23. }
  24. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  25. android {
  26. compileSdkVersion 34
  27. sourceSets {
  28. main.java.srcDirs += 'src/main/kotlin'
  29. }
  30. lintOptions {
  31. disable 'InvalidPackage'
  32. }
  33. defaultConfig {
  34. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  35. applicationId "com.michelesapplication.app"
  36. minSdkVersion 21
  37. targetSdkVersion 33
  38. multiDexEnabled true
  39. versionCode flutterVersionCode.toInteger()
  40. versionName flutterVersionName
  41. }
  42. buildTypes {
  43. release {
  44. // TODO: Add your own signing config for the release build.
  45. // Signing with the debug keys for now, so `flutter run --release` works.
  46. signingConfig signingConfigs.debug
  47. }
  48. }
  49. }
  50. flutter {
  51. source '../..'
  52. }
  53. dependencies {
  54. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  55. implementation "androidx.multidex:multidex:2.0.1"
  56. }