155 lines
4.8 KiB
Groovy
155 lines
4.8 KiB
Groovy
def localProperties = new Properties()
|
|
def localPropertiesFile = rootProject.file('local.properties')
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
|
localProperties.load(reader)
|
|
}
|
|
}
|
|
|
|
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
|
if (flutterRoot == null) {
|
|
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
|
}
|
|
|
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
|
if (flutterVersionCode == null) {
|
|
flutterVersionCode = '4'
|
|
}
|
|
|
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|
if (flutterVersionName == null) {
|
|
flutterVersionName = '1.0.4'
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
|
|
|
def keystoreProperties = new Properties()
|
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
|
|
sourceSets {
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
}
|
|
|
|
lintOptions {
|
|
disable 'InvalidPackage'
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "kz.com.aman.kassa"
|
|
minSdkVersion 21
|
|
targetSdkVersion 28
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
multiDexEnabled true
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
}
|
|
buildTypes {
|
|
all {
|
|
buildConfigField ("String[]", "SUPPORTED_DEVICES", collectSupportedDevicesToArray())
|
|
}
|
|
release {
|
|
//useProguard true
|
|
//minifyEnabled false
|
|
//shrinkResources false
|
|
// proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
coreLibraryDesugaringEnabled true
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
|
}
|
|
|
|
}
|
|
|
|
flutter {
|
|
source '../..'
|
|
}
|
|
|
|
dependencies {
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
|
testImplementation 'junit:junit:4.12'
|
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
|
|
|
//m4bank dependencies
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation deps.zlibrary
|
|
|
|
// implementation deps.hardware.aisino.aisino_common
|
|
// implementation deps.hardware.aisino.vm20.values()
|
|
// implementation deps.hardware.wangpos.values()
|
|
// implementation deps.hardware.roam.values()
|
|
// implementation deps.hardware.spirelib
|
|
// implementation deps.hardware.icmp.values()
|
|
implementation deps.hardware.atol.values()
|
|
implementation deps.hardware.terminalCommon.values()
|
|
//if (buildType.buildType == 'NFC') {
|
|
implementation deps.hardware.softpos.softpaylibrary
|
|
implementation deps.hardware.softpos.softpay_dependencies
|
|
//} else {
|
|
// implementation deps.hardware.aisino.a90.values()
|
|
//}
|
|
|
|
// implementation deps.hardware.shtrih.values()
|
|
// implementation deps.hardware.redlib
|
|
// implementation deps.hardware.sunmi
|
|
// implementation deps.hardware.d200lib
|
|
|
|
//Implementation okhhtp library
|
|
implementation deps.okhttp.values()
|
|
//Implementation retrofit library
|
|
implementation deps.retrofit.values()
|
|
//Implementation rxJava library
|
|
implementation deps.rx.values()
|
|
//Implementation logback
|
|
implementation deps.logback.core
|
|
implementation(deps.logback.classic) {
|
|
exclude group: 'com.google.android', module: 'android'
|
|
}
|
|
//Implementation other libraries
|
|
implementation deps.timber
|
|
implementation deps.paperdb
|
|
implementation deps.greendao
|
|
implementation deps.retro_stream
|
|
|
|
implementation deps.websockets // Only for useWebsockets parameter
|
|
}
|
|
|
|
def collectSupportedDevicesToArray() {
|
|
return '{' + rootProject.ext."supportedDevices${getProject().name}".collect {
|
|
"\"${it}\""
|
|
}.join(",") + '}'
|
|
}
|
|
|
|
|