--- a/project/build.scala Sun Aug 28 14:49:04 2011 -0400
+++ b/project/build.scala Sun Aug 28 15:27:06 2011 -0400
@@ -46,6 +46,20 @@
import Dependencies._
import Resolvers._
import BuildSettings._
+ import ProguardPlugin._
+
+ def keepUnder(pakage:String):String = "-keep class %s.**" format pakage
+
+ val proguardSettings:Seq[Setting[_]] =
+ ProguardPlugin.proguardSettings ++ Seq[Setting[_]](
+ minJarPath := new File("readwriteweb.jar"),
+ proguardOptions += keepMain("org.w3.readwriteweb.ReadWriteWebMain"),
+ proguardOptions += keepUnder("org.w3.readwriteweb"),
+ proguardOptions += keepUnder("unfiltered"),
+ proguardOptions += keepUnder("org.apache.log4j"),
+ proguardOptions += keepUnder("com.hp.hpl.jena"),
+ proguardOptions += "-keep class com.hp.hpl.jena.rdf.model.impl.ModelCom"
+ )
val yourProjectSettings =
Seq(
@@ -56,7 +70,7 @@
libraryDependencies += dispatch,
libraryDependencies += unfiltered_filter,
libraryDependencies += unfiltered_jetty,
- libraryDependencies += slf4jSimple,
+// libraryDependencies += slf4jSimple,
libraryDependencies += jena,
libraryDependencies += arq,
libraryDependencies += antiXML
@@ -65,7 +79,7 @@
lazy val yourProject = Project(
id = "read-write-web",
base = file("."),
- settings = buildSettings ++ yourProjectSettings ++ sbtassembly.Plugin.assemblySettings
+ settings = buildSettings ++ yourProjectSettings ++ sbtassembly.Plugin.assemblySettings ++ proguardSettings
)
--- a/project/plugins/build.sbt Sun Aug 28 14:49:04 2011 -0400
+++ b/project/plugins/build.sbt Sun Aug 28 15:27:06 2011 -0400
@@ -9,3 +9,8 @@
libraryDependencies <<= (libraryDependencies, sbtVersion) { (deps, version) =>
deps :+ ("com.typesafe.sbteclipse" %% "sbteclipse" % "1.3-RC3" extra("sbtversion" -> version))
}
+
+resolvers += "Proguard plugin repo" at "http://siasia.github.com/maven2"
+
+libraryDependencies <+= sbtVersion("com.github.siasia" %% "xsbt-proguard-plugin" % _)
+