forked from hibernate/hibernate-reactive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.gradle
151 lines (139 loc) · 4.89 KB
/
publish.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
142
143
144
145
146
147
148
149
150
151
apply plugin: 'maven-publish'
apply plugin: 'nu.studer.credentials'
apply plugin: 'com.jfrog.bintray'
// To publish snapshots:
// ./gradlew publish -PjbossNexusUser="<YOUR USERNAME>" -PjbossNexusPassword="<YOUR PASSWORD>"
// To release, see task ciRelease in release/build.gradle
ext {
// Credentials can be specified on the command-line using project properties,
// or stored locally using the gradle-credentials-plugin.
// See below for the name of project properties.
// See https://github.com/etiennestuder/gradle-credentials-plugin to store credentials locally.
if (!project.hasProperty('jbossNexusUser')) {
jbossNexusUser = credentials.jbossNexusUser
}
if (!project.hasProperty('jbossNexusPassword')) {
jbossNexusPassword = credentials.jbossNexusPassword
}
if (!project.hasProperty('bintrayUser')) {
bintrayUser = credentials.bintrayUser
}
if (!project.hasProperty('bintrayKey')) {
bintrayKey = credentials.bintrayKey
}
if (!project.hasProperty('sonatypeOssrhUser')) {
sonatypeOssrhUser = credentials.sonatypeOssrhUser
}
if (!project.hasProperty('sonatypeOssrhPassword')) {
sonatypeOssrhPassword = credentials.sonatypeOssrhPassword
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
jar {
manifest {
attributes(
// Basic JAR manifest attributes
'Specification-Title': project.name,
'Specification-Version': project.version,
'Specification-Vendor': 'Hibernate.org',
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'Hibernate.org',
'Implementation-Vendor-Id': 'org.hibernate',
'Implementation-Url': 'http://hibernate.org/reactive',
)
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options.addStringOption('Xdoclint:none', '-quiet')
}
publishing {
repositories {
// mavenLocal()
maven {
name 'jboss-snapshots-repository'
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
credentials {
username project.jbossNexusUser
password project.jbossNexusPassword
}
}
}
publications {
publishedArtifacts(MavenPublication) {
groupId = project.group
version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = project.mavenPomName
description = project.description
url = 'https://github.com/hibernate/hibernate-reactive'
organization {
name = 'Hibernate.org'
url = 'https://hibernate.org'
}
licenses {
license {
name = 'GNU Library General Public License v2.1 or later'
url = 'https://opensource.org/licenses/LGPL-2.1'
comments = 'See discussion at http://hibernate.org/community/license/ for more details.'
distribution = 'repo'
}
}
issueManagement {
system = 'github'
url = 'https://github.com/hibernate/hibernate-reactive/issues'
}
scm {
connection = 'scm:git:ssh://[email protected]/hibernate/hibernate-reactive.git'
developerConnection = 'scm:git:ssh://[email protected]/hibernate/hibernate-reactive.git'
url = 'https://github.com/hibernate/hibernate-reactive.git'
}
developers {
developer {
id = 'hibernate-team'
name = 'The Hibernate Development Team'
organization = 'Hibernate.org'
organizationUrl = 'https://hibernate.org'
}
}
}
}
}
}
bintray {
user = project.bintrayUser
key = project.bintrayKey
publications = ['publishedArtifacts']
pkg {
userOrg = 'hibernate'
repo = 'artifacts'
name = 'hibernate-reactive'
publish = true
version {
name = project.version
released = new Date()
vcsTag = project.version
gpg {
sign = true
}
mavenCentralSync {
sync = true
user = project.sonatypeOssrhUser
password = project.sonatypeOssrhPassword
}
}
}
}