Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
65 lines (57 loc) · 1.76 KB

File metadata and controls

65 lines (57 loc) · 1.76 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
55
56
57
58
59
60
61
62
63
64
65
// 通用配置
android {
// 编译源码版本
compileSdkVersion 30
defaultConfig {
// 最低安装版本
minSdkVersion 21
// 目标适配版本
targetSdkVersion 30
versionName '1.0'
versionCode 10
}
// 支持 Java JDK 8
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
// 设置存放 so 文件的目录
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
// 可在 Studio 最左侧中的 Build Variants 选项中切换默认的构建类型
buildTypes {
// 调试版本
debug {}
// 预览版本
preview {}
// 正式版本
release {}
}
// 代码警告配置
lintOptions {
// 禁用文本硬编码警告
disable 'HardcodedText'
// 禁用图片描述警告
disable 'ContentDescription'
}
}
afterEvaluate {
// 前提条件是这个 Module 工程必须是 Library 类型,并且排除名为 umeng 的 Module 工程
if (android.defaultConfig.applicationId == null && "umeng" != getName()) {
// 排除 BuildConfig.class
generateReleaseBuildConfig.enabled = false
generatePreviewBuildConfig.enabled = false
generateDebugBuildConfig.enabled = false
}
}
dependencies {
// 依赖 libs 目录下所有的 jar 和 aar 包
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
// AndroidX 库:https://github.com/androidx/androidx
implementation 'androidx.appcompat:appcompat:1.3.1'
// Material 库:https://github.com/material-components/material-components-android
implementation 'com.google.android.material:material:1.4.0'
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.