-
Notifications
You must be signed in to change notification settings - Fork 221
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
Proper Usage of Release Plugin #20
Comments
Looks like you're using an older version of the plugin. Please try this instead: |
Sorry, the installation script wasn't set up correctly - it was set to download version 1.0. If you already tried this, please clear out your gradle cache and try again. |
I'm not quite sure what you mean by clearing the gradle cache... If that means rm -rf ~/.gradle and rm -rf .gradle (in the project directory) then I did that. I'm still seeing that the snapshot versions are the ones that are promoted to my nexus repo. |
That's what I meant, thanks. :) Can you verify in the gradle cache that you're getting the 1.2.0.1 version of the jar file? Also, at what stage are you adding uploadArchives? That correct? Tested this with a mock project: https://sourceforge.net/p/gradlerelease/git Started with version = 1.2.2-SNAPSHOT. Using the latest dev version of the gradle-release plugin, did a release: |
I see the following in my cache.... ./caches/artifacts-23/filestore/gradle-release/gradle-release/1.2.0.1/jar I should also note that I'm using subversion as well. In addition, I did include the following line from the readme createReleaseTag.dependsOn uploadArchives |
Great. Thank you for checking, and the additional info. I will check it out with a subversion project. |
Hmm. I tested this with a svn project: Again started with version 1.0-SNAPSHOT, ran release process and the 1.0 (no snapshot) version was uploaded: I was using a local install of the gradle-release plugin (version 1.2.0.2), but the changes are minimal and don't meddle with the process at all. Still, I pushed 1.2.0.2 out for you if you'd like to try it, change your apply script to this: Not sure why the 1.2.0.1 version isn't working for you. |
Going to consider this closed, if it's still not working for you please re-open it. |
I'm new to gradle and I'm looking to port my existing maven builds to gradle this year. One of the biggest requirements that I have is that we must be able to cut release builds like we do with maven today. I've been working on migrating a single project to gradle using the release plugin but it doesn't seem to work as I would expect it to. Basically, I'm looking for behavior like I have with maven today.
My project has several subprojects... build.gradle looks like this. When I run the build I would expect the tagged version to have a non-snapshot version in the gradle.properties (it has the snapshot version). Also, the SNAPSHOT artifacts are published, not the 1.0.0 versioned artifacts. I'm sure that I'm doing something wrong, so any help would be appreciated!
apply from: "https://launchpad.net/gradle-release/trunk/1.0/+download/apply.groovy"
.....
uploadArchives {
def mvnUser = 'XXX'
def mvnPassword = 'YYY'
repositories.mavenDeployer {
//configuration = configurations.mavenDeployer
uniqueVersion = false
def mainPom = addFilter('main') {artifact, file -> !artifact.name.endsWith("-tests") }
def testsPom = addFilter('tests') {artifact, file -> artifact.name.endsWith("-tests") }
def poms = [ mainPom, testsPom ]
poms.each { it.version = project.version }
}
release {
project.setProperty("gradle.release.useAutomaticVersion", "true");
//project.setProperty("gradle.release.unSnapshotVersion", "true");
tagPrefix = "enterprise-services-common"
preCommitText = "ESC-3 Release Build"
preTagCommitMessage = "ESC-3 Release Build"
tagCommitMessage = "ESC-3 Release Build"
newVersionCommitMessage = "ESC-3 Release Build"
}
The text was updated successfully, but these errors were encountered: