-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (60 loc) · 2.52 KB
/
build.gradle
File metadata and controls
71 lines (60 loc) · 2.52 KB
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
66
67
68
69
70
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://dl.bintray.com/umsdk/release' }
jcenter()
google()
mavenLocal() // 使用本地仓库
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
//this 5.9.0 version realm plugin cause Failed resolution of: Landroid/support/v7/appcompat/R$drawable;
//classpath "io.realm:realm-gradle-plugin:5.9.0"
classpath "io.realm:realm-gradle-plugin:6.0.2"
classpath "com.tencent.bugly:tinker-support:1.1.1"//tinker support
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url 'https://maven.aliyun.com/repository/public/' }
jcenter()
google()
mavenLocal() // 使用本地仓库
flatDir { dirs 'libs' } //配置依赖第三方jar/aar包的目录
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Define versions in a single place
ext {
//修改compileSdkVersion并不会影响我们的我们生成的app在手机先的行为。最理想的情况就是把compileSdkVersion设置到最高
compileSdkVersion = 28
//构建工具的版本号是多少,规则是可以用高的构建工具来构建低版本Sdk的工程。使用build-tools目录中的最大版本号即可
buildToolsVersion = '28.0.3'
//apk运行要求最低的Sdk,低于这个版本号的安卓无法安装
minSdkVersion = 21
//targetSdkVersion的设置主要是当系统版本高于设置的target的时候。然后targetSdkVersion最好和compileSdkVersion一样
targetSdkVersion = 26
//和compileSdk版本相差过大会报错
// supportLibraryVer = "27.1.1"
supportLibraryVer = "28.0.0"
androidDependencies = [
appcompat_v7: "com.android.support:appcompat-v7:${supportLibraryVer}",
design : "com.android.support:design:${supportLibraryVer}",
support_v4 : "com.android.support:support-v4:${supportLibraryVer}",
recyclerView: "com.android.support:recyclerview-v7:${supportLibraryVer}",
]
// App dependencies
glideVersion = '4.8.0'
rxjavaVersion = '1.3.1'
rxAndroidVersion = '1.2.1'
retrofitVersion = '2.3.0'
okhttpVersion = '3.9.0'
timberVersion = '4.5.1'
versionCode = 1102
versionName = '1.1.0.2'
}