diff --git a/build.gradle b/build.gradle index edcd1d48bb..b3910522eb 100644 --- a/build.gradle +++ b/build.gradle @@ -15,18 +15,38 @@ buildscript { classpath 'org.hibernate.build.gradle:version-injection-plugin:1.0.0' classpath 'gradle.plugin.com.github.lburgazzoli:gradle-karaf-plugin:0.5.1' classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath 'de.thetaphi:forbiddenapis:3.0.1' } } plugins { id 'me.champeau.buildscan-recipes' version '0.2.3' + id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' + id 'nu.studer.credentials' version '2.1' apply false id 'org.hibernate.build.xjc' version '2.0.1' apply false id 'org.hibernate.build.maven-repo-auth' version '3.0.3' apply false id 'biz.aQute.bnd' version '5.1.1' apply false } +ext { + sonatypeOssrhUser = project.findProperty( 'SONATYPE_OSSRH_USER' ) + sonatypeOssrhPassword = project.findProperty( 'SONATYPE_OSSRH_PASSWORD' ) +} + +// nexusPublishing uses group and version +// as defaults +group = project.group +version = project.version + +nexusPublishing { + repositories { + sonatype { + username = project.sonatypeOssrhUser + password = project.sonatypeOssrhPassword + } + } +} + allprojects { repositories { mavenCentral() @@ -40,6 +60,9 @@ allprojects { } apply plugin: 'idea' + group = project.group + version = project.version + // minimize changes, at least for now (gradle uses 'build' by default).. buildDir = "target" diff --git a/gradle/published-java-module.gradle b/gradle/published-java-module.gradle index ac2a152860..cfee264828 100644 --- a/gradle/published-java-module.gradle +++ b/gradle/published-java-module.gradle @@ -165,6 +165,6 @@ publishing { task ciBuild( dependsOn: [test, publish] ) -task release( dependsOn: [test, bintrayUpload] ) -bintrayUpload.mustRunAfter test +task release( dependsOn: [test, publishToSonatype] ) +publishToSonatype.mustRunAfter test diff --git a/gradle/publishing-repos.gradle b/gradle/publishing-repos.gradle index e78d632903..0d33df825d 100644 --- a/gradle/publishing-repos.gradle +++ b/gradle/publishing-repos.gradle @@ -10,16 +10,6 @@ apply from: rootProject.file( 'gradle/base-information.gradle' ) apply plugin: 'maven-publish' apply plugin: 'org.hibernate.build.maven-repo-auth' -apply plugin: 'com.jfrog.bintray' - - -ext { - bintrayUser = project.findProperty( 'PERSONAL_BINTRAY_USER' ) - bintrayKey = project.findProperty( 'PERSONAL_BINTRAY_API_KEY' ) - sonatypeOssrhUser = project.findProperty( 'SONATYPE_OSSRH_USER' ) - sonatypeOssrhPassword = project.findProperty( 'SONATYPE_OSSRH_PASSWORD' ) -} - publishing { publications { @@ -34,39 +24,6 @@ publishing { } } -bintray { - user = project.bintrayUser - key = project.bintrayKey - - publications = ['publishedArtifacts'] - - pkg { - userOrg = 'hibernate' - repo = 'artifacts' - name = 'hibernate-orm' - - publish = true - - version { - name = project.version - released = new Date() - vcsTag = project.version - gpg { - sign = true - } - attributes = [ - 'jpa': project.jpaVersion, - 'family': project.ormVersion.family - ] - mavenCentralSync { - sync = true - user = project.sonatypeOssrhUser - password = project.sonatypeOssrhPassword - } - } - } -} - model { tasks.generatePomFileForPublishedArtifactsPublication { destination = file( "${buildDir}/generated-pom.xml" ) diff --git a/hibernate-infinispan/hibernate-infinispan.gradle b/hibernate-infinispan/hibernate-infinispan.gradle index 399c41ec25..893f58bf0f 100644 --- a/hibernate-infinispan/hibernate-infinispan.gradle +++ b/hibernate-infinispan/hibernate-infinispan.gradle @@ -32,4 +32,4 @@ publishing { } } -task release( dependsOn: bintrayUpload ) \ No newline at end of file +task release( dependsOn: publishToSonatype ) \ No newline at end of file