apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' apply plugin: 'io.fabric' apply plugin: 'com.google.firebase.firebase-perf' def keystoreProperties = new Properties() keystoreProperties.load(new FileInputStream(rootProject.file("keystore.properties"))) def developProperties = new Properties() try { developProperties.load(new FileInputStream(rootProject.file("develop.properties"))) } catch (ignored) { developProperties['DEV_USER_1'] = "" developProperties['PRODUCT_USER_1'] = "" developProperties['DEV_USER_2'] = "" developProperties['PRODUCT_USER_2'] = "" } android { lintOptions { checkReleaseBuilds false abortOnError false } signingConfigs { // debug { // keyAlias 'lifeplus_debug' // keyPassword 'lifeplus_debug' // storeFile rootProject.file("keystore/lifeplus_debug") // storePassword 'lifeplus_debug' // } release { storeFile rootProject.file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] } } compileSdkVersion 28 defaultConfig { applicationId "kr.co.zumo.app" minSdkVersion 19 // 4.4 targetSdkVersion 28 versionCode 181 versionName "4.1.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false manifestPlaceholders = [appLabel: "@string/app_name"] proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } debug { // versionNameSuffix "-debug" manifestPlaceholders = [appLabel: "@string/app_name_debug"] signingConfig signingConfigs.release // signingConfig signingConfigs.debug } } sourceSets { /* - dev <-> product = NetworkConfig 를 다르게 설정 - sandbox <-> common = sandbox 로 사용할 Class 를 설정 */ // sandbox { // java.srcDirs = ['src/dev/java', 'src/sandbox/java'] // } dev { java.srcDirs = ['src/dev/java', 'src/common/java'] } product { java.srcDirs = ['src/product/java', 'src/common/java'] } } flavorDimensions "build" productFlavors { // sandbox { // versionNameSuffix "-sandbox" // manifestPlaceholders = [appLabel: "@string/app_name"] // // // defining the test properties // buildConfigField "String", "DEV_USER_1", "\"" + developProperties['DEV_USER_1'] + "\"" // buildConfigField "String", "PRODUCT_USER_1", "\"" + developProperties['PRODUCT_USER_1'] + "\"" // buildConfigField "String", "DEV_USER_2", "\"" + developProperties['DEV_USER_2'] + "\"" // buildConfigField "String", "PRODUCT_USER_2", "\"" + developProperties['PRODUCT_USER_2'] + "\"" // } dev { manifestPlaceholders = [icon: "@mipmap/ic_launcher_dev"] applicationIdSuffix ".dev" versionNameSuffix "-dev" // defining the test properties buildConfigField "String", "DEV_USER_1", "\"" + developProperties['DEV_USER_1'] + "\"" buildConfigField "String", "PRODUCT_USER_1", "\"" + developProperties['PRODUCT_USER_1'] + "\"" buildConfigField "String", "DEV_USER_2", "\"" + developProperties['DEV_USER_2'] + "\"" buildConfigField "String", "PRODUCT_USER_2", "\"" + developProperties['PRODUCT_USER_2'] + "\"" } product { versionNameSuffix "" manifestPlaceholders = [icon: "@mipmap/ic_launcher"] // defining the test properties buildConfigField "String", "DEV_USER_1", "\"\"" buildConfigField "String", "PRODUCT_USER_1", "\"\"" buildConfigField "String", "DEV_USER_2", "\"\"" buildConfigField "String", "PRODUCT_USER_2", "\"\"" } } applicationVariants.all { variant -> variant.outputs.all { output -> def SEP = "_" def buildType = variant.variantData.variantConfiguration.buildType.name def version = variant.versionName def newApkName if (buildType == "release") { newApkName = "zumo" + SEP + buildType + SEP + version + ".apk" } else { newApkName = "zumo" + ".apk" } outputFileName = new File(newApkName) } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } testOptions { unitTests { includeAndroidResources = true returnDefaultValues = true } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:exifinterface:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:customtabs:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.android.support:support-v4:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'android.arch.lifecycle:extensions:1.1.1' implementation 'android.arch.lifecycle:viewmodel:1.1.1' implementation 'com.google.firebase:firebase-messaging:17.5.0' implementation 'com.google.firebase:firebase-dynamic-links:16.1.8' implementation 'com.google.firebase:firebase-core:16.0.8' implementation 'com.google.firebase:firebase-config:16.4.1' /********************************* * External lib *********************************/ implementation 'io.reactivex.rxjava2:rxandroid:2.0.2' implementation 'com.google.android.gms:play-services-plus:16.0.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' implementation('com.squareup.retrofit2:converter-gson:2.3.0') { exclude group: 'com.google.code.gson', module: 'gson' } implementation 'com.github.bumptech.glide:glide:4.8.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0' implementation 'com.kakao.sdk:kakaolink:1.14.0' implementation 'com.facebook.android:facebook-share:4.38.1' implementation 'com.githang:status-bar-compat:0.7' implementation 'com.wefika:flowlayout:0.4.1' implementation 'me.everything:overscroll-decor-android:1.0.4' // implementation 'com.robinhood.ticker:ticker:2.0.1' // implementation 'com.squareup.picasso:picasso:2.71828' // implementation 'jp.wasabeef:picasso-transformations:2.2.1' // ZUMO implementation 'com.google.android.gms:play-services-auth:16.0.0' implementation 'com.google.android.gms:play-services-analytics:16.0.8' implementation 'com.kakao.sdk:usermgmt:1.14.0' implementation 'com.kakao.sdk:kakaotalk:1.14.0' // implementation 'com.facebook.android:facebook-android-sdk:[5,6)' // implementation 'com.facebook.android:facebook-android-sdk:5.2.0' // Naver login sdk implementation files('libs/3rdparty_login_library_android_4.1.4.jar') // Advertise platform implementation files('libs/buzzad-android-sdk-advertiser-1.0.1.jar') implementation files('libs/cashslide-sdk20170320.jar') implementation files('libs/libNswitchSDK_v1.1.2.jar') implementation files('libs/tnkad-sdk.jar') // Crashlytics implementation 'com.google.firebase:firebase-core:16.0.7' implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9' // Performance implementation 'com.google.firebase:firebase-perf:16.2.4' /********************************* * UNIT TEST *********************************/ // Required for local unit tests (JUnit 4 framework) testImplementation 'junit:junit:4.12' // Required for instrumented tests androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2' androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3' // Mockito // testImplementation "org.mockito:mockito-core:2.21.0" // Robolectric testImplementation 'org.robolectric:robolectric:3.8' testImplementation 'org.robolectric:shadows-support-v4:3.3.2' testImplementation 'org.robolectric:multidex:3.4.2' // PowerMock testImplementation 'org.powermock:powermock-core:1.7.4' testImplementation 'org.powermock:powermock-module-junit4:1.7.4' testImplementation 'org.powermock:powermock-api-mockito2:1.7.4' }