build.gradle 1.97 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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 {
16
        minSdkVersion 21
17 18 19 20
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

YKai committed
21
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
22 23 24 25 26 27
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [AROUTER_MODULE_NAME: "webview"]
            }
        }

konghaorui committed
28
        ndk {
霍志良 committed
29
            abiFilters "arm64-v8a"
konghaorui committed
30 31
        }

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
    }

    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'
konghaorui committed
55
    api rootProject.ext.dependencies["ydl-user-router"]
konghaorui committed
56
    api fileTree(include: ['*.jar'], dir: 'libs')
YKai committed
57
    api 'com.tencent.tbs.tbssdk:sdk:43903'
konghaorui committed
58
    if (rootProject.ext.dev_mode) {
konghaorui committed
59 60 61
        //开发时使用
        api project(':ydl-platform')
        implementation modularPublication('com.ydl:m-user-api')
konghaorui committed
62 63
        implementation modularPublication('com.ydl:m-dynamic-api')
        implementation modularPublication('com.ydl:m-im-api')
konghaorui committed
64
    } else {
konghaorui committed
65 66
        //发布时使用
        compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
konghaorui committed
67 68
        compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"]
        compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
konghaorui committed
69 70 71 72
        api(rootProject.ext.dependencies["ydl-platform"]) {
            transitive = true
        }
    }
73 74
}