Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import org.fusesource.scalate.ScalatePlugin.ScalateKeys.scalateTemplateConfig
import org.fusesource.scalate.ScalatePlugin.TemplateConfig
import org.fusesource.scalate.ScalatePlugin.Binding
import org.fusesource.scalate.ScalatePlugin.scalateSettings

organization := "tv.cntt"
name := "xitrum-new"
version := "1.0-SNAPSHOT"

scalaVersion := "2.12.1"
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked")
scalaVersion := "2.11.8"
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-target:jvm-1.8")

// Xitrum requires Java 8
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
Expand All @@ -26,7 +31,7 @@ libraryDependencies += "tv.cntt" %% "xitrum-scalate" % "2.7.1"

// Precompile Scalate templates
Seq(scalateSettings:_*)
ScalateKeys.scalateTemplateConfig in Compile := Seq(TemplateConfig(
scalateTemplateConfig in Compile := Seq(TemplateConfig(
baseDirectory.value / "src" / "main" / "scalate",
Seq(),
Seq(Binding("helper", "xitrum.Action", importMembers = true))
Expand All @@ -46,5 +51,10 @@ unmanagedClasspath in Compile += Attributed.blank(baseDirectory.value / "config"
// For "sbt run"
unmanagedClasspath in Runtime += Attributed.blank(baseDirectory.value / "config")

// For "sbt eclipse"
EclipseKeys.executionEnvironment := Some(EclipseExecutionEnvironment.JavaSE18)
EclipseKeys.configurations := Set(Compile, Runtime)

// Copy these to target/xitrum when sbt xitrum-package is run
XitrumPackage.copy("config", "public", "script")

2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Run sbt eclipse to create Eclipse project file
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.1.0")

// Run sbt xitrum-package to prepare for deploying to production environment
addSbtPlugin("tv.cntt" % "xitrum-package" % "1.9")
Expand Down