Closed kavink closed 10 years ago
I researched the possibility of external configuration of failOnSnapshotDependencies property. The result is:
The only possible solution at the moment is to set failOnSnapshotDependencies within "build.gradle" of the concrete git repository:
release {
failOnSnapshotDependencies = false
}
is it possible to inject into build.gradle temporarily ? Not committing any changes, just using it for building ?
I will think on it.
Now it is possible to configure ARF that way, that it allows SNAPSHOT dependencies:
multiproject {
git baseDir: 'upstream_repos', {
project name: 'project1', {
releaseVersion(/(\d+)([^\d]*$)/, { null })
}
project name: 'project3'
project name: 'project2', dependsOn: [ 'project1', 'project3' ], failOnSnapshotDependencies: false
}
}
in this example project2 allows snapshot dependencies, while other projects don't.
failOnSnapshotDependencies can be defined globally:
multiproject {
failOnSnapshotDependencies = false
git baseDir: 'upstream_repos', {
project name: 'project1', {
releaseVersion(/(\d+)([^\d]*$)/, { null })
}
project name: 'project3'
project name: 'project2', dependsOn: [ 'project1', 'project3' ]
}
}
Note new special syntax in releaseVersion of project1: { null }
. It means that code will be released with current version number, without modifications. For example, if project1 has version 2.0-SNAPSHOT, it will be released as 2.0-SNAPSHOT.
I did not understand the second part about { null }
when is that needed ?
Thanks i will test enabling SNAPSHOT on one repo
On 07/28/2014 04:29 PM, kavink wrote:
I did not understand the second part about |{ null }| when is that needed ?
when we need to release with snapshot version.
Best regards, Andrey Hihlovskiy.
How can we pass flags to gradle release plugin which is a requirement https://github.com/townsfolk/gradle-release , i.e. if i would like to enable SNAPSHOT dependencies, how can i do it ?