Skip to content

Commit

Permalink
Create deploy.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n authored Aug 10, 2022
1 parent a807904 commit 9970fb2
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions deploy.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
allprojects {

apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: 'signing'

group = 'io.orkes.conductor'
def conductorVersion = System.getenv('CONDUCTOR_VERSION')
if (conductorVersion) {
println "Inferred version from env variable 'CONDUCTOR_VERSION': $conductorVersion"
version = conductorVersion
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'Orkes Conductor Client'
description = 'Netflix Conductor OSS client wrapper that provides support for Orkes Conductor features'
url = 'https://github.com/orkes-io/conductor'
scm {
connection = 'scm:git:git://github.com/orkes-io/conductor.git'
developerConnection = 'scm:git:ssh://github.com:orkes-io/conductor.git'
url = 'https://github.com/orkes-io/conductor'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
organization = 'Orkes'
organizationUrl = 'https://orkes.io'
name = 'Orkes Development Team'
email = '[email protected]'
}
}
}
}
}

repositories {
maven {
if (project.hasProperty("mavenCentral")) {
println "Publishing to Sonatype Repository"
url = "https://s01.oss.sonatype.org/${project.version.endsWith('-SNAPSHOT') ? "content/repositories/snapshots/" : "service/local/staging/deploy/maven2/"}"
credentials {
username project.properties.username
password project.properties.password
}
} else {
url = "s3://orkes-artifacts-repo/${project.version.endsWith('-SNAPSHOT') ? "snapshots" : "releases"}"
authentication {
awsIm(AwsImAuthentication)
}
}
}
}
}

signing {
def signingKeyId = findProperty('signingKeyId')
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
System.out.println("signingKeyId: " + signingKeyId)
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}

sign publishing.publications
}

}

0 comments on commit 9970fb2

Please sign in to comment.