buildscript { ext.kotlin_version = '1.1.51' repositories { jcenter() maven { url 'https://maven.fabric.io/public' } google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' //noinspection GradleDynamicVersion classpath 'io.fabric.tools:gradle:1.+' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { jcenter() } } repositories { mavenLocal() mavenCentral() maven { url 'https://maven.fabric.io/public' } google() } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'io.fabric' dependencies { implementation('oauth.signpost:signpost-commonshttp4:1.2.1.2') { exclude group: 'org.apache.httpcomponents' } implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { transitive = true; } implementation 'commons-io:commons-io:2.5' implementation 'com.squareup:otto:1.3.4' implementation 'com.google.zxing:android-integration:2.3.0' implementation 'com.android.support:support-annotations:26.1.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" // Required for local unit tests (JUnit 4 framework) testCompile 'junit:junit:4.12' // Required for instrumented tests androidTestCompile 'com.android.support:support-annotations:26.1.0' androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1' androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1' androidTestCompile 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestUtil 'com.android.support.test:orchestrator:1.0.1' } def keystorePropertiesFile = rootProject.file("keystore.properties") def keystoreProperties = new Properties() keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) def testPropertiesFile = rootProject.file("test.properties") def testProperties = new Properties() testProperties.load(new FileInputStream(testPropertiesFile)) testProperties.putAll(gradle.getStartParameter().getProjectProperties()) android { compileSdkVersion 26 buildToolsVersion "26.0.2" useLibrary 'org.apache.http.legacy' defaultConfig { versionCode 1451 versionName "1.4.5.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } testOptions { execution 'ANDROID_TEST_ORCHESTRATOR' } flavorDimensions "store" productFlavors { amazon { dimension "store" } google { dimension "store" } } signingConfigs { release { keyAlias keystoreProperties.getProperty('keyAlias', '') keyPassword keystoreProperties.getProperty('keyPassword', '') storeFile file(keystoreProperties.getProperty('storeFile', 'dummy')) storePassword keystoreProperties.getProperty('storePassword', '') } } buildTypes { release { zipAlignEnabled true signingConfig signingConfigs.release minifyEnabled true } debug { buildConfigField("String", "TEST_USER_ID", "\"${testProperties.testUserId}\"") buildConfigField("String", "TEST_USER_KEY_READONLY", "\"${testProperties.testUserKeyReadonly}\"") } } lintOptions { abortOnError false } packagingOptions { exclude 'META-INF/LICENSE.txt' } } task wrapper(type: Wrapper) { gradleVersion = '4.2.1' }