build.gradle 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. plugins {
  2. id "com.android.application"
  3. id "kotlin-android"
  4. // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
  5. id "dev.flutter.flutter-gradle-plugin"
  6. }
  7. android {
  8. namespace = "com.example.clean.clean"
  9. compileSdk = flutter.compileSdkVersion
  10. ndkVersion = flutter.ndkVersion
  11. compileOptions {
  12. sourceCompatibility = JavaVersion.VERSION_1_8
  13. targetCompatibility = JavaVersion.VERSION_1_8
  14. }
  15. kotlinOptions {
  16. jvmTarget = JavaVersion.VERSION_1_8
  17. }
  18. defaultConfig {
  19. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  20. applicationId = "com.cleanpro.tools"
  21. // You can update the following values to match your application needs.
  22. // For more information, see: https://flutter.dev/to/review-gradle-config.
  23. minSdk = flutter.minSdkVersion
  24. targetSdk = flutter.targetSdkVersion
  25. versionCode = flutter.versionCode
  26. versionName = flutter.versionName
  27. }
  28. buildTypes {
  29. release {
  30. // TODO: Add your own signing config for the release build.
  31. // Signing with the debug keys for now, so `flutter run --release` works.
  32. signingConfig = signingConfigs.debug
  33. }
  34. }
  35. applicationVariants.configureEach { variant ->
  36. def date = new Date().format("YYMMddHHmmss")
  37. variant.outputs.configureEach {
  38. def fileName = "${defaultConfig.applicationId}" +
  39. "-v${defaultConfig.versionName}" +
  40. "-${variant.buildType.name}" +
  41. "-${date}" +
  42. ".apk"
  43. outputFileName = fileName
  44. }
  45. }
  46. }
  47. flutter {
  48. source = "../.."
  49. }