build.gradle 4.1 KB

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