Fix gradle build when not publishing to sonatype and properties are missing
Gitea/Java-Installer/pipeline/head This commit looks good
Details
Gitea/Java-Installer/pipeline/head This commit looks good
Details
parent
017956ffef
commit
aaf2073b51
|
@ -10,6 +10,7 @@ plugins {
|
|||
|
||||
version = project.file("./VERSION").text.trim()
|
||||
def version = project.file("./VERSION").text.trim()
|
||||
def publishToNexus = "publishToSonatype" in gradle.startParameter.taskNames
|
||||
|
||||
group = "de.rpjosh"
|
||||
|
||||
|
@ -98,8 +99,8 @@ nexusPublishing {
|
|||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
|
||||
|
||||
// Or use System.getenv?
|
||||
username=project.property("maven.sonatype.user")
|
||||
password=project.property("maven.sonatype.password")
|
||||
username= publishToNexus ? project.property("maven.sonatype.user") : "none"
|
||||
password= publishToNexus ? project.property("maven.sonatype.password") : "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -139,8 +140,8 @@ publishing {
|
|||
}
|
||||
|
||||
signing {
|
||||
def signingKey = project.property("maven.sonatype.signing.key")
|
||||
def signingPassword = project.property("maven.sonatype.signing.password")
|
||||
def signingKey = publishToNexus ? project.property("maven.sonatype.signing.key") : ""
|
||||
def signingPassword = publishToNexus ? project.property("maven.sonatype.signing.password") : ""
|
||||
useInMemoryPgpKeys(signingKey, signingPassword)
|
||||
|
||||
// Only sign the publications
|
||||
|
|
|
@ -1,10 +1 @@
|
|||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* The settings file is used to specify which projects to include in your build.
|
||||
*
|
||||
* Detailed information about configuring a multi-project build in Gradle can be found
|
||||
* in the user manual at https://docs.gradle.org/6.6.1/userguide/multi_project_builds.html
|
||||
*/
|
||||
|
||||
rootProject.name = 'de.rpjosh.installer'
|
||||
|
|
Loading…
Reference in New Issue