Skip to content

Commit

Permalink
Merge pull request #2 from hasselg/publish_updates
Browse files Browse the repository at this point in the history
Publish configuration updates
  • Loading branch information
Sintrastes authored Nov 17, 2021
2 parents f17ee9f + 85b395d commit 6b6b4cc
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 58 deletions.
22 changes: 21 additions & 1 deletion atak-metadata-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {

apply plugin: 'maven-publish'
apply plugin: 'kotlin-kapt'
apply plugin: 'signing'

repositories {
jcenter()
Expand Down Expand Up @@ -80,6 +81,24 @@ afterEvaluate {
}
}
}

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.release
}
}

Expand Down Expand Up @@ -136,4 +155,5 @@ task androidJavadocsJar(type: Jar, dependsOn: dokkaJavadoc) {
task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
}

56 changes: 0 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,68 +21,12 @@ buildscript {
}
}

plugins {
id 'maven-publish'
id 'signing'
}

group = 'io.github.par-government'

allprojects {

repositories {
google()
mavenCentral()
maven {
url "https://jitpack.io"
}
}

publishing {
publications {
mavenPublication(MavenPublication) {
pom {
url = 'https://github.com/PAR-Government/partech-metadata-utils'
licenses {
license {
name = 'GNU Lesser General Public License, version 2.1'
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html'
}
}
developers {
developer {
name = 'Nathan Bedell'
email = '[email protected]'
organization = 'PAR Government Systems Corporation'
organizationUrl = 'https://pargovernment.net/'
}
}
scm {
connection = 'scm:git:git://github.com/PAR-Government/partech-metadata-utils.git'
developerConnection = 'scm:git:ssh://github.com:PAR-Government/partech-metadata-utils.git'
url = 'https://github.com/PAR-Government/partech-metadata-utils'
}
}
}
}

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
// TODO: Need to restore this when I get these credentials.
// credentials {
// username "$mavenUser"
// password "$mavenPassword"
// }
}
}
}

// TODO: Need to restore this
// signing {
// publishing.publications.mavenPublication.sign
// }
}
23 changes: 22 additions & 1 deletion core-metadata-utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm'
id 'maven-publish'
id 'signing'
}

repositories {
Expand Down Expand Up @@ -34,10 +36,11 @@ task javadocJar(type: Jar) {

publishing {
publications {
mavenPublication(MavenPublication) {
release(MavenPublication) {
from components.java
artifactId 'core-metadata-utils'
artifacts = [jar, sourceJar, javadocJar]

pom {
name = 'Partech Core Metadata Utils'
description = 'Core interfaces and utilities for working with metadata.'
Expand Down Expand Up @@ -65,4 +68,22 @@ 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.release
}

0 comments on commit 6b6b4cc

Please sign in to comment.