I tried to copy Maven’s XML into it. After saving, the exclusions information was lost, and the script with gradle didn’t seem to work. How to set exclusion dependency?
Hi,
Gradle documentation should help you:
https://docs.gradle.org/current/userguide/dependency_downgrade_and_exclude.html#sec:excluding-transitive-deps
e.g.
compile('commons-beanutils:commons-beanutils:1.9.4') {
exclude group: 'commons-collections', module: 'commons-collections'
}
That’s exactly what I want to say.
The first step
Click OK and then open it
see build.gradle file
compile ‘commons-beanutils:commons-beanutils:1.9.4’
the exclusions information was lost!!
You can change the code directly in the build.gradle
file.
If I make any changes in the GUI interface, it will override what I wrote manually
This means that after I manually change the file, I can no longer use GUI to add it
Hi,
I’ve checked, and Studio UI doesn’t damage customized dependency added to the build.gradle manually. So you are still safe to use the dialog, it just doesn’t see custom dependency.
I’ve created a bug ticket: https://youtrack.cuba-platform.com/issue/STUDIO-9145
Thanks for letting us know about the problem.