A test that fails when play-json on the runtime classpath is broken. It checks that:
play.api.libs.jsonandplay.api.libs.functionalclasses are not duplicated on the classpath;- they do not come from the legacy
com.typesafe.playcoordinates (which clash withorg.playframework); play-jsonis not present withoutplay-functional;play-jsonmodule initialisers link without aLinkageError.
Everything is decided by reflection, there is no dependency on play-json itself. With no play-json on the
classpath there is nothing to guard, and the test passes.
libraryDependencies += "com.evolution" %% "play-json-binary-compat-guard" % "0.0.1" % Testpackage com.evolution.bootstrap
import com.evolution.playjson.PlayJsonBinaryCompatSuite
class PlayJsonBinaryCompatSpec extends PlayJsonBinaryCompatSuiteOr use the check directly:
val problems: List[String] = PlayJsonBinaryCompat.check(getClass.getClassLoader)