Replies: 2 comments
-
Hi @jmfayard I have a question relating to the above. I have a beginner to intermediate level of knowledge of Gradle. I have only recently started to use the I have found that I can only declare the Is there a way in the For example: In the example cited here https://docs.gradle.org/current/userguide/multi_project_builds.html , there is a single I was wondering if there was a means of calling a function that could pull back different filtering criteria for a different projects?. e.g. Could Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
No there isn't afaik, the same filter is applied to all projects
Le mar. 23 nov. 2021 à 19:25, colmoflynn ***@***.***> a
écrit :
… Hi @jmfayard <https://github.com/jmfayard>
I have a question relating to the above.
I have a beginner to intermediate level of knowledge of Gradle. I have
only recently started to use the refreshVersions plugin.
So, if my question has been answered elsewhere in the plugin
documentation, or is based on a misunderstanding of how Gradle works or how
this plugin works, my apologies in advance.
I have found that I can only declare the refreshVersions plugin
dependency in settings.gradle and also to declare the rejectVersionIf
predicate in the settings.gradle.
Is there a way in the rejectVersionIf predicate to call logic that is
project specific?.
For example: In the example cited here
https://docs.gradle.org/current/userguide/multi_project_builds.html ,
there is a single settings.gradle that can be shared between multiple
projects.
I was wondering if there was a means of calling a function that could pull
back different filtering criteria for a different projects?.
e.g. Could rejectVersionIf look for a function called getBlockList() that
would return a list of module group IDs , that return one list for
*projectA* and a different list for *projectB*?.
Thanks in advance.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADQFSEOA5FOARBRRD2A7ADUNPMBDANCNFSM4477DYLQ>
.
|
Beta Was this translation helpful? Give feedback.
-
Hello friends,
Did you ever want to filter out some dependencies versions proposed by refreshVersions?
If you find yourself deleting them every time you run the task, read on.
We are thinking about adding the ability to filter out dependencies.
One way would be with a rejectVersionIf predicate that would have access to the artifact coordinates (group and name), the version key (e.g.
version.moshi
), and the version and stability level of the current version and of the version candidate.Here are a few examples
Reject versions that are less stable than the current version
Use only stable version
Use an allow list and a block list
Another way would be to define the default stability level, and add contextual metadata comments to override it:
Do you have use cases for filtering versions? Any help would be appreciated
Beta Was this translation helpful? Give feedback.
All reactions