Skip to content

Commit

Permalink
Issue #166: restore assembly task removed in #155 along with s3 deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
fanf committed Feb 17, 2017
1 parent 3fad90c commit b87d645
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -52,12 +52,23 @@ Using [sbt][sbt]:

This will recompile all MiMa's modules.

If you'd like to create distributable jar files for the CLI, run:

$ sbt assembly

This will create `reporter/target/mima-reporter-assembly-....jar` jar file that can be used to launch the command line version of MiMa.


Launch MiMa Reporter CLI
-------
Type the following command to run the MiMa Reporter command-line

$ sbt reporter/run

Alternatively, you can use the assembly jar to use the CLI as a standalone application:

$ java -jar path/to/mima-reporter-assembly-....jar --prev LIB-v1.jar --curr LIB-v2.jar

MiMa Reporter: Functional Tests
-------

Expand Down
19 changes: 18 additions & 1 deletion project/Build.scala
Expand Up @@ -6,6 +6,10 @@ import com.typesafe.config.ConfigFactory
import Project.inConfig
import Configurations.config
import Build.data
import sbtassembly.Plugin.AssemblyKeys
import sbtassembly.Plugin.AssemblyKeys._
import sbtassembly.Plugin.assemblySettings
import sbtassembly.Plugin.MergeStrategy
import sbtbuildinfo.Plugin._
import bintray.BintrayPlugin
import bintray.BintrayPlugin.autoImport._
Expand Down Expand Up @@ -105,16 +109,29 @@ object MimaBuild {
settings(sonatypePublishSettings:_*)
)

val myAssemblySettings: Seq[Setting[_]] = (assemblySettings: Seq[Setting[_]]) ++ Seq(
mergeStrategy in assembly ~= (old => {
case "LICENSE" => MergeStrategy.first
case x => old(x)
}),
AssemblyKeys.excludedFiles in assembly ~= (old =>
// Hack to keep LICENSE files.
{ files: Seq[File] => old(files) filterNot (_.getName contains "LICENSE") }
)
)

lazy val reporter = (
project("reporter", file("reporter"), settings = commonSettings)
settings(libraryDependencies += typesafeConfig,
name := buildName + "-reporter")
dependsOn(core)
settings(sonatypePublishSettings:_*)
settings(myAssemblySettings:_*)
settings(
// add task functional-tests that depends on all functional tests
functionalTests := allTests(functionalTests in _).value,
test in IntegrationTest := allTests(test in IntegrationTest in _).value
test in IntegrationTest := allTests(test in IntegrationTest in _).value,
mainClass in assembly := Some("com.typesafe.tools.mima.cli.Main")
)
)

Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
@@ -1,3 +1,5 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.9.1")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.5")

addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
Expand Down

0 comments on commit b87d645

Please sign in to comment.