@@ -11,9 +11,7 @@ buildscript {
1111
1212plugins {
1313 id " java-library"
14- id " maven-publish"
15- id " signing"
16- id(" io.github.gradle-nexus.publish-plugin" ) version " 2.0.0"
14+ id " com.vanniktech.maven.publish" version " 0.34.0"
1715}
1816
1917apply plugin : ' idea'
@@ -45,56 +43,35 @@ dependencies {
4543 testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.8.2'
4644}
4745
48- publishing {
49- publications {
50- mavenJava(MavenPublication ) {
51- from components. java
52- artifactId = ' messente-api'
53-
54- pom {
55- name = " messente-api"
56- description = " Messente API - Connecting Services to People"
57- url = " https://github.com/messente/messente-api-java"
58- inceptionYear = " 2019"
59- licenses {
60- license {
61- name = " The Apache Software License, Version 2.0"
62- url = " http://www.apache.org/licenses/LICENSE-2.0.txt"
63- distribution = " repo"
64- }
65- }
66- developers {
67- developer {
68- id = " messente"
69- name = " Messente Communications OU"
70- email = " developers@messente.com"
71- }
72- }
73- scm {
74- connection = " scm:https://github.com/messente/messente-api-java.git"
75- developerConnection = " scm:git@github.com:messente/messente-api-java.git"
76- url = " https://github.com/messente/messente-api-java"
77- }
46+ import com.vanniktech.maven.publish.SonatypeHost
47+ mavenPublishing {
48+ publishToMavenCentral(SonatypeHost . DEFAULT )
49+ signAllPublications()
50+
51+ pom {
52+ name = " messente-api"
53+ description = " Messente API - Connecting Services to People"
54+ url = " https://github.com/messente/messente-api-java"
55+ inceptionYear = " 2019"
56+ licenses {
57+ license {
58+ name = " The Apache Software License, Version 2.0"
59+ url = " http://www.apache.org/licenses/LICENSE-2.0.txt"
60+ distribution = " repo"
7861 }
7962 }
80- }
81- repositories {
82- mavenCentral()
83- }
84- }
85-
86- nexusPublishing {
87- repositories {
88- sonatype()
89- }
90- }
91-
92- def skipSigning = project. hasProperty(' skipSigning' )
93-
94- // Configure signing only if skipSigning property is not set
95- if (! skipSigning) {
96- signing {
97- sign publishing. publications. mavenJava
63+ developers {
64+ developer {
65+ id = " messente"
66+ name = " Messente Communications OU"
67+ email = " developers@messente.com"
68+ }
69+ }
70+ scm {
71+ connection = " scm:https://github.com/messente/messente-api-java.git"
72+ developerConnection = " scm:git@github.com:messente/messente-api-java.git"
73+ url = " https://github.com/messente/messente-api-java"
74+ }
9875 }
9976}
10077
@@ -109,7 +86,6 @@ sourceSets {
10986java {
11087 sourceCompatibility = JavaVersion . VERSION_1_8
11188 targetCompatibility = JavaVersion . VERSION_1_8
112- withJavadocJar()
11389 withSourcesJar()
11490}
11591
0 commit comments