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

Generate unique snapshots with the exact same version string timestamp for all subprojects #1772

Closed
Flowdalic opened this issue Apr 6, 2017 · 0 comments
Assignees
Labels
a:feature A new functionality in:publishing-plugins ivy-publish maven-publish
Milestone

Comments

@Flowdalic
Copy link

Flowdalic commented Apr 6, 2017

Generating unique snapshot artifacts of a gradle project with multiple subprojects will result in the unique snapshot version string to differ slightly for every subproject artifact because the timestamp used to generate that version string includes the minutes and seconds. And since time goes on while the snapshots are built, every timestamp is different. This requires users consuming the snapshots to specify a different version for every artifact, although they all point to the same set of unique version snapshots. For example

foo.example:foo-core:4.2.1-20170405.080133-7
foo.example:foo-extensions:4.2.1-20170405.080228-7

Expected Behavior

Gradle should create the timestamp exaclty once and use this timestamp for all subprojects. So that users need to only specify it once.

ext {
  fooVersion 4.2.1-20170405.080228-7
}
foo.example:foo-core:$fooVersion
foo.example:foo-extensions:$fooVersion

Current Behavior

Gradle will produce different unique snapshot version strings per subproject for the same build.

Context

I like to offer my user a unique snapshot repository which provides stable but nightly build snapshots of my project. See https://discuss.gradle.org/t/how-to-generate-unique-snapshots-with-the-same-version-string-for-all-subprojects/21153

Your Environment / Steps to reproduce

git clone https://github.com/igniterealtime/Smack.git
mkdir /tmp/smack-repo
cd Smack
gradle uploadLocal -Dmaven.repo.local=/tmp/smack-repo

Observe that the version of every subproject is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:publishing-plugins ivy-publish maven-publish
Projects
None yet
Development

No branches or pull requests

4 participants