Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup gradle-release-plugin to play nice with bintray #226

Merged
merged 3 commits into from
May 3, 2018

Conversation

pdex
Copy link
Collaborator

@pdex pdex commented May 1, 2018

No description provided.

@@ -1,16 +1,39 @@
plugins {
id 'java'
id 'net.researchgate.release' version '2.7.0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes might be better in the xio build.gradle - xio-core/build.gradle

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we want to run this plugin for both xio-core and xio-test?

commandLine './gradlew', '-info', 'bintrayUpload'
}

afterReleaseBuild.dependsOn imWithStupid
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's something stupid going on with the gradle-bintray-plugin if I depend on bintrayUpload gradle says it can't find the tasks dependencies and freaks out. So what's happening here is that I'm shelling out after the tag is made and the binaries are built to upload them to bintray. If we wait until after the release process is done we'll be on the snapshot, which is not what we want.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pdex - that's probably because the tasks don't exist a the root level - see my comment above about moving these changes into the xio build.gradle

dryRun = bintray_dryrun.toBoolean() //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
userOrg = bintray_subject
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use environment variables instead ? - System.getenv('XXX')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I set this up as a project variable so if you do ./gradlew -Pbintray_dryrun=true bintrayUpload it works as expected. My understanding with environment variables and gradle is that you need to explicitly pass them to tasks.

issueTrackerUrl = 'https://github.com/xjdr/xio/issues'
vcsUrl = 'https://github.com/xjdr/xio.git'
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to get rid of all of this boilerplate by using maven-publish like so: https://github.com/ajoberstar/gradle-bintray#archived

But the ;publish=1 bintray hack isn't supported by gradle right now.

@jguamie jguamie self-requested a review May 1, 2018 23:01
@coveralls
Copy link

Coverage Status

Coverage remained the same at 41.841% when pulling 694b0db on ck/use-gradle-release-plugin into e78afa7 on master.

@pdex pdex merged commit bd78383 into master May 3, 2018
@pdex pdex deleted the ck/use-gradle-release-plugin branch May 3, 2018 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants