Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apply plugin: 'com.android.application'
- apply plugin: 'io.fabric'
- apply plugin: 'com.github.triplet.play'
- //apply plugin: 'android-apt'->This one
- apply plugin: MethodsPlugin
- //
- def versionScreenSize = 0
- def versionMinimumApi = 0
- def paddingSize = 2
- def codePaddingSize = 3
- def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
- def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC"))
- android {
- compileSdkVersion 27
- buildToolsVersion "27.0.1"
- defaultConfig {
- applicationId "com.jaycolbar.uae"
- minSdkVersion 16
- targetSdkVersion 27
- versionCode = 75
- versionName = "1.0.75"
- buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
- buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
- }
- // splits {
- // abi {
- // enable true
- // reset()
- // include 'x86', 'armeabi-v7a'//select ABIs to build APKs for
- // }
- // }
- // project.ext.versionCodes = ['armeabi-v7a': 2, 'x86': 8,]
- packagingOptions {
- exclude 'META-INF/DEPENDENCIES.txt'
- exclude 'META-INF/LICENSE.txt'
- exclude 'META-INF/NOTICE.txt'
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/LICENSE'
- exclude 'META-INF/DEPENDENCIES'
- exclude 'META-INF/notice.txt'
- exclude 'META-INF/license.txt'
- exclude 'META-INF/dependencies.txt'
- exclude 'META-INF/LGPL2.1'
- }
- signingConfigs {
- release {
- keyAlias 'AdultEmoti'
- keyPassword 'tF8Dr57P3'
- storeFile file('release.jks')
- storePassword 'tF8Dr57P3'
- }
- debug {
- keyAlias 'AdultEmotiDebug'
- keyPassword 'tF8Dr57P3'
- storeFile file('debug.jks')
- storePassword 'tF8Dr57P3'
- }
- }
- buildTypes {
- release {
- signingConfig signingConfigs.release
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- debuggable false
- }
- debug {
- applicationIdSuffix ".debug"
- signingConfig signingConfigs.release
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- debuggable true
- }
- }
- // splits {
- //// density {
- //// enable true
- //// reset()
- //// include "mdpi", "hdpi"
- //// }
- // abi {
- // enable true
- // reset()
- // include "x86", "mips"
- // }
- //
- flavorDimensions 'version'//,
- productFlavors {
- // emojis {
- // dimension "version"
- // applicationId "com.jaycolbar.uae.emojis"
- // versionCode = 74
- // versionName = "1.0.74"
- // }
- //
- // emoticons {
- // dimension "version"
- // applicationId "com.jaycolbar.uae.emoticons"
- // versionCode = 74
- // versionName = "1.0.74"
- // }
- emojisPreston {
- dimension "version"
- applicationId "com.npreston.emojis18"
- versionCode = 1
- versionName = "1.0.0"
- }
- // emojis {
- // dimension "version"
- // applicationId "com.npreston.uae.emojis"
- // versionCode = 74
- // versionName = "1.0.74"
- // }
- //
- // emoticons {
- // dimension "version"
- // applicationId "com.npreston.uae.emoticons"
- // versionCode = 74
- // versionName = "1.0.74"
- // }
- // middleFingerFree {
- // flavorDimension "version"
- // applicationId "com.jaycolbar.uae.mfef"
- // versionCode = 8
- // versionName = "1.0.8"
- // }
- }
- // android.applicationVariants.all { variant ->
- // // assign different version code for each output
- // variant.outputs.each { output ->
- // output.versionCodeOverride =
- // project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) * 10000000 + (1400000 + android.defaultConfig.versionCode)
- // }
- // }
- lintOptions {
- abortOnError false
- }
- }
- play {
- serviceAccountEmail = '118705170128-o2vaocl319lqhumh31707u1ugn0vl7ev@developer.gserviceaccount.com'
- pk12File = file('Madbekot-489889c7fe52.p12')
- track = 'beta'
- }
- dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'org.solovyev.android:checkout:0.7.2@aar'//1 checkout
- compile 'com.google.code.gson:gson:2.8.0'//
- compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.+'//1 image loading
- compile 'com.squareup:otto:1.3.8'
- compile 'io.reactivex:rxjava:1.2.1'
- compile "com.android.support:support-core-utils:27.0.2"
- compile 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
- compile 'com.android.support:support-annotations:24.2.0'
- compile('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
- transitive = true
- }
- }
- class MethodsPlugin implements Plugin<Project> {
- void apply(Project project) {
- }
- static Integer getVersionCode(
- Integer abiCode,
- Integer minimumApiCode,
- Integer minimumApiPadding,
- Integer screenSizeCode,
- Integer screenSizePadding,
- Integer versionCode,
- Integer codePaddingSize) {
- return Integer.parseInt(
- abiCode +
- MethodsPlugin.getZeroPadding(minimumApiCode, minimumApiPadding) +
- MethodsPlugin.getZeroPadding(screenSizeCode, screenSizePadding) +
- MethodsPlugin.getZeroPadding(versionCode, codePaddingSize))
- }
- static String getZeroPadding(Integer code, Integer desiredStringLength) {
- String codeString = code.toString()
- String retVal = codeString.padLeft(desiredStringLength, "0")
- return retVal
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement