build.gradle 1.53 KB
Newer Older
1 2 3 4
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
严久程 committed
5
apply from: "../maven_push.gradle"
6 7

android {
8 9
    compileSdkVersion 28

10 11

    defaultConfig {
12
        minSdkVersion 21
13
        targetSdkVersion 28
14 15 16
        versionCode 1
        versionName "1.0"

YKai committed
17
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
18 19 20 21 22 23 24 25 26 27

    }

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

28 29 30 31 32
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

33 34 35
}

dependencies {
36
    api fileTree(dir: 'libs', include: ['*.jar','*.aar'])
37

YKai committed
38 39 40 41
    implementation 'androidx.appcompat:appcompat:1.2.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
严久程 committed
42
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
43

严久程 committed
44 45 46
    if (rootProject.ext.dev_mode){
        //开发时使用
        api project(':ydl-platform')
yjiucheng committed
47
        implementation modularPublication('com.ydl:m-im-api')
严久程 committed
48
    }else {
yjiucheng committed
49
        compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
严久程 committed
50 51 52 53 54
        //发布时使用
        api(rootProject.ext.dependencies["ydl-platform"]) {
            transitive = true
        }
    }
55
}
56 57 58 59 60 61 62

repositories {
    flatDir {
        dirs 'libs'
    }
    mavenCentral()
}