-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
135 lines (109 loc) · 3.39 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
apply from: rootProject.file('extras.gradle')
group = GROUP
version = VERSION
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
api group: 'com.github.tomtzook', name: 'notifier', version: '1.3.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.4.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.4.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-runner', version: '1.2.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.23.4'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '2.23.0'
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.1'
}
test {
useJUnitPlatform()
testLogging {
events "failed"
exceptionFormat "full"
showStackTraces true
}
}
jar {
archiveBaseName.set(project.name)
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveBaseName.set(project.name)
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveBaseName.set(project.name)
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
task javabeansAll(type: Jar, dependsOn: tasks.assemble) {
dependsOn sourcesJar
dependsOn javadocJar
archiveFileName.set('javabeans-all.jar')
destinationDirectory.set(rootProject.buildDir)
from files(subprojects.collect {
it.sourceSets.main.output
})
from files(subprojects.collect {
it.sourceSets.main.allSource
})
from files(subprojects.collect {
it.javadoc.destinationDir
})
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'javabeans'
description = 'Beans for Java'
url = 'https://github.com/tomtzook/JavaBeans'
licenses {
license {
name = 'Apache License 2.0'
url = ' http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id = 'tomtzook'
name = 'Tom Tzook'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/tomtzook/JavaBeans.git'
developerConnection = 'scm:git:ssh://github.com/tomtzook/JavaBeans.git'
url = 'https://github.com/tomtzook/JavaBeans'
}
}
}
}
repositories {
maven {
if (isReleaseBuild()) {
name = 'NexusStaging'
url = NEXUS_RELEASE_REPOSITORY_URL
} else {
name = 'NexusSnapshot'
url = NEXUS_SNAPSHOT_REPOSITORY_URL
}
credentials {
username getNexusUsername()
password getNexusPassword()
}
}
}
}
if (shouldSign()) {
signing {
sign publishing.publications.mavenJava
}
}