Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
743f181
commit 2c8dd0c
Showing
12 changed files
with
107 additions
and
276 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,74 @@ | |||
import sbt._ | |||
import Keys._ | |||
import Package.ManifestAttributes | |||
import java.util.jar.Attributes.Name._ | |||
|
|||
object OpenVCBuild extends Build { | |||
val dependencies = Seq( | |||
//download antlr from github with my scala target changes, switch back to a maven version when the scala target is good enough | |||
"org.antlr" % "antlr" % "3.3" % "antlr->default" from "http://cloud.github.com/downloads/chrreisinger/OpenVC/antlr-3.3.jar" intransitive(), | |||
"org.antlr" % "antlr-runtime" % "3.4" intransitive(), | |||
"asm" % "asm-all" % "3.3.1", | |||
"commons-cli" % "commons-cli" % "1.2", | |||
"org.scalatest" % "scalatest_2.9.0" % "1.6.1" % "test", | |||
"junit" % "junit" % "4.8.2" % "test" | |||
) | |||
|
|||
val buildVersion = "0.1" | |||
val buildSettings = Defaults.defaultSettings ++ sbtassembly.Plugin.assemblySettings ++ SbtShPlugin.settings ++ ProguardPlugin.proguardSettings ++ Seq( | |||
name := "OpenVC", | |||
organization := "com.github.chrreisinger", | |||
scalaVersion := "2.9.0-1", | |||
//TODO resources := Seq("NOTICE.txt", "LICENSE.txt"), // ++ (path("licenses") * "*"), | |||
//TODO clean <<= clean.dependsOn(cleanAntlr), //Make the antlr clean task run on project clean. | |||
//TODO compile <<= compile.dependsOn(antlr), //Run the antlr task before compilation. | |||
javacOptions ++= Seq("-source", "1.7", "-target", "1.7"), | |||
scalacOptions ++= Seq("-deprecation", "-unchecked", "-g:vars", "-target:jvm-1.5", "-explaintypes"), | |||
scaladocOptions := Seq("-unchecked", "-doc-title", "OpenVC scaladoc", "-doc-source-url", "https://github.com/chrreisinger/OpenVC/tree/master/src/main/scala", "-doc-version", buildVersion), | |||
version := buildVersion, | |||
packageOptions ++= Seq[PackageOption](ManifestAttributes( | |||
(IMPLEMENTATION_TITLE, "OpenVC"), | |||
(IMPLEMENTATION_URL, "https://github.com/chrreisinger/OpenVC"), | |||
(IMPLEMENTATION_VENDOR, "Christian Reisinger"), | |||
(IMPLEMENTATION_VERSION, buildVersion), | |||
(SEALED, "true")) | |||
), | |||
ivyConfigurations += config("antlr").hide, | |||
libraryDependencies := dependencies, | |||
ProguardPlugin.makeInJarFilter <<= (ProguardPlugin.makeInJarFilter) { | |||
(makeInJarFilter) => { | |||
(file) => file match { | |||
case "scala-library.jar" => "!META-INF/**" + ",!library.properties" | |||
case _ => "!META-INF/**" | |||
} | |||
} | |||
}, | |||
ProguardPlugin.proguardOptions ++= Seq( | |||
ProguardPlugin.keepMain("at.jku.ssw.openvc.*"), | |||
ProguardPlugin.keepLimitedSerializability, | |||
"-keep class scala.ScalaObject", | |||
"-keepclassmembers class scala.Some,scala.Tuple*,scala.collection.** { *; }", | |||
"-keep class at.jku.ssw.openvs.** { *; }", | |||
"-dontskipnonpubliclibraryclasses", | |||
"-dontskipnonpubliclibraryclassmembers", | |||
"-dontnote", | |||
"-printconfiguration", | |||
"-whyareyoukeeping class scala.Tuple5" | |||
) | |||
) | |||
|
|||
//TODO add task to generate parser and lexer from ANTLR grammar | |||
lazy val common = Project("OpenVC", file("."), settings = buildSettings) | |||
} | |||
|
|||
|
|||
object SbtShPlugin extends Plugin { | |||
override lazy val settings = Seq(Keys.commands += shCommand) | |||
|
|||
def shCommand = Command.args("sh", "<shell command>") { | |||
(state, args) => | |||
args.mkString(" ").! | |||
state | |||
} | |||
|
|||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,8 +1 @@ | |||
#Project properties | sbt.version=0.10.1 | ||
#Thu Jul 15 10:17:57 CEST 2010 | |||
project.organization=JKU Linz | |||
project.name=OpenVC | |||
sbt.version=0.7.6.RC0 | |||
project.version=0.0.1 | |||
build.scala.versions=2.9.0 | |||
project.initialize=false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
//sbt-idea | |||
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" | |||
|
|||
libraryDependencies += "com.github.mpeltonen" %% "sbt-idea" % "0.10.0" | |||
|
|||
//xsbt-proguard-plugin | |||
resolvers += "Proguard plugin repo" at "http://siasia.github.com/maven2" | |||
|
|||
libraryDependencies <+= sbtVersion("com.github.siasia" %% "xsbt-proguard-plugin" % _) | |||
|
|||
//sbteclipse | |||
resolvers += { | |||
val typesafeRepoUrl = new java.net.URL("http://repo.typesafe.com/typesafe/releases") | |||
val pattern = Patterns(false, "[organisation]/[module]/[sbtversion]/[revision]/[type]s/[module](-[classifier])-[revision].[ext]") | |||
Resolver.url("Typesafe Repository", typesafeRepoUrl)(pattern) | |||
} | |||
|
|||
libraryDependencies <<= (libraryDependencies, sbtVersion) { (deps, version) => | |||
deps :+ ("com.typesafe.sbteclipse" %% "sbteclipse" % "1.3-RC1" extra("sbtversion" -> version)) | |||
} | |||
|
|||
//sbt-assembly | |||
libraryDependencies <+= (sbtVersion) { sv => "com.eed3si9n" %% "sbt-assembly" % ("sbt" + sv + "_0.5") } | |||
|
|||
//sbt-netbeans-plugin | |||
resolvers += ScalaToolsSnapshots | |||
|
|||
resolvers += "remeniuk repo" at "http://remeniuk.github.com/maven" | |||
|
|||
libraryDependencies += "org.netbeans" %% "sbt-netbeans-plugin" % "0.1.2" |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,2 @@ | |||
set SCRIPT_DIR=%~dp0 | set SCRIPT_DIR=%~dp0 | ||
java -server -Xmx512M -Xss3M -jar "%SCRIPT_DIR%bin/sbt-launch.jar" "@sbt.boot.properties" %* | java -Dfile.encoding=UTF8 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -server -Xmx512M -Xss3M -jar "%SCRIPT_DIR%project\sbt-launch.jar" %* |
Oops, something went wrong.