https://pantsbuild.org/ logo
#general
Title
# general
s

salmon-fish-51828

03/16/2017, 9:31 PM
Yes so the inheritance thing is not possible anymore because
Build.scala
style definitions are dead. But maybe if I depend on a project with
scalaVersion := 2.11
then all the projects automatically get it.
p

purple-leather-29803

03/18/2017, 12:55 AM
mammehjammeh: i solve your problem in an sbt polyrepo with an sbt plugin that sets / factors out common boilerplate across many projects https://github.com/hammerlab/spark-genomics agreed with stu below that the sbt gitter is probably a good place for help on this
s

salmon-fish-51828

03/18/2017, 4:56 AM
Thank you for telling me this- I will check this out. I have done something similar for polyrepo if you're interested.
**monorepo
Sorry I don't know how to attach fils so I will copy paste my file with duplicatish information removed
package globalbuild import sbt._ import sbt.Def.Initialize import sbt.Keys._ import sbt.Project.projectToRef import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ class GlobalBuild{ val scalaVersion = "2.11.8" def scalacOptions = Seq( "-Xlint", "-unchecked", "-deprecation", "-feature", "-encoding", "utf8" ) val versionLibSpecs2 = "3.0" def jvmAmmonite : sbt.ModuleID = "com.lihaoyi" %% "ammonite-ops" % versionLibAmmonite def jsScalaTest : sbt.Def.Initialize[ sbt.ModuleID ] = Def.setting{ "org.scalatest" %%% "scalatest" % versionLibScalaTest } def sharedScalaTags : sbt.Def.Initialize[ sbt.ModuleID ] = Def.setting{ "com.lihaoyi" %%% "scalatags" % versionLibScalaTags } object LocalProjects { val mono_root = System.getenv( "MONO_ROOT" ) def monoProject( project: String ) : RootProject = { localProject( java.nio.file.Paths.get( mono_root , "scala", project ).toString ) } def localProject( path: String ) : RootProject = { RootProject( file( path ) ) } val selector = monoProject( "Selector" ) val squery = monoProject( "SQuery" ) } val versionPluginPlay = "2.6.0-M2" //Keep in sync with corresponding value in build.sbt of this project val versionPluginScalaJs = "0.6.13" def resolverTypesafe: sbt.MavenRepository = "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/" def pluginPlay :sbt.ModuleID = "com.typesafe.play" % "sbt-plugin" % versionPluginPlay }
Accompanying build.sbt: addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13") libraryDependencies += "org.scala-sbt" % "sbt" % "0.13.13"
I then depend on this project from the build project of all projects.
p

purple-leather-29803

03/19/2017, 7:17 AM
cool. per some comments from you (iirc) elsewhere in #general, i've also not found a satisfactory solution for expressing modules' dependence on one another / allowing cache-invalidation to flow properly through the task DAG in SBT; I basically have to publish to local maven repo to propagate changes, or duplicate dependency information in a slightly clumsy way, cf. https://github.com/hammerlab/spark-genomics/blob/06c56e50b26b1fef0689fd839936ee24c62d174c/build.sbt#L14-L77
4 Views