Commit 3448a02a authored by Morten Kjetland's avatar Morten Kjetland
Browse files

Added support for build against Scala 2.12

parent 8e128f5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ Current version: *1.0.9*
**Benefits**

* Simple implementation - Just [one file](https://github.com/mbknor/mbknor-jackson-jsonSchema/blob/master/src/main/scala/com/kjetland/jackson/jsonSchema/JsonSchemaGenerator.scala)  (for now..) 
* Implemented in Scala 
* Implemented in Scala (*Built for 2.10, 2.11 and 2.12*)
* Easy to fix and add functionality


+4 −4
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@ lazy val commonSettings = Seq(
  organization := "com.kjetland",
  organizationName := "mbknor",
  version := "1.0.10-SNAPSHOT",
  scalaVersion := "2.11.8",
  crossScalaVersions := Seq("2.10.4", "2.11.8"),
  scalaVersion := "2.12.0",
  crossScalaVersions := Seq("2.10.4", "2.11.8", "2.12.0"),
  publishMavenStyle := true,
  publishArtifact in Test := false,
  pomIncludeRepository := { _ => false },
@@ -45,7 +45,7 @@ lazy val commonSettings = Seq(


val jacksonVersion = "2.8.4"
val jacksonModuleScalaVersion = "2.8.3"
val jacksonModuleScalaVersion = "2.8.4"
val slf4jVersion = "1.7.7"


@@ -53,7 +53,7 @@ lazy val deps = Seq(
  "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion,
  "javax.validation" % "validation-api" % "1.1.0.Final",
  "org.slf4j" % "slf4j-api" % slf4jVersion,
  "org.scalatest" %% "scalatest" % "2.2.4" % "test",
  "org.scalatest" %% "scalatest" % "3.0.0" % "test",
  "ch.qos.logback" % "logback-classic" % "1.1.3" % "test",
  "com.github.fge" % "json-schema-validator" % "2.2.6" % "test",
  "com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonModuleScalaVersion % "test",
+3 −1
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ class JsonSchemaGeneratorTest extends FunSuite with Matchers {
  val _objectMapperScala = new ObjectMapper()
  _objectMapperScala.registerModule(new DefaultScalaModule)

  val mixinModule = new MixinModule

  List(_objectMapper, _objectMapperScala).foreach {
    om =>
      val simpleModule = new SimpleModule()
@@ -40,7 +42,7 @@ class JsonSchemaGeneratorTest extends FunSuite with Matchers {
      om.registerModule(new JodaModule)

      // For the mixin-test
      om.registerModule( new MixinModule)
      om.registerModule( mixinModule)

      om.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
      om.setTimeZone(TimeZone.getDefault())
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ package com.kjetland.jackson.jsonSchema.testData.mixin;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.module.SimpleModule;

import com.fasterxml.jackson.databind.Module.SetupContext; // This import is needed for it to compile using Scala 2.12.0 - If not we get an obscure compiler error

public class MixinModule extends SimpleModule {