Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.13 KB | None | 0 0
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'io.fabric'
  3. apply plugin: 'com.github.triplet.play'
  4. //apply plugin: 'android-apt'->This one
  5. apply plugin: MethodsPlugin
  6.  
  7. //
  8. def versionScreenSize = 0
  9. def versionMinimumApi = 0
  10. def paddingSize = 2
  11. def codePaddingSize = 3
  12.  
  13.  
  14. def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
  15. def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC"))
  16.  
  17.  
  18. android {
  19. compileSdkVersion 27
  20. buildToolsVersion "27.0.1"
  21.  
  22. defaultConfig {
  23. applicationId "com.jaycolbar.uae"
  24. minSdkVersion 16
  25. targetSdkVersion 27
  26. versionCode = 75
  27. versionName = "1.0.75"
  28. buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
  29. buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
  30. }
  31.  
  32. // splits {
  33. // abi {
  34. // enable true
  35. // reset()
  36. // include 'x86', 'armeabi-v7a'//select ABIs to build APKs for
  37. // }
  38. // }
  39.  
  40. // project.ext.versionCodes = ['armeabi-v7a': 2, 'x86': 8,]
  41.  
  42.  
  43. packagingOptions {
  44. exclude 'META-INF/DEPENDENCIES.txt'
  45. exclude 'META-INF/LICENSE.txt'
  46. exclude 'META-INF/NOTICE.txt'
  47. exclude 'META-INF/NOTICE'
  48. exclude 'META-INF/LICENSE'
  49. exclude 'META-INF/DEPENDENCIES'
  50. exclude 'META-INF/notice.txt'
  51. exclude 'META-INF/license.txt'
  52. exclude 'META-INF/dependencies.txt'
  53. exclude 'META-INF/LGPL2.1'
  54. }
  55.  
  56. signingConfigs {
  57. release {
  58. keyAlias 'AdultEmoti'
  59. keyPassword 'tF8Dr57P3'
  60. storeFile file('release.jks')
  61. storePassword 'tF8Dr57P3'
  62. }
  63. debug {
  64. keyAlias 'AdultEmotiDebug'
  65. keyPassword 'tF8Dr57P3'
  66. storeFile file('debug.jks')
  67. storePassword 'tF8Dr57P3'
  68.  
  69. }
  70. }
  71.  
  72. buildTypes {
  73. release {
  74. signingConfig signingConfigs.release
  75. minifyEnabled false
  76. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  77. debuggable false
  78.  
  79. }
  80. debug {
  81. applicationIdSuffix ".debug"
  82. signingConfig signingConfigs.release
  83. minifyEnabled false
  84. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  85. debuggable true
  86.  
  87. }
  88.  
  89. }
  90. // splits {
  91. //// density {
  92. //// enable true
  93. //// reset()
  94. //// include "mdpi", "hdpi"
  95. //// }
  96. // abi {
  97. // enable true
  98. // reset()
  99. // include "x86", "mips"
  100. // }
  101. //
  102.  
  103. flavorDimensions 'version'//,
  104. productFlavors {
  105. // emojis {
  106. // dimension "version"
  107. // applicationId "com.jaycolbar.uae.emojis"
  108. // versionCode = 74
  109. // versionName = "1.0.74"
  110. // }
  111. //
  112. // emoticons {
  113. // dimension "version"
  114. // applicationId "com.jaycolbar.uae.emoticons"
  115. // versionCode = 74
  116. // versionName = "1.0.74"
  117. // }
  118.  
  119. emojisPreston {
  120. dimension "version"
  121. applicationId "com.npreston.emojis18"
  122. versionCode = 1
  123. versionName = "1.0.0"
  124. }
  125.  
  126. // emojis {
  127. // dimension "version"
  128. // applicationId "com.npreston.uae.emojis"
  129. // versionCode = 74
  130. // versionName = "1.0.74"
  131. // }
  132. //
  133. // emoticons {
  134. // dimension "version"
  135. // applicationId "com.npreston.uae.emoticons"
  136. // versionCode = 74
  137. // versionName = "1.0.74"
  138. // }
  139.  
  140. // middleFingerFree {
  141. // flavorDimension "version"
  142. // applicationId "com.jaycolbar.uae.mfef"
  143. // versionCode = 8
  144. // versionName = "1.0.8"
  145. // }
  146.  
  147.  
  148. }
  149.  
  150. // android.applicationVariants.all { variant ->
  151. // // assign different version code for each output
  152. // variant.outputs.each { output ->
  153. // output.versionCodeOverride =
  154. // project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) * 10000000 + (1400000 + android.defaultConfig.versionCode)
  155. // }
  156. // }
  157.  
  158. lintOptions {
  159. abortOnError false
  160. }
  161. }
  162.  
  163. play {
  164. serviceAccountEmail = '118705170128-o2vaocl319lqhumh31707u1ugn0vl7ev@developer.gserviceaccount.com'
  165. pk12File = file('Madbekot-489889c7fe52.p12')
  166. track = 'beta'
  167. }
  168.  
  169.  
  170. dependencies {
  171. compile fileTree(dir: 'libs', include: ['*.jar'])
  172. compile 'org.solovyev.android:checkout:0.7.2@aar'//1 checkout
  173. compile 'com.google.code.gson:gson:2.8.0'//
  174. compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.+'//1 image loading
  175. compile 'com.squareup:otto:1.3.8'
  176. compile 'io.reactivex:rxjava:1.2.1'
  177. compile "com.android.support:support-core-utils:27.0.2"
  178. compile 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
  179. compile 'com.android.support:support-annotations:24.2.0'
  180. compile('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
  181. transitive = true
  182. }
  183.  
  184. }
  185.  
  186. class MethodsPlugin implements Plugin<Project> {
  187. void apply(Project project) {
  188. }
  189.  
  190. static Integer getVersionCode(
  191. Integer abiCode,
  192. Integer minimumApiCode,
  193. Integer minimumApiPadding,
  194. Integer screenSizeCode,
  195. Integer screenSizePadding,
  196. Integer versionCode,
  197. Integer codePaddingSize) {
  198. return Integer.parseInt(
  199. abiCode +
  200. MethodsPlugin.getZeroPadding(minimumApiCode, minimumApiPadding) +
  201. MethodsPlugin.getZeroPadding(screenSizeCode, screenSizePadding) +
  202. MethodsPlugin.getZeroPadding(versionCode, codePaddingSize))
  203. }
  204.  
  205. static String getZeroPadding(Integer code, Integer desiredStringLength) {
  206. String codeString = code.toString()
  207. String retVal = codeString.padLeft(desiredStringLength, "0")
  208.  
  209. return retVal
  210. }
  211. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement