Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

play-json-binary-compat-guard

CI Coverage Status

A test that fails when play-json on the runtime classpath is broken. It checks that:

  • play.api.libs.json and play.api.libs.functional classes are not duplicated on the classpath;
  • they do not come from the legacy com.typesafe.play coordinates (which clash with org.playframework);
  • play-json is not present without play-functional;
  • play-json module initialisers link without a LinkageError.

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.

Usage

libraryDependencies += "com.evolution" %% "play-json-binary-compat-guard" % "0.0.1" % Test
package com.evolution.bootstrap

import com.evolution.playjson.PlayJsonBinaryCompatSuite

class PlayJsonBinaryCompatSpec extends PlayJsonBinaryCompatSuite

Or use the check directly:

val problems: List[String] = PlayJsonBinaryCompat.check(getClass.getClassLoader)

About

Regression test ensuring Play JSON dependencies come from org.playframework and preventing binary-incompatible mixing with legacy com.typesafe artifacts.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages