forked from 0312birdzhang/Zabbix4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (87 loc) · 2.81 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.7
jar.baseName = 'Zabbix4j'
jar.libsDir = './lib'
group = "com.github.0312birdzhang"
archivesBaseName = "Zabbix4j"
version = '0.1.9'
repositories {
mavenCentral()
}
dependencies {
compile group: 'ch.qos.logback', name:'logback-classic', version:'1.2.3'
compile group: 'org.slf4j', name:'slf4j-simple', version:'1.7.7'
compile group: 'org.slf4j', name:'log4j-over-slf4j', version:'1.7.25'
compile group: 'com.google.code.gson', name:'gson', version:'2.8.5'
compile group: 'org.apache.httpcomponents', name:'httpclient', version:'4.5.6'
compile group: 'org.projectlombok', name:'lombok', version:'1.18.2'
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
compile fileTree(dir: 'libs', include: '*.jar')
}
compileJava {
options.compilerArgs = ['-Xlint:deprecation', '-Xlint:unchecked']
}
task installDependencies << {
new File('./lib').mkdirs()
copy {
from configurations.compile
into './lib'
}
}
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
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"){
authentication(userName: "BirdZhang", password: "")
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/"){
authentication(userName: "BirdZhang", password: "")
}
pom.project {
name 'zabbix4j'
packaging 'jar'
// optionally artifactId can be defined here
description 'Zabbix API library for the Java language.'
url 'https://github.com/0312birdzhang/Zabbix4j'
scm {
connection 'scm:svn:http://github.com/0312birdzhang/Zabbix4j'
developerConnection 'scm:svn:https://github.com/0312birdzhang/Zabbix4j'
url 'https://github.com/0312birdzhang/Zabbix4j'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id '0312birdzhang'
name 'BirdZhang'
email '[email protected]'
}
}
}
}
}
}