BlockColor-Engine/build/android/build.gradle

89 lines
2.1 KiB
Groovy

buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'
classpath 'io.fabric.tools:gradle:1.29.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId 'net.blockcolor.game'
minSdkVersion 16
targetSdkVersion 29
versionCode 1
}
Properties props = new Properties()
props.load(new FileInputStream(file("local.properties")))
if (props.getProperty("keystore") != null) {
signingConfigs {
release {
storeFile file(props["keystore"])
storePassword props["keystore.password"]
keyAlias props["key"]
keyPassword props["key.password"]
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
}
// for multiple APKs
splits {
abi {
enable true
reset()
include "armeabi-v7a", "arm64-v8a", "x86"
}
}
}
// build multiple APKs for all ABI
ext.abiCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1, 'x86': 2]
import com.android.build.OutputFile
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode =
project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (baseAbiVersionCode != null) {
output.versionCodeOverride =
baseAbiVersionCode + variant.versionCode
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
// Third-party libraries
implementation 'com.itlgl:iosdialog:1.0.0'
implementation 'gun0912.ted:tedpermission:2.2.2'
implementation group: 'commons-io', name: 'commons-io', version: '2.4'
}