mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Maven publish fixes
This commit is contained in:
parent
adf98c5a8c
commit
f3f63aa0f7
2 changed files with 24 additions and 33 deletions
25
build.gradle
25
build.gradle
|
@ -12,7 +12,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "io.codearte.nexus-staging" version "0.30.0"
|
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
|
||||||
id 'org.gradlex.extra-java-module-info' version '1.8' apply false
|
id 'org.gradlex.extra-java-module-info' version '1.8' apply false
|
||||||
id("com.diffplug.spotless") version "6.25.0" apply false
|
id("com.diffplug.spotless") version "6.25.0" apply false
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,26 @@ subprojects {subproject ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def user = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : System.getenv('SONATYPE_USERNAME')
|
||||||
|
def pass = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : System.getenv('SONATYPE_PASSWORD')
|
||||||
|
|
||||||
|
tasks.withType(GenerateModuleMetadata) {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
nexusPublishing {
|
||||||
|
repositories {
|
||||||
|
sonatype {
|
||||||
|
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/'))
|
||||||
|
snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))
|
||||||
|
username = user
|
||||||
|
password = pass
|
||||||
|
}
|
||||||
|
}
|
||||||
|
useStaging = true
|
||||||
|
}
|
||||||
|
|
||||||
var devProps = file("$rootDir/app/dev.properties")
|
var devProps = file("$rootDir/app/dev.properties")
|
||||||
if (!devProps.exists()) {
|
if (!devProps.exists()) {
|
||||||
devProps.text = file("$rootDir/gradle/gradle_scripts/dev_default.properties").text
|
devProps.text = file("$rootDir/gradle/gradle_scripts/dev_default.properties").text
|
||||||
|
@ -212,3 +232,6 @@ task testAll(type: DefaultTask) {
|
||||||
}
|
}
|
||||||
finalizedBy(testReport)
|
finalizedBy(testReport)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group = 'io.xpipe'
|
||||||
|
version = versionString
|
|
@ -3,39 +3,7 @@ java {
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
def repoUrl = !rootProject.isFullRelease ? 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
|
||||||
: 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
|
||||||
def user = project.hasProperty('sonatypeUsername') ? project.property('sonatypeUsername') : System.getenv('SONATYPE_USERNAME')
|
|
||||||
def pass = project.hasProperty('sonatypePassword') ? project.property('sonatypePassword') : System.getenv('SONATYPE_PASSWORD')
|
|
||||||
|
|
||||||
if (rootProject.isFullRelease) {
|
|
||||||
publish.finalizedBy(rootProject.getTasks().getByName('closeAndReleaseRepository'))
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(GenerateModuleMetadata) {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
setUrl repoUrl
|
|
||||||
credentials {
|
|
||||||
setUsername user
|
|
||||||
setPassword pass
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
|
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
|
||||||
sign publishing.publications.mavenJava
|
sign publishing.publications.mavenJava
|
||||||
}
|
}
|
||||||
|
|
||||||
nexusStaging {
|
|
||||||
serverUrl = "https://s01.oss.sonatype.org/service/local/"
|
|
||||||
packageGroup = "io.xpipe"
|
|
||||||
username = user
|
|
||||||
password = pass
|
|
||||||
}
|
|
Loading…
Reference in a new issue