Skip to content

Commit

Permalink
Merge pull request #16 from rundeck/exp/bintray
Browse files Browse the repository at this point in the history
Set up bintray publishing
  • Loading branch information
gschueler authored Mar 1, 2020
2 parents 73d1e01 + 5df3577 commit 55477fd
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 82 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
run: VERSION=$(./gradlew currentVersion | grep 'version:' | cut -d ' ' -f 3) && echo ::set-output name=VERSION::$VERSION
- name: Build with Gradle
run: ./gradlew build
- name: Publish to Github
run: ./gradlew publish
- name: Publish to Bintray
run: ./gradlew -PbintrayUser=gschueler -PbintrayOrg=rundeck -PbintrayRepo=maven -PdryRun=false bintrayUpload
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_USER: gschueler
BINTRAY_TOKEN: ${{ secrets.BINTRAY_TOKEN }}
BINTRAY_USER: gschueler

85 changes: 80 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
buildscript{
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.4.1'
id 'idea'
}

scmVersion {
tag {
prefix = ''
Expand All @@ -16,12 +21,82 @@ allprojects {
subprojects{
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/publishing.gradle"
apply plugin: 'com.jfrog.bintray'


java {
withJavadocJar()
withSourcesJar()
}

javadoc {
if (JavaVersion.current().isJava8Compatible()) {
options.addStringOption('Xdoclint:none', '-quiet')
}
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}

publishing {
publications {
"${project.name}Lib"(MavenPublication) {
from components.java
version = project.version
pom {
name = "Rundeck CLI Toolbelt - ${project.name}"
description = "CLI utility - ${project.name}"
url = 'https://github.com/rundeck/cli-toolbelt'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'gschueler'
name = 'Greg Schueler'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/rundeck/cli-toolbelt.git'
developerConnection = 'scm:git:ssh://github.com/rundeck/cli-toolbelt.git'
url = 'https://github.com/rundeck/cli-toolbelt'
}
}
}
}

bintray {
user = findProperty("bintrayUser")
key = System.getenv("BINTRAY_TOKEN")

dryRun = (findProperty('dryRun') ?: 'true').toBoolean()
delegate.publish = true
publications = ["${project.name}Lib"]
pkg {
repo = findProperty('bintrayRepo')
name = 'cli-' + project.name
userOrg = findProperty('bintrayOrg')
licenses = ['Apache-2.0']
githubRepo = 'rundeck/cli-toolbelt' //Optional Github repository
vcsUrl = 'https://github.com/rundeck/cli-toolbelt.git'

version {
name = project.version
// mavenCentralSync {
// sync = true //[Default: true] Determines whether to sync the version to Maven Central.
// user = findProperty('ossUser') //OSS user token: mandatory
// password = System.getenv("OSS_PASSWORD") //OSS user password: mandatory
// }
}
}
}
}
}

apply plugin: 'idea'
defaultTasks 'clean', 'build'

repositories {
mavenCentral()
Expand Down
30 changes: 0 additions & 30 deletions gradle/java.gradle

This file was deleted.

43 changes: 0 additions & 43 deletions gradle/publishing.gradle

This file was deleted.

0 comments on commit 55477fd

Please sign in to comment.