build.gradle 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Copyright (c) 2015. Ncomz. All Rights Reserved
  3. */
  4. apply plugin: 'com.android.application'
  5. apply plugin: 'realm-android'
  6. android {
  7. compileSdkVersion 23
  8. buildToolsVersion '25.0.0'
  9. defaultConfig {
  10. applicationId "com.ntels.kneet.v3"
  11. minSdkVersion 15
  12. targetSdkVersion 22
  13. multiDexEnabled true
  14. versionCode 11
  15. versionName "0.1.3"
  16. }
  17. productFlavors {
  18. dev {
  19. minSdkVersion 21
  20. aaptOptions.cruncherEnabled = false;
  21. resConfigs "ko", "xxxhdpi"
  22. }
  23. prd {
  24. }
  25. }
  26. android.variantFilter {variant ->
  27. def flavorName = variant.getFlavors().get(0).name;
  28. splits.abi.enable = (flavorName == 'prd');
  29. }
  30. /*task clean(type: Exec) {
  31. ext.lockhunter = '\"C:\\Program Files\\LockHunter\\LockHunter.exe"'
  32. def buildDir = file(new File("build"))
  33. commandLine 'cmd', "$lockhunter", '/delete', '/silent', buildDir
  34. // delete "$rootProject/kneet_v3/build/intermediates/exploded-aar"
  35. // delete "$rootProject/kneet_v3/build/intermediates/transforms"
  36. }*/
  37. dexOptions {
  38. //preDexLibraries = false
  39. jumboMode = true
  40. maxProcessCount 4
  41. javaMaxHeapSize "2g"
  42. // incremental true
  43. }
  44. applicationVariants.all { variant ->
  45. variant.outputs.each { output ->
  46. if ("${variant.buildType.name}" != "debug") {
  47. def formattedDate = new Date().format("yyyyMMdd_HHmmss")
  48. def apkName = "Kneet3.0_v" + variant.versionName + "_" + formattedDate + "_Release.apk"
  49. output.outputFile = new File(output.outputFile.parent, apkName)
  50. } else {
  51. def formattedDate = new Date().format("yyyyMMdd_HHmmss")
  52. def apkName = "Kneet3.0_v" + variant.versionName + "_" + formattedDate + "_Debug.apk"
  53. output.outputFile = new File(output.outputFile.parent, apkName)
  54. }
  55. }
  56. }
  57. signingConfigs {
  58. release {
  59. storeFile file("../kneet_v2.jks")
  60. storePassword "ntels@kneet"
  61. keyAlias "kneet_v2"
  62. keyPassword "ntels@kneet"
  63. }
  64. }
  65. buildTypes {
  66. debug {
  67. debuggable true
  68. // minifyEnabled true
  69. // proguardFiles 'proguard-rules.pro'
  70. }
  71. release {
  72. signingConfig signingConfigs.release
  73. debuggable false
  74. minifyEnabled true
  75. proguardFiles 'proguard-rules.pro'
  76. // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  77. }
  78. }
  79. packagingOptions {
  80. exclude 'META-INF/DEPENDENCIES'
  81. exclude 'META-INF/dependencies'
  82. exclude 'META-INF/DEPENDENCIES.txt'
  83. exclude 'META-INF/dependencies.txt'
  84. exclude 'META-INF/LICENSE'
  85. exclude 'META-INF/license'
  86. exclude 'META-INF/license.txt'
  87. exclude 'META-INF/LICENSE.txt'
  88. exclude 'META-INF/NOTICE'
  89. exclude 'META-INF/notice'
  90. exclude 'META-INF/NOTICE.txt'
  91. exclude 'META-INF/notice.txt'
  92. exclude 'META-INF/ASL2.0'
  93. }
  94. }
  95. dependencies {
  96. compile fileTree(include: ['*.jar'], dir: 'libs')
  97. compile project(':color_picker')
  98. compile 'com.android.support:multidex:1.0.1'
  99. compile 'com.android.support:support-v4:23.4.0'
  100. compile 'com.android.support:appcompat-v7:23.4.0'
  101. compile 'com.android.support:recyclerview-v7:23.4.0'
  102. compile 'com.android.support:gridlayout-v7:23.4.0'
  103. compile 'jp.wasabeef:recyclerview-animators:2.1.0'
  104. compile 'com.google.android.gms:play-services-gcm:8.4.0'
  105. compile 'com.google.android.gms:play-services-analytics:8.4.0'
  106. compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
  107. compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
  108. compile 'com.squareup.picasso:picasso:2.5.2'
  109. compile 'com.tsengvn:typekit:1.0.0'
  110. compile 'com.koushikdutta.async:androidasync:2.2.1'
  111. compile 'com.mcxiaoke.volley:library:1.0.19'
  112. compile 'com.facebook.stetho:stetho:1.5.0'
  113. compile 'com.uphyca:stetho_realm:2.1.0'
  114. compile ('com.google.android:flexbox:0.3.0') {
  115. exclude module: 'support-compat'
  116. exclude module: 'recyclerview-v7'
  117. }
  118. }