build.gradle 1.92 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../maven_push.gradle"
kapt {
    arguments {
        arg("AROUTER_MODULE_NAME", "webview")
    }
}
android {
    compileSdkVersion 28


    defaultConfig {
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [AROUTER_MODULE_NAME: "webview"]
            }
        }

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    kapt 'com.alibaba:arouter-compiler:1.2.2'
51

konghaorui committed
52
    api rootProject.ext.dependencies["ydl-user-router"]
konghaorui committed
53
    api fileTree(dir: 'libs', include: ['*.jar'])
严久程 committed
54 55

    api 'com.tencent.tbs.tbssdk:sdk:43697'
konghaorui committed
56 57 58 59
    if (rootProject.ext.dev_mode){
        //开发时使用
        api project(':ydl-platform')
        implementation modularPublication('com.ydl:m-user-api')
konghaorui committed
60 61 62
        implementation modularPublication('com.ydl:m-dynamic-api')
        implementation modularPublication('com.ydl:m-im-api')

konghaorui committed
63 64 65
    }else {
        //发布时使用
        compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
konghaorui committed
66 67
        compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
konghaorui committed
68 69 70 71
        api(rootProject.ext.dependencies["ydl-platform"]) {
            transitive = true
        }
    }
72

73 74
}