build.gradle 2.62 KB
apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"

    dexOptions {
        javaMaxHeapSize "4g"
    }

    defaultConfig {
        applicationId "com.cnlive.gundam"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    dataBinding {
        enabled true
    }

    signingConfigs {
        Properties props = new Properties();
        props.load(new FileInputStream(rootProject.file('signing.properties')))
        myConfig {
            v2SigningEnabled false
            storeFile file(props['KEYSTORE_FILE'])
            storePassword props['KEYSTORE_PASSWORD']
            keyAlias props['KEY_ALIAS']
            keyPassword props['KEY_PASSWORD']
        }
    }

    buildTypes {
        debug {
            applicationIdSuffix ".debug"
            signingConfig signingConfigs.myConfig
            zipAlignEnabled true
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.myConfig
            zipAlignEnabled true
        }
    }

    applicationVariants.all { variant ->
        def file = variant.outputs[0].outputFile
        def name = "CNliveApp_" + defaultConfig.versionName + "_" + variant.buildType.name + ".apk";
        variant.outputs[0].outputFile = new File(file.parent, name)
    }


    useLibrary 'org.apache.http.legacy'

    applicationVariants.all { variant ->
        def file = variant.outputs[0].outputFile
        def name = "CNliveApp_" + defaultConfig.versionName + "_" + variant.buildType.name + ".apk";
        variant.outputs[0].outputFile = new File(file.parent, name)
    }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    //Retrofit
    //OKhttp
    compile project(':user')

    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:recyclerview-v7:26.+'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'org.greenrobot:eventbus:3.0.0'

    //Retrofit
    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    //OKhttp
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.squareup.okhttp3:okhttp-ws:3.2.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'

}