diff --git a/deploy.gradle b/deploy.gradle new file mode 100644 index 00000000..9c9739a1 --- /dev/null +++ b/deploy.gradle @@ -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 = 'developers@orkes.io' + } + } + } + } + } + + 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 + } + +}