In my Grails project, I used library A. One of the dependencies of A is B. There is a package (named C) in the B jar that I want to exclude from my project (since it duplicates an existing package in the JDK and causes an error when the application starts). But I do not know the correct syntax for this. I tried the codes below, but it does not work.
dependencies { runtime ('A-library') { excludes(<what-I-should-write-here>) } }
Could you help me with this? Thank you very much.
, . jar ( ), . , , , , , .
/ B , / B. , ( ) B, . BuildConfig.groovy :
BuildConfig.groovy
dependencies { runtime ('A-library') { excludes('B-library') } runtime 'B-library-with-duplicate-packages-excluded' }