Flutter app for Asset Management
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

80 行
2.3 KiB

  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. def keystoreProperties = new Properties()
  24. def keystorePropertiesFile = rootProject.file('key.properties')
  25. if (keystorePropertiesFile.exists()) {
  26. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  27. }
  28. android {
  29. compileSdkVersion 33
  30. sourceSets {
  31. main.java.srcDirs += 'src/main/kotlin'
  32. }
  33. lintOptions {
  34. disable 'InvalidPackage'
  35. }
  36. defaultConfig {
  37. applicationId "com.thamringroup.assetstock"
  38. minSdkVersion 18
  39. targetSdkVersion 30
  40. versionCode flutterVersionCode.toInteger()
  41. versionName flutterVersionName
  42. multiDexEnabled true
  43. }
  44. signingConfigs {
  45. release {
  46. keyAlias keystoreProperties['keyAlias']
  47. keyPassword keystoreProperties['keyPassword']
  48. storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
  49. storePassword keystoreProperties['storePassword']
  50. }
  51. }
  52. buildTypes {
  53. release {
  54. // TODO: Add your own signing config for the release build.
  55. // Signing with the debug keys for now, so `flutter run --release` works.
  56. signingConfig signingConfigs.release
  57. minifyEnabled false
  58. shrinkResources false
  59. }
  60. }
  61. }
  62. flutter {
  63. source '../..'
  64. }
  65. dependencies {
  66. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  67. implementation 'com.android.support:multidex:1.0.3'
  68. }