Exclude Play libraries brought in by Gradle Play plugin

We would like to exclude Play-java-forms jar which are brought in via Gradle Play plugin.

We have tried to filter it out using configurations:
configurations.all {
exclude group: “com.typesafe.play”, module: “play-java-forms”
}

But it doesn’t seem to work.

Any help would be greatly appreciated.