Skip to content

Commit 7732254

Browse files
committed
Merge pull request #5 from Ccook/master
Set compiler options so that Scalive can be used with Java 6+
2 parents 1a1f326 + 04ac6a3 commit 7732254

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.sbt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ autoScalaLibrary := false
88

99
javacOptions ++= Seq("-Xlint:deprecation")
1010

11+
//Ensure scalive's scala files can be run on Java 1.6
12+
scalacOptions += "-target:jvm-1.6"
13+
14+
//Ensure scalive's java files can be run on Java 1.6
15+
javacOptions ++= Seq("-source", "1.6", "-target", "1.6")
16+
1117
// Add tools.jar to classpath
1218
// https://blogs.oracle.com/CoreJavaTechTips/entry/the_attach_api
1319
unmanagedJars in Compile := (file(System.getProperty("java.home")) / ".." / "lib" * "tools.jar").classpath
@@ -17,4 +23,4 @@ libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.3"
1723
packageOptions in (Compile, packageBin) += Package.ManifestAttributes(
1824
"Main-Class" -> "scalive.AgentLoader",
1925
"Agent-Class" -> "scalive.Agent"
20-
)
26+
)

0 commit comments

Comments
 (0)