-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathconfig-lib.gradle
59 lines (49 loc) · 1.27 KB
/
config-lib.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
/*
* ************************************************************
* 文件:config-lib.gradle 模块:component 项目:component
* 当前修改时间:2019年04月23日 18:23:20
* 上次修改时间:2019年04月13日 08:44:03
* 作者:Cody.yi https://github.com/codyer
*
* 描述:component
* Copyright (c) 2019
* ************************************************************
*/
apply plugin: 'java-library'
sourceCompatibility = "7"
targetCompatibility = "7"
if (isLocalMaven) {
apply from: "${project.rootDir}/config-local-maven.gradle"
} else {
apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.codyer'
}
//指定编译的编码
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(Javadoc) {
options.encoding = "UTF-8"
}
task lint {}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
javadoc {
options {
// 语言
locale 'en_US'
encoding 'UTF-8'
charSet 'UTF-8'
links "http://docs.oracle.com/javase/7/docs/api"
}
}