build.gradle 5.04 KB
apply plugin: 'com.android.library'
//apply from: './maven_push.gradle'

android {
//    compileSdkVersion rootProject.ext.compileSdkVersion
//    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
//        minSdkVersion rootProject.ext.minSdkVersion
//        targetSdkVersion rootProject.ext.targetSdkVersion
//        versionCode rootProject.ext.versionCode
//        versionName rootProject.ext.versionName

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [AROUTER_MODULE_NAME: project.getName(), AROUTER_GENERATE_DOC: "enable"]
            }
        }
    }

    //添加java编译指令,防止引用时,形参变成var1
    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs.add('-parameters')
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        debug {
            resValue("string", "ACCOUNT_LABEL", "网家家 内测")
            resValue("string", "ACCOUNT_TYPE", "com.cnlive.strike.debug.AccountType")
            resValue("string", "ACCOUNT_PROVIDE", "com.cnlive.strike.debug.AccountProvide")

        }
        release {
            resValue("string", "ACCOUNT_LABEL", "网家家")
            resValue("string", "ACCOUNT_TYPE", "com.cnlive.strike.AccountType")
            resValue("string", "ACCOUNT_PROVIDE", "com.cnlive.strike.AccountProvide")
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dataBinding {
        enabled true
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
//    implementation "com.android.support:support-v4:$rootProject.supportV4"
//    implementation "com.android.support:appcompat-v7:$rootProject.appcompatV7"
//    implementation "com.android.support:design:$rootProject.design"
//    implementation "com.android.support:support-v13:$rootProject.supportV13"
//    implementation "com.android.support:recyclerview-v7:$rootProject.recyclerviewV7"
//    implementation "com.android.support:cardview-v7:$rootProject.cardviewV7"
    //MVP

    //Java8
    implementation 'net.sourceforge.streamsupport:streamsupport:1.5.5'
    implementation 'net.sourceforge.streamsupport:streamsupport-cfuture:1.5.5'
    implementation 'net.sourceforge.streamsupport:streamsupport-atomic:1.5.5'
    implementation 'net.sourceforge.streamsupport:streamsupport-flow:1.5.5'
    implementation 'net.sourceforge.streamsupport:streamsupport-literal:1.5.5'
//    //GSON
//    implementation "com.google.code.gson:gson:$rootProject.gson"
//    //RxJava
//    implementation 'io.reactivex.rxjava2:rxjava:2.1.8'
//    implementation('io.reactivex.rxjava2:rxandroid:2.0.1') {
//        exclude module: 'rxjava'// rxJava
//    }
//    //EventBus
//    implementation "org.greenrobot:eventbus:$rootProject.eventbus"
    implementation('com.github.pwittchen:reactivenetwork-rx2:3.0.6') {
        exclude module: "rxjava"
    }
//    //CNLive Encipher
//    implementation "com.cnlive:lib-cnencipher:$rootProject.libCnencipher"
    implementation "com.cnlive:lib_cnutil:$rootProject.libCnUtil"
//    //鲁班 暂时以源码形式引用,因为超大尺寸图片像素无法压缩
//    //implementation 'top.zibin:Luban:1.1.8'
//    implementation "com.qmuiteam:qmui:$rootProject.qmui"
//    //    compile 'top.zibin:Luban-turbo:1.0.0'
//    implementation 'com.github.GrenderG:Toasty:1.4.2'
//
//    //ARouter
//    implementation "com.alibaba:arouter-api:$rootProject.arouterApiVersion"
//    annotationProcessor "com.alibaba:arouter-compiler:$rootProject.arouterCompilerVersion"
//
//    api "com.cnlive.libs:network:$rootProject.libNetwork"
//    api files('libs/pinyin4j-2.5.0.jar')
}

//ext {
//    bintrayRepo = 'cnliveLibs'  //Maven 库名称
//    bintrayName = 'lib-appbase'    //Maven 库内Lib包名
//
//    publishedGroupId = 'com.cnlive'
//    libraryName = 'base'
//    artifact = 'lib_base'     //与包名保持一致!
//
//    libraryDescription = 'for app libs'
//
//    siteUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNLiveSDK'
//    gitUrl = 'http://bj.gitlab.cnlive.com/cnlive-team/CNLiveSDK.git'
//
//    libraryVersion = '1.1.3'
//
//    developerId = 'CNlive'
//    developerName = 'Granzon'
//    developerEmail = 'zhuxiansong@cnlive.com'
//
//    licenseName = 'The Apache Software License, Version 2.0'
//    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
//    allLicenses = ["Apache-2.0"]
//}
//
//apply from: './from_installv1.gradle'
//apply from: './from_bintrayv1.gradle'

//ext {
//    PUBLISH_GROUP_ID = 'libcnlive'
//    PUBLISH_ARTIFACT_ID = 'base'
//    PUBLISH_VERSION = android.defaultConfig.versionName
//}
//
//task makeBaseJar(type: Copy) {
//    def outJarVersion = project.PUBLISH_GROUP_ID +project.PUBLISH_ARTIFACT_ID + ".jar"
//    from('build/intermediates/bundles/release/')
//    into('build/libs/')
//    include('classes.jar')
//    rename('classes.jar', outJarVersion)
//}
//
//makeBaseJar.dependsOn(build)