-
Notifications
You must be signed in to change notification settings - Fork 157
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
Problem integrating plugin with gradle-git... #19
Comments
It might be that we have some dependency clashes - both this plugin and axion-release use Grgit underneath. I think i should bump version to newest (0.4.0) to be compatible with gradle-git. Can be done in 0.9.5 - i have some other changes for this version. Would it be okay if i released it tomorrow? Of course i will test my assumption first :) |
That would be great! I was also wondering - if I could get this information from the classes you are dependent on.. it seems like I can at least get the branch name from your classes easily (maybe?) I think I would be more than fine with just the last commit hash and the branch name. Is that possible without using gradle-git (just your plugin)? println "* Repository: " + repo.remote.list().url |
You can get branch name and last tag outside of |
Okay, i see the problem. gradle-git uses |
Done, now it's a bit hackish, but i also added issue in Semver library that would make it bit nicer in future. |
Thanks for your help -- Silly question -- when will this get pushed to maven central? Thanks again for being so responsive. |
I will try to implement one more feature before pushing it to Maven, but should be there tomorrow morning - look for 0.9.5 version. |
Ok. No problem at all!! Thanks. On Mon Nov 24 2014 at 1:43:36 PM Adam Dubiel [email protected]
|
I think this plugin is great, but I can't get it to work when I combine it with another plugin...
classpath 'org.ajoberstar:gradle-git:0.12.0'
the currentVersion and verifyRelease methods work as expected...
~/workspace/publish-example$ gradle currentVersion
:currentVersion
Project version: 0.1.16-SNAPSHOT
BUILD SUCCESSFUL
Total time: 1.36 secs
but when I say
gradle r
:verifyRelease
Looking for uncommited changes..
Checking if branch is ahead of remote..
:release FAILED
FAILURE: Build failed with an exception.
Execution failed for task ':release'.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Caused by: java.lang.IllegalArgumentException: Input string is NULL or empty
at com.github.zafarkhaja.semver.VersionParser.(VersionParser.java:162)
at com.github.zafarkhaja.semver.VersionParser.parsePreRelease(VersionParser.java:222)
at com.github.zafarkhaja.semver.Version.setPreReleaseVersion(Version.java:431)
at com.github.zafarkhaja.semver.Version$setPreReleaseVersion$2.call(Unknown Source)
at pl.allegro.tech.build.axion.release.ReleaseTask.release(ReleaseTask.groovy:40)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
If I take out the gradle-git plugin - the release works as expected. Any ideas?
BTW - I think this is a great alternative for releasing, especially coming from a maven background.
Simple script -- just comment out the line - and you see it breaks...
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '0.9.4'
// classpath 'org.ajoberstar:gradle-git:0.12.0'
}
}
apply plugin: 'axion-release'
apply plugin: 'maven-publish'
scmVersion {
tag {
prefix = 'release'
}
}
project.group = 'com.yourdomain'
project.version = scmVersion.version
def artifactRepositoryURL
if (project.version.toString().contains("-SNAPSHOT")) {
artifactRepositoryURL = 'http://localhost:8081/content/repositories/snapshots/'
}
else {
artifactRepositoryURL = 'http://localhost:8081/content/repositories/releases/'
}
repositories {
mavenCentral ()
}
dependencies {
}
publishing {
publications {
myPublication(MavenPublication) {
artifact ('README.txt') {
classifier = 'README'
extension = 'txt'
}
}
}
repositories {
maven {
url artifactRepositoryURL
credentials {
username = 'admin'
password = 'admin123'
}
}
The text was updated successfully, but these errors were encountered: