Skip to content

Commit

Permalink
Replace nexus publish/staging plugin (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinayagarwal authored Oct 7, 2022
1 parent 0780ae2 commit 162521c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
23 changes: 16 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import java.time.Duration

plugins {
id 'java-library'
id 'io.codearte.nexus-staging' version '0.21.1'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id "org.openjfx.javafxplugin" version "0.0.10" apply false
id 'de.marcphilipp.nexus-publish' version '0.4.0' apply false
}

if (System.getProperty('os.name').toLowerCase().contains("mac")) {
Expand Down Expand Up @@ -35,12 +36,20 @@ subprojects {
}
}

nexusStaging {
nexusPublishing {
packageGroup = 'com.gluonhq'
username = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : ''
password = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : ''
numberOfRetries = 30
delayBetweenRetriesInMillis = 5000
repositories {
sonatype {
username = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : ''
password = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : ''
}
}
clientTimeout = Duration.ofMinutes(5)
connectTimeout = Duration.ofMinutes(5)
transitionCheckOptions {
maxRetries.set(30)
delayBetween.set(Duration.ofMillis(5000))
}
}

task copyModuleSources {
Expand Down
12 changes: 0 additions & 12 deletions gradle/mavenPublish.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
apply from: rootProject.file("gradle/native-build.gradle")

import java.time.Duration

apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'de.marcphilipp.nexus-publish'

jar {
exclude "**/impl/Desktop**", "**/impl/IOS**", "**/impl/Android**", "META-INF/substrate"
Expand Down Expand Up @@ -89,12 +86,3 @@ signing {
sign publishing.publications.maven
required = { gradle.taskGraph.hasTask(publish) && !version.endsWith("SNAPSHOT") }
}

nexusPublishing {
repositories {
sonatype()
}
// credentials are shared from staging plugin
clientTimeout = Duration.ofMinutes(5)
connectTimeout = Duration.ofMinutes(5)
}

0 comments on commit 162521c

Please sign in to comment.