/
build.gradle
100 lines (82 loc) · 2.64 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
88
89
90
91
92
93
94
95
96
97
98
99
100
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
compileOnly project(':ImageLoaderLibrary')
}
/*********************上传jCenter依赖*********************/
apply plugin: 'com.novoda.bintray-release'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.novoda:bintray-release:0.8.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
/**避免中文注释:编码GBK的不可映射字符**/
tasks.withType(Javadoc) {
options {
encoding "UTF-8"
charSet 'UTF-8'
links "http://docs.oracle.com/javase/7/docs/api"
}
}
/**避免Javadocs错误:找不到引用**/
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
}
/**发布到我的Bintray仓库**/
def user = getPropertyValue('bintrayUser')
def key = getPropertyValue('bintrayKey')
def org = getPropertyValue('userOrg')
publish {
bintrayUser = user
bintrayKey = key
dryRun = false
userOrg = org
groupId = 'com.excellence'
artifactId = 'imageloader-glide'
publishVersion = '1.0.0'
desc = 'Glide图片加载器'
website = 'https://github.com/VeiZhang/ImageLoader'
licences = ['Apache-2.0']
}
/**读取bintray.key文件的key**/
def getPropertyValue(String key) {
if (key == null || key.length() == 0)
return null
File file = project.rootProject.file('../../bintray.key')
if (!file.exists())
return null
InputStream inputStream = file.newDataInputStream()
Properties properties = new Properties()
properties.load(inputStream)
//读取Key
return properties.getProperty(key)
}