1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // 通用配置
- android {
-
- // 编译源码版本
- compileSdkVersion 30
- defaultConfig {
- // 最低安装版本
- minSdkVersion 21
- // 目标适配版本
- targetSdkVersion 30
- versionName '1.0'
- versionCode 10
- //versionCode new Date().format("yyyyMMdd") as int
- }
-
- // 支持 Java JDK 8
- compileOptions {
- targetCompatibility JavaVersion.VERSION_1_8
- sourceCompatibility JavaVersion.VERSION_1_8
- }
-
- // 设置存放 so 文件的目录
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
-
- // 代码警告配置
- lintOptions {
- // 禁用文本硬编码警告
- disable 'HardcodedText'
- }
-
- // 可在 Studio 左侧 Build Variants 选项中切换默认的构建模式
- buildTypes {
- // 调试版本
- debug {}
- // 预览版本
- preview {}
- // 正式版本
- release {}
- }
- }
-
- dependencies {
- // 依赖 libs 目录下所有的 jar 和 aar 包
- implementation fileTree(include: ["*.jar", '*.aar'], dir: "libs")
-
- // 谷歌兼容库:https://developer.android.google.cn/jetpack/androidx/releases/appcompat?hl=zh-cn
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.2.1'
- }
|