This message was deleted.
# community-support
s
This message was deleted.
v
Probably by defining an exclude on the classpath configuration in the build script block.
d
@Vampire thank you! I need to remove a dependency of a particular version. Because the plugin is brings a older version of the library that is being flagged by the white source. Is it possible?
v
You should be able to do all usual things you can do for other configurations too, including upgrading that version, or rejecting that specific version, or excluding, and so on. Just have a look at the user guide what is possible.
d
I don’t seem to be finding much in case of plugins after a whole day of googling 🥲. If you could point to the link that would be great.
I tried this with no luck
Copy code
implementation("com.google.code.gson:gson") {
			version {
				strictly("2.9.0")
			}
	}
It still gets the gson2.8.6 dependency too
This did not work either
implementation('com.google.code.gson:gson:2.9.0') {
force = true
}
All these technique don’t seem to be helping much when it comes dependencies got by plugins
v
As I said, you have to do it for the
classpath
configuration in the
buildscript
block, not for the production dependencies in the
implementation
configuration.
Copy code
buildscript {
    dependencies {
        classpath('com.google...') { ... }
    }
}
d
ah i see
Can the
force=true
and
strictly
be used in the buildscript block.
v
I think so. While
force
should usually not be used anymore nowadays
d
@Vampire this seems to have done the trick 🙌
Copy code
buildscript {
    dependencies {
        classpath('com.google.code.gson:gson') 
				{ 
					version {
						strictly("2.9.0")
					}
				}
    }
}
v
Btw.
classpath('com.google.code.gson:gson:2.9.0!!')
should also work if you want it more compact.
!!
is the inline notation for strictly
d
Gotcha! Thank you very much for all your help. I was pulling out my hair the whole day y’day!
👌 1