build.gradle 2.54 KB
import java.text.SimpleDateFormat

apply plugin: 'com.android.library'


def T_RTC_SDK = '7.9.9568'

// versionCode按时间自增
static def increasedVersionCode(){
    return (int)(System.currentTimeMillis()/1000/60)
}

def baseVersion = rootProject.ext.sdkVersion

static def buildTime() {
    def df = new SimpleDateFormat("MMddHHmm")
    return df.format(new Date())
}

def video =  "2.0.2.12291101"


def videoName =  "video_small"

android {
    compileSdkVersion 28

    defaultConfig {

        useLibrary 'org.apache.http.legacy'

        minSdkVersion 17
        targetSdkVersion 28
        versionCode increasedVersionCode()
        versionName "${baseVersion}.${buildTime()}"

        ndk {
            //设置支持的SO库架构
            abiFilters "armeabi-v7a","armeabi","arm64-v8a"//, "x86","arm64-v8a","x86_64"
        }

        consumerProguardFiles 'proguard-rules.pro'
    }

    buildTypes {

        release {
            minifyEnabled false
//            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            buildConfigField('boolean',"PRINT_LOG","${rootProject.ext.isPrint}")
            buildConfigField('boolean',"TV_MODEL","${rootProject.ext.isTV}")
            buildConfigField('boolean',"SOUND_MODEL","${rootProject.ext.isSound}")
            buildConfigField('String',"SDK_VERSION","\"${rootProject.ext.sdkVersion}\"")
        }
        debug{

            minifyEnabled false
//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField('boolean',"PRINT_LOG","${rootProject.ext.isPrint}")
            buildConfigField('boolean',"TV_MODEL","${rootProject.ext.isTV}")
            buildConfigField('boolean',"SOUND_MODEL","${rootProject.ext.isSound}")
            buildConfigField('String',"SDK_VERSION","\"${rootProject.ext.sdkVersion}\"")
        }
    }

    lintOptions
            {
                checkReleaseBuilds false
                abortOnError false
            }

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

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.2.0'

    implementation 'androidx.recyclerview:recyclerview:1.1.0'

    implementation 'com.github.bumptech.glide:glide:4.9.0'

    api 'com.hhmedic.android.sdk:okhttputils:1.0.0.12311516'

    implementation 'com.google.code.gson:gson:2.8.0'

    implementation "com.tencent.liteav:LiteAVSDK_TRTC:$T_RTC_SDK"

}