Skip to content

Commit

Permalink
0.9.9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
aolshevskiy committed May 30, 2011
1 parent 82877da commit f18f40d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
17 changes: 5 additions & 12 deletions README.md
Expand Up @@ -2,26 +2,23 @@

Requires [XSBT](http://github.com/harrah/xsbt/tree/0.9).

Maven artifacts are created for 0.9.4, 0.9.6, 0.9.7 and 0.9.8 versions.
Maven artifacts are created for 0.9.4, 0.9.6, 0.9.7, 0.9.8 and 0.9.9 versions.

###Adding the plugin to your build

To use the plugin in a project, you need to create `project/plugins/build.sbt`:

resolvers += "Proguard plugin repo" at "http://siasia.github.com/maven2"

libraryDependencies <<= (libraryDependencies, appConfiguration) {
(deps, app) =>
deps :+ "com.github.siasia" %% "xsbt-proguard-plugin" % app.provider.id.version
}
libraryDependencies <+= sbtVersion("com.github.siasia" %% "xsbt-proguard-plugin" % _)
This adds plugin version corresponding to your sbt version into your build.

In case if you have a xsbt version different from one used in Maven artifacts or want to use development version of the plugin, you need to create a `project/plugins/project/Build.scala`:

import sbt._
object PluginDef extends Build {
lazy val projects = Seq(root)
override def projects = Seq(root)
lazy val root = Project("plugins", file(".")) dependsOn(proguard)
lazy val proguard = uri("git://github.com/siasia/xsbt-proguard-plugin.git")
}
Expand All @@ -45,7 +42,7 @@ This will add a `proguard` action which will run Proguard and generate output in

If you want to add some custom jar into the set of input jar files. Do so as follows:

proguardInJar += (Path.userHome / "lib" / "webspec" / "runtime.jar").asFile
proguardInJars += Path.userHome / "lib" / "webspec" / "runtime.jar"

Scala Library is already there.

Expand Down Expand Up @@ -75,11 +72,7 @@ By default Proguard will be instructed to include everything except classes
from the Java runtime. To treat additional libraries as external (i.e. to
add them to the list of `-libraryjars` passed to Proguard), do the following. Here comes the example how to select a module named "httpclient" from the library dependencies:

proguardLibraryJars <<= (proguardLibraryJars, update) map {
(libJars, report) =>
val httpclientJars = report.select(module = moduleFilter(name = "httpclient"))
libJars ++ httpclientJars
}
proguardLibraryJars <+= update(_.select(module = moduleFilter(name = "httpclient")))

By default all jar files passed to Proguard (except for the one that contains
your project's classes) are filtered using
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Expand Up @@ -8,7 +8,7 @@ name := "xsbt-proguard-plugin"

organization := "com.github.siasia"

version <<= appConfiguration(app => app.provider.id.version)
version <<= sbtVersion(v => v)

resolvers += "Siasia github repo" at "http://siasia.github.com/maven2"

Expand All @@ -18,4 +18,4 @@ scalacOptions += "-deprecation"

publishMavenStyle := true

publishTo := Some(Resolver.file("Local", Path.userHome / "projects" / "siasia.github.com" / "maven2" asFile)(Patterns(true, Resolver.mavenStyleBasePattern)))
publishTo := Some(Resolver.file("Local", Path.userHome / "projects" / "siasia.github.com" / "maven2")(Patterns(true, Resolver.mavenStyleBasePattern)))
2 changes: 1 addition & 1 deletion project/plugins/build.sbt
@@ -1 +1 @@
libraryDependencies <<= (libraryDependencies, appConfiguration) { (deps, app) => deps :+ "org.scala-tools.sbt" %% "scripted-plugin" % app.provider.id.version }
libraryDependencies <+= sbtVersion("org.scala-tools.sbt" %% "scripted-plugin" % _)
2 changes: 1 addition & 1 deletion src/sbt-test/test/initial/build.sbt
@@ -1,3 +1,3 @@
seq(ProguardPlugin.proguardSettings :_*)

proguardOptions += keepMain("Test")
proguardOptions += keepMain("Test")
2 changes: 1 addition & 1 deletion src/sbt-test/test/initial/project/plugins/build.sbt
@@ -1 +1 @@
libraryDependencies <<= (libraryDependencies, appConfiguration) { (deps, app) => deps :+ "com.github.siasia" %% "xsbt-proguard-plugin" % app.provider.id.version }
libraryDependencies <+= sbtVersion("com.github.siasia" %% "xsbt-proguard-plugin" % _)
2 changes: 1 addition & 1 deletion src/sbt-test/test/initial/test
@@ -1,3 +1,3 @@
> ++ 2.8.1
> proguard
$ exists target/scala-2.8.1.final/default_2.8.1-0.1.min.jar
$ exists target/scala-2.8.1.final/default_2.8.1-0.1.min.jar

0 comments on commit f18f40d

Please sign in to comment.