build_gradle
程序员文章站
2022-06-24 10:07:58
apply plugin: 'com.android.application'android { compileSdkVersion rootProject.ext.android["compileSdkVersion"] buildToolsVersion rootProject.ext.android["buildToolsVersion"] defaultConfig { applicationId "json.chao.com.wanandroid" minSdkV...
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]
defaultConfig {
applicationId "json.chao.com.wanandroid"
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
//AndroidJunitRunner必须要显示指定在defaultConfig中,使用Gradle依赖管理无法使其生效
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
renderscriptTargetApi rootProject.ext.android["renderscriptTargetApi"]
renderscriptSupportModeEnabled true // Enable RS support
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//1.直接依赖第三方开源库,一般是托管在 jitpack 或者 jcenter
implementation 'com.google.code.gson:gson:2.2.4'
implementation 'com.android.support:cardview-v7:25.0.0'
implementation 'com.android.support:design:25.0.0'
//2.直接依赖本地的aar文件,一般是在libs目录下
implementation(name: 'LiteAVSDK_Professional_5.1.5293', ext: 'aar')
//3.直接依赖本地的jar文件
implementation files('libs/bdasr_V3_20170801_60da871.jar')
//4.依赖本地的model
implementation project(':wavelibrary')
implementation project(':android-ffmpeg')
//base
implementation rootProject.ext.dependencies["appcompat-v7"]
implementation rootProject.ext.dependencies["cardview-v7"]
implementation rootProject.ext.dependencies["design"]
implementation rootProject.ext.dependencies["constraint-layout"]
//net
implementation rootProject.ext.dependencies["gson"]
implementation rootProject.ext.dependencies["okhttp"]
implementation rootProject.ext.dependencies["retrofit"]
implementation rootProject.ext.dependencies["converter-gson"]
implementation rootProject.ext.dependencies["adapter-rxjava2"]
//dao
implementation rootProject.ext.dependencies["greendao"]
//rx
implementation rootProject.ext.dependencies["rxjava"]
implementation rootProject.ext.dependencies["rxandroid"]
implementation rootProject.ext.dependencies["rxbinding"]
implementation rootProject.ext.dependencies["rxpermissions"]
//UI测试
androidTestImplementation (rootProject.ext.dependencies["espresso-core"]) {
exclude group: 'com.android.support', module: 'support-annotations'
}
implementation (rootProject.ext.dependencies["espresso-idling-resource"]) {
exclude module: 'support-annotations'
}
}
本文地址:https://blog.csdn.net/mysailors/article/details/110630279
下一篇: Python中的变量与常量
推荐阅读