Skip to content

Commit a313d80

Browse files
committed
Release to oss.sonatype.org instead of bintray
1 parent c882828 commit a313d80

File tree

3 files changed

+17
-29
lines changed

3 files changed

+17
-29
lines changed

build.gradle

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ buildscript {
66

77
plugins {
88
id 'java-library'
9+
id 'maven-publish'
10+
id 'signing'
911
id 'jacoco'
10-
id 'eclipse'
11-
id 'idea'
1212

13-
id 'maven-publish'
1413
id 'org.sonarqube' version '3.1.1'
15-
id 'com.jfrog.bintray' version '1.8.5'
1614
}
1715

1816
group = 'de.cronn'
@@ -58,7 +56,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
5856

5957
publishing {
6058
publications {
61-
CronnPublication(MavenPublication) {
59+
mavenJava(MavenPublication) {
6260
groupId = project.group
6361
artifactId = project.name
6462
version = project.version
@@ -103,28 +101,20 @@ publishing {
103101
}
104102
}
105103
}
106-
}
107-
108-
bintray {
109-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
110-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
111-
112-
publications = ['CronnPublication']
113-
dryRun = false
114-
pkg {
115-
repo = 'maven'
116-
name = rootProject.name
117-
userOrg = 'cronn'
118-
licenses = ['Apache-2.0']
119-
websiteUrl = 'https://github.com/cronn/ssh-proxy'
120-
issueTrackerUrl = 'https://github.com/cronn/ssh-proxy/issues'
121-
vcsUrl = 'https://github.com/cronn/ssh-proxy.git'
122-
version {
123-
name = project.version
124-
released = new Date()
104+
repositories {
105+
maven {
106+
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
107+
credentials {
108+
username = project.hasProperty('nexusUsername') ? project.property('nexusUsername') : System.getenv('NEXUS_USERNAME')
109+
password = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : System.getenv('NEXUS_PASSWORD')
110+
}
125111
}
126112
}
127-
override = true
113+
}
114+
115+
signing {
116+
useGpgCmd()
117+
sign publishing.publications.mavenJava
128118
}
129119

130120
dependencies {
@@ -147,7 +137,6 @@ dependencies {
147137
details.status = 'milestone'
148138
}
149139
}
150-
151140
}
152141

153142
dependencyLocking {

gradle.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ org.ow2.asm:asm-tree:8.0.1=jacocoAnt
2424
org.ow2.asm:asm:8.0.1=jacocoAnt
2525
org.slf4j:jcl-over-slf4j:1.7.30=testRuntimeClasspath
2626
org.slf4j:slf4j-api:1.7.30=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
27-
empty=annotationProcessor,testAnnotationProcessor
27+
empty=annotationProcessor,signatures,testAnnotationProcessor

release.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/usr/bin/env bash
22

3-
# assuming that 'bintrayUser' and 'bintrayApiKey' is set in ~/.gradle/gradle.properties
4-
./gradlew bintrayUpload
3+
./gradlew --no-daemon clean build publish

0 commit comments

Comments
 (0)