Project 1: a Java/Maven project
Project 2: a Scala/sbt project
Thing: generally, an immutable object instantiated in from 3rd party Java library. For example, ThingBuilder.foo("bar").build()
Question: How can I define Thing in only one place, and have it used both in Project 1 and 2? (So the parameters in ThingBuilder are guaranteed to be the same in both projects.)
Thing
object with a certain state and the other did not but wants to use it in that state. Or if you just want to be able to defineThing
with a java class in the java project but create it as an object in your scala project where you would give it state and not share that object with the java/maven project.