shipkit
shipkit copied to clipboard
Publication comparison failing with an Android Library project
When building and publishing and Android Library project, the releaseNeeded
task always claims that changes have been made because the comparison fails for some reason. I have a sourcesJar
task that mimics the java-library
task of the same name and it gets published correctly, but it doesn't seem to be able to compare the current sources to the previous versions' sources.
My code: https://github.com/magneticflux-/kotlin-livedata-utils
My build output:
Executing tasks: [releaseNeeded]
Configuration on demand is an incubating feature.
Building version '0.1.6' (value loaded from 'version.properties' file).
:identifyGitBranch
Executing:
git rev-parse --abbrev-ref HEAD
Identified current branch: master
:releaseNeeded
Commit message to inspect for keywords '[ci skip-release]' and '[ci skip-compare-publications]': <unknown commit message>
Current branch 'master' matches 'master|release/.+': true
Publication comparison was skipped (no comparison result files found).
Release is considered _not_ needed when:
- 'SKIP_RELEASE' environment variable is present (currently: false)
- commit message contains '[ci skip-release]' (currently: false)
- we are building a "pull request" (currently: false)
Release is needed when all above is false and:
- we are building on a branch that matches regex 'master|release/.+' (currently: true)
- and one of the following criteria is true:
- there are changes in the binaries when compared to previous version (currently: true)
- commit message contains '[ci skip-compare-publications]' (currently: false)
- 'skipComparePublications' property on task releaseNeeded is true (currently: false)
Releasing because publication changed.
BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed
@ashdavies I see that you use Shipkit for an Android Library project; have you had any issues with redundant releases?
I just had a quick look at this one and it looks like we do not integrate well with this kind of project. I will have a more detailed look at this one later on this week.
From my investigation, it seems that this line isn't called:
https://github.com/mockito/shipkit/blob/3ee2eb772ec2490fbba2f6bebc69ae817160af5d/subprojects/shipkit/src/main/groovy/org/shipkit/internal/gradle/java/JavaBintrayPlugin.java#L26
because this line isn't called:
https://github.com/mockito/shipkit/blob/ff78aff3ed3f8a91fe3730e1b08cc320d0499f92/subprojects/shipkit/src/main/groovy/org/shipkit/internal/gradle/java/ShipkitJavaPlugin.java#L34
because my Android library does not have the java
plugin applied due to it being incompatible. Honestly, it seems to me the most "robust" way around this would be for the Android plugin to use the java
plugin since it's mostly programming in Java, but that doesn't seem like it's going to happen anytime soon.