1- // 文件开头配置
2- apply plugin : ' com.android.library'
3- apply plugin : ' com.novoda.bintray-release'
4-
5- android {
6- compileSdkVersion 26
7-
8- // 使用 JDK 1.8
9- compileOptions {
10- targetCompatibility JavaVersion . VERSION_1_8
11- sourceCompatibility JavaVersion . VERSION_1_8
12- }
13-
14- defaultConfig {
15- minSdkVersion 14
16- targetSdkVersion 26
17- versionCode 50
18- versionName " 5.0"
19- }
20- }
21-
22- dependencies {
23- compileOnly ' com.squareup.okhttp3:okhttp:3.12.1'
24- compileOnly ' com.android.support:support-fragment:26.0.0'
25- }
26-
27- publish {
28- userOrg = ' getactivity' // 填写bintray用户名,注意大小写
29- groupId = ' com.hjq' // 定义的maven group id最终引用形式
30- artifactId = ' http' // maven的artifact id
31- version = ' 5.0' // maven 上发布版本号
32- description = ' Easy-to-use network request framework' // 描述,自己定义
33- website = " https://github.com/getActivity/EasyHttp" // 项目在github中的地址
34- }
35-
36- tasks. withType(Javadoc ) {// 防止编码问题
37- options. addStringOption(' Xdoclint:none' , ' -quiet' )
38- options. addStringOption(' encoding' , ' UTF-8' )
39- options. addStringOption(' charSet' , ' UTF-8' )
40- }
41-
42- task sourcesJar (type : Jar ) {
43- from android. sourceSets. main. java. srcDirs
44- classifier = ' sources'
45- }
46-
47- task javadoc (type : Javadoc ) {
48- source = android. sourceSets. main. java. srcDirs
49- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
50- }
51-
52- task javadocJar (type : Jar , dependsOn : javadoc) {
53- classifier = ' javadoc'
54- from javadoc. destinationDir
55- }
56-
57- artifacts {
58- archives javadocJar
59- archives sourcesJar
1+ // 文件开头配置
2+ apply plugin : ' com.android.library'
3+ apply plugin : ' com.novoda.bintray-release'
4+
5+ android {
6+ compileSdkVersion 26
7+
8+ // 使用 JDK 1.8
9+ compileOptions {
10+ targetCompatibility JavaVersion . VERSION_1_8
11+ sourceCompatibility JavaVersion . VERSION_1_8
12+ }
13+
14+ defaultConfig {
15+ minSdkVersion 14
16+ targetSdkVersion 26
17+ versionCode 50
18+ versionName " 5.0"
19+ }
20+ }
21+
22+ dependencies {
23+ compileOnly ' com.squareup.okhttp3:okhttp:3.12.1'
24+ compileOnly ' com.android.support:support-fragment:26.0.0'
25+ }
26+
27+ publish {
28+ userOrg = ' getactivity' // 填写bintray用户名,注意大小写
29+ groupId = ' com.hjq' // 定义的maven group id最终引用形式
30+ artifactId = ' http' // maven的artifact id
31+ version = ' 5.0' // maven 上发布版本号
32+ description = ' Easy-to-use network request framework' // 描述,自己定义
33+ website = " https://github.com/getActivity/EasyHttp" // 项目在github中的地址
34+ }
35+
36+ tasks. withType(Javadoc ) {// 防止编码问题
37+ options. addStringOption(' Xdoclint:none' , ' -quiet' )
38+ options. addStringOption(' encoding' , ' UTF-8' )
39+ options. addStringOption(' charSet' , ' UTF-8' )
40+ }
41+
42+ task sourcesJar (type : Jar ) {
43+ from android. sourceSets. main. java. srcDirs
44+ classifier = ' sources'
45+ }
46+
47+ task javadoc (type : Javadoc ) {
48+ source = android. sourceSets. main. java. srcDirs
49+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
50+ }
51+
52+ task javadocJar (type : Jar , dependsOn : javadoc) {
53+ classifier = ' javadoc'
54+ from javadoc. destinationDir
55+ }
56+
57+ artifacts {
58+ archives javadocJar
59+ archives sourcesJar
6060}
0 commit comments