Skip to content

Commit

Permalink
Merge pull request #547 from ancho/fix/bintray
Browse files Browse the repository at this point in the history
fix jbake-dist upload to bintray
  • Loading branch information
jonbullock authored Oct 15, 2018
2 parents 5c44395 + d15a52d commit 4239fa5
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 61 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ subprojects {
if ( project.name != "jbake-dist" ) {
apply from: "$rootDir/gradle/maven-publishing.gradle"
}
// bintray setup
apply from: "$rootDir/gradle/publishing.gradle"
}

// add source and target compatibility for all JavaCompile tasks
Expand Down
117 changes: 58 additions & 59 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,76 +11,75 @@ if (project.name == "jbake-dist") {
* We just need the distribution packages from the project with signatures if they are present.
* Notice the repository. It's a generic one. You can configure it with -PbintrayBinaryRepo=whatever
*/
afterEvaluate {
bintray {
user = bintrayUsername
key = bintrayKey

if ( !project.hasProperty('skipSigning') ) {
filesSpec {
from signArchives.outputs.files.filter { !it.name.endsWith(".jar") }
from signArchives.signatureFiles.filter { !it.name.endsWith(".jar.asc") }

into "."
}
}
else {
filesSpec {
from distZip
from distTar
bintray {
user = bintrayUsername
key = bintrayKey

if (!project.hasProperty('skipSigning')) {
filesSpec {
from distZip
from distTar
from signArchives.signatureFiles.filter { !it.name.endsWith(".jar.asc") }

into "."
}
into "."
}

dryRun = bintrayDryRun.toBoolean()

pkg {
userOrg = bintrayOrg
repo = bintrayBinaryRepo
name = applicationName
desc = project.description
licenses = ['MIT']
labels = ['jbake', 'site-generator']
websiteUrl = project.website
issueTrackerUrl = project.issues
vcsUrl = project.vcs
publicDownloadNumbers = true
_bintrayRecordingCopy.dependsOn signArchives

} else {
filesSpec {
from distZip
from distTar

into "."
}
}

dryRun = bintrayDryRun.toBoolean()

pkg {
userOrg = bintrayOrg
repo = bintrayBinaryRepo
name = applicationName
desc = project.description
licenses = ['MIT']
labels = ['jbake', 'site-generator']
websiteUrl = project.website
issueTrackerUrl = project.issues
vcsUrl = project.vcs
publicDownloadNumbers = true
}
}

} else {

afterEvaluate {
bintray {
user = bintrayUsername
key = bintrayKey
configurations = ['archives']

if (!project.hasProperty('skipSigning')) {
// Copy the signed pom to bintrayDestination
filesSpec {
from signPom
into signPom.bintrayDestination
}
signPom.dependsOn install
bintrayUpload.dependsOn signPom
}
bintray {
user = bintrayUsername
key = bintrayKey
configurations = ['archives']

dryRun = bintrayDryRun.toBoolean()
pkg {
userOrg = bintrayOrg
repo = bintrayRepo
name = project.name
desc = project.description
licenses = ['MIT']
labels = ['jbake', 'site-generator']
websiteUrl = project.website
issueTrackerUrl = project.issues
vcsUrl = project.vcs
publicDownloadNumbers = true
if (!project.hasProperty('skipSigning')) {
// Copy the signed pom to bintrayDestination
filesSpec {
from signPom
into signPom.bintrayDestination
}
signPom.dependsOn install
bintrayUpload.dependsOn signPom
}

dryRun = bintrayDryRun.toBoolean()
pkg {
userOrg = bintrayOrg
repo = bintrayRepo
name = project.name
desc = project.description
licenses = ['MIT']
labels = ['jbake', 'site-generator']
websiteUrl = project.website
issueTrackerUrl = project.issues
vcsUrl = project.vcs
publicDownloadNumbers = true
}
}

Expand Down
5 changes: 5 additions & 0 deletions jbake-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import java.text.SimpleDateFormat

apply from: "$rootDir/gradle/sonarqube.gradle"

if( JavaVersion.current().java7Compatible ) {
apply from: "$rootDir/gradle/publishing.gradle"
}


description = "The core library of JBake"

dependencies {
Expand Down
4 changes: 4 additions & 0 deletions jbake-dist/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
apply from: "$rootDir/gradle/application.gradle"
apply from: "$rootDir/gradle/sdkman.gradle"

if( JavaVersion.current().java7Compatible ) {
apply from: "$rootDir/gradle/publishing.gradle"
}

description = "The binary distribution package that bundles JBake cli"

sourceSets {
Expand Down

0 comments on commit 4239fa5

Please sign in to comment.