Closed haulmont-git closed 4 years ago
It was decided to provide project-level solution. See guide issue.
In some cases, you want to use a specific version of some library in the project, but another gets into the project from the dependency tree. For example, a newer version or release
version when you want a snapshot
version. Let's look at an example when you add the CUBA platform version X.Y-SNAPSHOT
to a project, while using an application component that uses a platform version X.Y.1
. Assembled project will use a platform version X.Y.1
.
To solve this problem, you can use the standard Gradle tools like affecting configurations via ResolutionStrategy. For instance, add next code to the build.gradle
project file:
allprojects {
configurations {
all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.haulmont.cuba') {
details.useVersion 'X.Y-SNAPSHOT'
}
}
}
}
}
In this code block we add a rule according to which version X.Y-SNAPSHOT
will be used for all dependencies of group com.haulmont.cuba
.
Original issue: https://youtrack.haulmont.com/issue/PL-10325