Skip to content

Commit

Permalink
Add signing and publication information
Browse files Browse the repository at this point in the history
  • Loading branch information
hasselg committed Jul 13, 2021
1 parent 84442cc commit 8425214
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.github.johnrengelman.shadow' version '5.2.0'
}

repositories {
mavenCentral()
}

version = '1.0-SNAPSHOT'
version = '1.0.0'
group = 'io.github.par-government'

shadowJar {
Expand All @@ -29,8 +30,7 @@ publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
artifact sourceJar
artifact javadocJar
artifacts = [shadowJar, sourceJar, javadocJar]

pom {
name = 'PAR JWeather'
Expand Down Expand Up @@ -64,6 +64,23 @@ publishing {
}
}
}

repositories {
maven {
name = 'sonatype'
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username "$mavenUser"
password "$mavenPassword"
}
}
}
}

signing {
sign publishing.publications.shadow
}

dependencies {
Expand Down

0 comments on commit 8425214

Please sign in to comment.