-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
@@ -1,16 +1,39 @@ | |||
plugins { | |||
id 'java' | |||
id 'net.researchgate.release' version '2.7.0' |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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')
There was a problem hiding this comment.
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' | ||
} | ||
} |
There was a problem hiding this comment.
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.
No description provided.