build.gradle 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. def localProperties = new Properties()
  2. def localPropertiesFile = rootProject.file('local.properties')
  3. if (localPropertiesFile.exists()) {
  4. localPropertiesFile.withReader('UTF-8') { reader ->
  5. localProperties.load(reader)
  6. }
  7. }
  8. def flutterRoot = localProperties.getProperty('flutter.sdk')
  9. if (flutterRoot == null) {
  10. throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  11. }
  12. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  13. if (flutterVersionCode == null) {
  14. flutterVersionCode = '1'
  15. }
  16. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  17. if (flutterVersionName == null) {
  18. flutterVersionName = '1.0'
  19. }
  20. apply plugin: 'com.android.application'
  21. // apply plugin: 'kotlin-android'
  22. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  23. android {
  24. compileSdkVersion 33
  25. signingConfigs {
  26. release {
  27. storeFile file("sign/flutter_douyin.jks")
  28. keyAlias "key0"
  29. keyPassword "VgH2t_ZzTLh5"
  30. storePassword "VgH2t_ZzTLh5"
  31. }
  32. }
  33. sourceSets {
  34. main.java.srcDirs += 'src/main/kotlin'
  35. }
  36. lintOptions {
  37. disable 'InvalidPackage'
  38. }
  39. defaultConfig {
  40. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  41. applicationId "com.example.douyin_demo"
  42. minSdkVersion 21
  43. targetSdkVersion 33
  44. versionCode flutterVersionCode.toInteger()
  45. versionName flutterVersionName
  46. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  47. }
  48. buildTypes {
  49. release {
  50. signingConfig signingConfigs.release
  51. }
  52. }
  53. }
  54. flutter {
  55. source '../..'
  56. }
  57. dependencies {
  58. // implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  59. // testImplementation 'junit:junit:4.12'
  60. // androidTestImplementation 'androidx.test:runner:1.1.0'
  61. // androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
  62. implementation 'com.google.firebase:firebase-analytics:17.2.0'
  63. api 'com.google.firebase:firebase-ml-vision-image-label-model:17.0.2'
  64. api 'com.google.firebase:firebase-ml-vision-face-model:17.0.2'
  65. }
  66. apply plugin: 'com.google.gms.google-services'