build.gradle 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  22. android {
  23. compileSdkVersion 27
  24. lintOptions {
  25. disable 'InvalidPackage'
  26. }
  27. defaultConfig {
  28. applicationId "com.izouma.mobilecybergames"
  29. minSdkVersion 19
  30. targetSdkVersion 27
  31. versionCode flutterVersionCode.toInteger()
  32. versionName flutterVersionName
  33. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  34. ndk {
  35. // abiFilters 'armeabi-v7a'
  36. }
  37. manifestPlaceholders = [
  38. JPUSH_PKGNAME : applicationId,
  39. JPUSH_APPKEY : "868cc9036e14c71e2b698f46",
  40. JPUSH_CHANNEL : "developer-default",
  41. ]
  42. }
  43. signingConfigs {
  44. debug {
  45. storeFile file('debug.jks')
  46. }
  47. release {
  48. storeFile file('zouma.jks')
  49. storePassword "zouma123"
  50. keyAlias "zouma"
  51. keyPassword "zouma123"
  52. }
  53. }
  54. buildTypes {
  55. debug {
  56. signingConfig signingConfigs.debug
  57. }
  58. release {
  59. signingConfig signingConfigs.release
  60. minifyEnabled false
  61. useProguard true
  62. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  63. }
  64. }
  65. compileOptions {
  66. sourceCompatibility JavaVersion.VERSION_1_8
  67. targetCompatibility JavaVersion.VERSION_1_8
  68. }
  69. }
  70. flutter {
  71. source '../..'
  72. }
  73. dependencies {
  74. implementation fileTree(dir: 'libs', include: ['*.jar'])
  75. implementation fileTree(dir: 'libs', include: ['*.aar'])
  76. testImplementation 'junit:junit:4.12'
  77. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  78. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  79. }