forked from yavijava/yavijava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
141 lines (119 loc) · 3.69 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'groovy'
group = "com.toastcoders"
archivesBaseName = "yavijava"
version = '6.0.05-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
targetCompatibility = 1.6
sourceCompatibility = 1.6
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.directory.studio:org.dom4j.dom4j:1.6.1'
compile 'log4j:log4j:1.2.17'
compile 'org.apache.httpcomponents:httpclient:4.3.5'
compile 'org.projectlombok:lombok:1.16.6'
testCompile 'javax.servlet:javax.servlet-api:3.1.0'
testCompile 'junit:junit-dep:4.11'
testCompile 'junit:junit:4.12'
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
testCompile 'cglib:cglib-nodep:3.1'
testCompile 'org.objenesis:objenesis:2.1'
}
sourceSets {
main {
java {
}
}
intTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
groovy {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
test {
java {
}
groovy {
}
}
}
configurations {
intTestCompile.extendsFrom testCompile
intTestRuntime.extendsFrom testRuntime
}
task intTest(type:Test){
description = "Run integration tests (located in src/intTest/...)."
testClassesDir = project.sourceSets.intTest.output.classesDir
classpath = project.sourceSets.intTest.runtimeClasspath
}
test {
testLogging {
events 'started', 'passed'
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
def ossrhUsername = hasProperty('ossrhUsername') ? ossrhUsername : ''
def ossrhPassword = hasProperty('ossrhPassword') ? ossrhPassword : ''
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'yavijava'
packaging 'jar'
// optionally artifactId can be defined here
description 'Java library for VMware vSphere'
url 'https://github.com/yavijava/yavijava'
scm {
connection 'scm:git:https://github.com/yavijava/yavijava.git'
developerConnection 'scm:git:https://github.com/yavijava/yavijava.git'
url 'https://github.com/yavijava/yavijava'
}
licenses {
license {
name 'BSD'
url 'http://opensource.org/licenses/BSD-3-Clause'
}
}
developers {
developer {
id 'michaelrice'
name 'Michael Rice'
email '[email protected]'
}
}
}
}
}
}