This is the current best way I'm aware of to do this in Gradle.
dependencies {
implementation(libs.jsieve.core)
constraints {
implementation("org.apache.james:apache-mime4j-core:[0.8.10,0.9)") {
because("CVE-2024-21742")
}
}
}If you know a better way, let me know. This method is the 4th or 5th way I have done it so far.