-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
166 lines (147 loc) · 4.99 KB
/
build.gradle
File metadata and controls
166 lines (147 loc) · 4.99 KB
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
buildscript {
repositories {
mavenCentral()
}
dependencies {
}
}
plugins {
id 'idea'
id 'eclipse'
id 'java-library'
id 'maven-publish'
id 'org.jreleaser' version '1.24.0'
id 'signing'
id 'jacoco'
}
group = 'com.linbit.linstor.api'
version = '0.7.0'
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.register('execute', JavaExec) {
mainClass = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
tasks.register('sourcesJar', Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
tasks.register('javadocJar', Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test
reports {
html.required = true
xml.required = true
csv.required = true
}
}
publishing {
repositories {
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
}
publications {
maven(MavenPublication) {
artifactId = 'java-linstor'
from components.java
artifact javadocJar
artifact sourcesJar
pom {
name = 'java-linstor'
description = 'Linstor REST API library'
url = 'https://github.com/LINBIT/linstor-api-java'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'rp-'
name = 'Rene Peinthor'
email = 'rene.peinthor@linbit.com'
}
}
scm {
connection = 'scm:git:https://github.com/LINBIT/linstor-api-java.git'
developerConnection = 'scm:git:https://github.com/LINBIT/linstor-api-java.git'
url = 'https://github.com/LINBIT/linstor-api-java'
}
}
}
}
}
jreleaser {
release {
// Required by JReleaser's model, but we only deploy to Maven Central -
// skip creating any Git release/tag.
github {
repoOwner = 'LINBIT'
name = 'linstor-api-java'
skipRelease = true
skipTag = true
// releases are skipped, so this token is never used - placeholder to satisfy
// JReleaser's non-blank validation without requiring a real GitHub token.
token = 'unused'
}
}
signing {
active = 'ALWAYS'
armored = true
}
deploy {
maven {
mavenCentral {
sonatype {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
stagingRepository('build/staging-deploy')
}
}
}
}
}
ext {
swagger_annotations_version = "2.0.0"
jackson_version = "2.15.2"
jersey_version = "2.40"
junit_version = "4.12"
it.'signing.secretKeyRingFile' = project.findProperty('java-linstor.signing.secretKeyRingFile') ?:
project.findProperty('signing.secretKeyRingFile')
it.'signing.password' = project.findProperty('java-linstor.signing.password') ?:
project.findProperty('signing.password')
it.'signing.keyId' = project.findProperty('java-linstor.signing.keyId') ?:
project.findProperty('signing.keyId')
sonatypeUsername = project.findProperty('java-linstor.sonatype.username') ?:
project.findProperty('sonatype.username')
sonatypePassword = project.findProperty('java-linstor.sonatype.password') ?:
project.findProperty('sonatype.password')
sonatypeStagingProfileId = project.findProperty('java-linstor.sonatype.stagingProfileId') ?:
project.findProperty('sonatype.stagingProfileId')
}
dependencies {
implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version"
implementation "org.glassfish.jersey.core:jersey-client:$jersey_version"
implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
implementation "javax.activation:activation:1.1.1"
implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version"
testImplementation "junit:junit:$junit_version"
}