forked from yanq/gspider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
91 lines (73 loc) · 2.29 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
group 'xyz.itbang'
version '3.1.1'
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing' //使用signing plugin做数字签名
sourceCompatibility = 1.8
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.10'
compile 'org.jsoup:jsoup:1.10.2'
compile 'org.slf4j:slf4j-api:1.7.22'
//jetty
compile 'org.eclipse.jetty.aggregate:jetty-all:9.4.5.v20170502'//hessian
compile 'com.caucho:hessian:4.0.38'
runtime 'ch.qos.logback:logback-classic:1.2.1'
testCompile 'junit:junit:4.11'
//for test
//testCompile "org.bitbucket.cowwoc:diff-match-patch:1.1"
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: userName, password: password)
}
pom.project {
name "gspider"
packaging 'jar'
description 'a groovy spider.'
url 'https://github.com/yanq/gspider'
scm {
url 'https://github.com/yanq/gspider.git'
connection 'https://github.com/yanq/gspider.git'
developerConnection 'https://github.com/yanq/gspider.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'JackYan'
name 'Jack Yan'
}
}
}
}
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
signing {
sign configurations.archives
}