Skip to content

Commit e77aa78

Browse files
authored
Merge pull request #154 from tschoonj/tschoonj/issue149
Fix uploading jars to maven central
2 parents 96b628b + d6ea5db commit e77aa78

File tree

3 files changed

+23
-35
lines changed

3 files changed

+23
-35
lines changed

java/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ check-local:
5757
publishToMavenLocal:
5858
$(srcdir)/gradlew publishToMavenLocal
5959

60-
bintrayUpload:
61-
$(srcdir)/gradlew bintrayUpload
60+
publish:
61+
$(srcdir)/gradlew publish
6262

6363
endif
6464

java/build.gradle.in

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,16 @@ buildscript {
22
repositories {
33
mavenCentral()
44
}
5-
6-
dependencies {
7-
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:4.2.0'
8-
}
95
}
106

117
plugins {
12-
id 'com.adarshr.test-logger' version '1.7.0'
13-
id 'maven-publish'
14-
15-
id 'com.jfrog.bintray' version '1.8.4'
8+
id "java-library"
9+
id "com.adarshr.test-logger" version "2.1.1"
10+
id "maven-publish"
11+
id "signing"
12+
id "biz.aQute.bnd.builder" version "5.3.0"
1613
}
1714

18-
apply plugin: 'java'
19-
apply plugin: 'java-library'
20-
apply plugin: 'biz.aQute.bnd.builder'
21-
22-
2315
version = '4.0.0'
2416
group = 'com.github.tschoonj'
2517
sourceCompatibility = '1.8'
@@ -34,9 +26,9 @@ repositories {
3426

3527
dependencies {
3628
api 'org.apache.commons:commons-math3:3.6.1'
37-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
38-
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.4.2'
39-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
29+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
30+
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.1'
31+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
4032
}
4133

4234
sourceSets {
@@ -136,22 +128,18 @@ publishing {
136128
}
137129
}
138130
}
139-
}
140-
141-
bintray {
142-
user = 'tschoonj'
143-
key = System.getenv('BINTRAY_KEY')
144-
pkg {
145-
repo = 'maven'
146-
name = 'xraylib'
147-
userOrg = 'tschoonj'
148-
licenses = ['BSD 3-Clause']
149-
vcsUrl = 'https://github.com/tschoonj/xraylib.git'
150-
version {
151-
name = project.version
152-
released = new Date()
131+
repositories {
132+
maven {
133+
name = 'Sonatype'
134+
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
135+
credentials {
136+
username System.getenv('SONATYPE_USERNAME')
137+
password System.getenv('SONATYPE_PASSWORD')
138+
}
153139
}
154140
}
155-
// Upload the 'maven' publication i.e jar, sourcesJar, javadocJar, POM
156-
publications = ['maven']
157141
}
142+
143+
signing {
144+
sign publishing.publications.maven
145+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)