Skip to content

Commit

Permalink
Fix nexus publication
Browse files Browse the repository at this point in the history
  • Loading branch information
blootsvoets committed May 26, 2021
1 parent a160ac4 commit 0c4bbee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
19 changes: 15 additions & 4 deletions java-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

plugins {
id 'com.github.davidmc24.gradle.plugin.avro-base' version '1.1.0'
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

allprojects {
version = '0.7.0'
group = 'org.radarbase'
}

subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'idea'

// Configuration
version = '0.7.1-SNAPSHOT'
group = 'org.radarbase'
ext.githubRepoName = 'RADAR-base/RADAR-Schemas'

ext.githubUrl = "https://github.com/${githubRepoName}.git"
ext.issueUrl = "https://github.com/${githubRepoName}/issues"
ext.website = 'https://radar-base.org'
Expand Down Expand Up @@ -67,6 +69,15 @@ subprojects {
}
}

nexusPublishing {
repositories {
sonatype {
username = project.hasProperty("ossrh.user") ? project.property("ossrh.user") : System.getenv("OSSRH_USER")
password = project.hasProperty("ossrh.password") ? project.property("ossrh.password") : System.getenv("OSSRH_PASSWORD")
}
}
}

wrapper {
gradleVersion '7.0'
}
14 changes: 0 additions & 14 deletions java-sdk/gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,6 @@ publishing {
}
}
}

repositories {
maven {
name = "OSSRH"
credentials {
username = project.hasProperty("ossrh.user") ? project.property("ossrh.user") : System.getenv("OSSRH_USER")
password = project.hasProperty("ossrh.password") ? project.property("ossrh.password") : System.getenv("OSSRH_PASSWORD")
}

def releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
def snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
url = version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
}
}
}

signing {
Expand Down

0 comments on commit 0c4bbee

Please sign in to comment.