build.gradle 3.04 KB
Newer Older
konghaorui committed
1 2 3 4
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
万齐军 committed
5
apply from: "../maven_push.gradle"
konghaorui committed
6 7 8 9 10 11 12 13

kapt {
    arguments {
        arg("AROUTER_MODULE_NAME", "im")
    }
}

android {
konghaorui committed
14 15 16
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]
    buildToolsVersion rootProject.ext.android["buildToolsVersion"]

konghaorui committed
17 18

    defaultConfig {
konghaorui committed
19 20
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
konghaorui committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [AROUTER_MODULE_NAME: "im"]
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    sourceSets {
        main {
            res.srcDirs = [
konghaorui committed
40 41 42
                    'src/main/res',
                    'src/main/res_avchat',
                    'src/main/res_uikit'
konghaorui committed
43 44 45 46 47 48 49 50 51 52 53 54
            ]
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.aar','*.jar'])
YKai committed
55
    implementation 'androidx.appcompat:appcompat:1.0.0'
konghaorui committed
56
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
konghaorui committed
57
    kapt 'com.alibaba:arouter-compiler:1.2.2'
58
    implementation 'com.ydl:nim-base:1.1.0.7'
霍志良 committed
59
//    implementation 'com.netease.nimlib:basesdk:8.5.0'
60 61
    implementation 'com.netease.nimlib:avchat:9.1.1'
    implementation 'com.netease.nimlib:nrtc:9.1.1'
konghaorui committed
62
    api rootProject.ext.dependencies["ydl-user-router"]
刘鹏 committed
63
    implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
霍志良 committed
64
    api 'com.tencent.tbs.tbssdk:sdk:43903'
刘鹏 committed
65

konghaorui committed
66 67 68 69
    if (rootProject.ext.dev_mode){
        //开发时使用
        api project(':ydl-webview')
        api project(':ydl-platform')
万齐军 committed
70
        implementation project(":api:im")
万齐军 committed
71
        implementation project(":api:user")
万齐军 committed
72
        implementation project(":api:dynamic")
万齐军 committed
73
        implementation project(":api:tests")
万齐军 committed
74
        implementation project(":api:course")
万齐军 committed
75
        implementation project(":api:fm")
万齐军 committed
76
        implementation project(":api:consultant")
刘鹏 committed
77
        implementation project(':api:confide')
konghaorui committed
78 79
    }else {
        //发布时使用
konghaorui committed
80
        compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
konghaorui committed
81 82 83 84 85 86 87
        compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-tests-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-course-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-fm-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-consultant-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-confide-api"]
konghaorui committed
88 89 90 91 92 93
        api rootProject.ext.dependencies["ydl-webview"]
        api(rootProject.ext.dependencies["ydl-platform"]) {
            transitive = true
        }
    }
}