forked from czp3009/bilibili-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (94 loc) · 3.58 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
101
102
103
104
105
106
107
108
109
group = 'com.hiczp'
version = '0.0.22'
description = 'Bilibili android client API library written in Java'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/com.squareup.retrofit2/retrofit
api group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.4.0'
// https://mvnrepository.com/artifact/com.squareup.retrofit2/converter-gson
api group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.4.0'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
api group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
// https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor
api group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.11.0'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
api group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
// https://mvnrepository.com/artifact/io.netty/netty-all
api group: 'io.netty', name: 'netty-all', version: '4.1.29.Final'
// https://mvnrepository.com/artifact/com.google.guava/guava
api group: 'com.google.guava', name: 'guava', version: '26.0-jre'
}
dependencies {
// https://mvnrepository.com/artifact/junit/junit
testCompile group: 'junit', name: 'junit', version: '4.12'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12
testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
}
task sourcesJar(type: Jar, dependsOn: classes) {
description 'Package source code to jar,'
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
description 'Package javadoc to jar,'
classifier = 'javadoc'
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
}
signing {
required { gradle.taskGraph.hasTask(uploadArchives) }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment ->
signing.signPom(deployment)
}
if (!project.hasProperty('ossUsername')) {
ext.ossUsername = ''
}
if (!project.hasProperty('ossPassword')) {
ext.ossPassword = ''
}
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: ossUsername, password: ossPassword)
}
pom.project {
name project.name
description project.description
url 'https://github.com/czp3009/bilibili-api'
scm {
connection 'scm:[email protected]:czp3009/bilibili-api.git'
developerConnection 'scm:[email protected]:czp3009/bilibili-api.git'
url '[email protected]:czp3009/bilibili-api.git'
}
licenses {
license {
name 'GNU GENERAL PUBLIC LICENSE Version 3'
url 'https://www.gnu.org/licenses/gpl-3.0.txt'
}
}
developers {
developer {
id 'czp'
//noinspection SpellCheckingInspection
name 'ZhiPeng Chen'
email '[email protected]'
url 'https://www.hiczp.com/'
}
}
}
}
}
}