-
Notifications
You must be signed in to change notification settings - Fork 68
/
build.gradle
87 lines (72 loc) · 2.67 KB
/
build.gradle
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
buildscript {
repositories {
jcenter() //你所使用的仓库
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.1' // Gradle 的Android 插件版本
}
}
apply plugin: 'com.android.library' // 导入Android Application 插件,将此module 配置成application module
repositories {
jcenter() // 仓库
}
android {
compileSdkVersion 22 // 使用SDK的版本,请配置你SDK中有的最新版本
buildToolsVersion "22.0.1" // buildTools 版本,你SDK中有哪个版本配哪个版本,建议更新到最新的版本
defaultConfig {
minSdkVersion 9
targetSdkVersion 22
versionCode 5
versionName "1.0.6"
}
buildTypes { // 配置打包的版本
release { // 发行版
minifyEnabled false // 是否混淆
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' // 默认混淆文件
// proguardFiles 'proguard-project.txt' // 自定义混淆文件
}
debug { // debug 版
}
}
sourceSets { // 如果你的工程是从ANT 中迁移过来,可以使用sourceSets 来配置工程结构,如果你使用的是标准Gradle 结构,可以不需要配置。
main {
java.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs'] // 配置此处才会打包jni 的.so 文件
jni.srcDirs=['jni']
manifest.srcFile 'AndroidManifest.xml'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
/**
* https://gradle.org/docs/current/dsl/org.gradle.api.artifacts.dsl.DependencyHandler.html
*/
dependencies {
// compile fileTree(dir: 'libs', include: ['*.jar'])
// compile 'com.github.wangjiegulu:AndroidBucket:1.0.1'
// compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.apache.httpcomponents:httpmime:4.3.6'
compile project(":AndroidBucket");
}