forked from codyer/ElegantBus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-lib.gradle
64 lines (53 loc) · 1.55 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
60
61
62
63
64
/*
* ************************************************************
* 文件:config-lib.gradle 模块:ElegantBus 项目:ElegantBus
* 当前修改时间:2020年06月19日 21:59:35
* 上次修改时间:2020年06月19日 21:59:12
* 作者:Cody.yi https://github.com/codyer
*
* 描述:ElegantBus
* Copyright (c) 2020
* ************************************************************
*/
apply plugin: 'java-library'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
//指定编译的编码
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(Javadoc) {
options.encoding = "UTF-8"
}
task lint {}
if (!isNoDoc) {//本地仓库不需要注释
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.convention('sources')
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.convention('javadoc')
archiveClassifier.set('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/8/docs/api"
}
}
}
if (isLocalMaven) {
apply from: "${project.rootDir}/config-local-maven.gradle"
} else {
apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.codyer'
}