Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sbt/sbt-assembly
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: sbt/sbt-assembly
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.0
Choose a head ref
  • 8 commits
  • 11 files changed
  • 4 contributors

Commits on Jun 10, 2021

  1. Update jarjar-abrams to 0.3.1

    Emil Ejbyfeldt committed Jun 10, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9d87b0c View commit details

Commits on Jul 5, 2021

  1. Replace obsolete Bintray badge with Scaladex version

    Unfortunately the Bintray badge just reads 'no longer available' these days, I guess due to https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/ . The new Scaladex badge can replace the old Bintray badge. It summarises which versions of sbt are supported by sbt-assembly (and what the latest sbt-assembly version is for each of those sbt versions):
    
    [![sbt-assembly Scala version support](https://index.scala-lang.org/sbt/sbt-assembly/sbt-assembly/latest-by-scala-version.svg?targetType=Sbt)](https://index.scala-lang.org/sbt/sbt-assembly/sbt-assembly)
    
    More details on the badge format here: https://github.com/scalacenter/scaladex/pull/#660 - with some extra changes to better support sbt in scalacenter/scaladex#674.
    rtyley authored Jul 5, 2021
    Copy the full SHA
    40c61fb View commit details
  2. Copy the full SHA
    05924ba View commit details

Commits on Aug 23, 2021

  1. Copy the full SHA
    859cf45 View commit details
  2. Merge pull request #423 from eejbyfeldt/bump-jarjar-abrams

    Update jarjar-abrams to 0.3.1
    eed3si9n authored Aug 23, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    65828f3 View commit details
  3. Merge pull request #443 from er1c/fixup-tests

    Fixup running scripted locally & add additional scala targets
    eed3si9n authored Aug 23, 2021
    Copy the full SHA
    c6e2384 View commit details

Commits on Sep 1, 2021

  1. Jar Jar Abrams 1.8.0

    eed3si9n committed Sep 1, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ab04120 View commit details
  2. Merge pull request #444 from eed3si9n/wip/jarjar

    Jar Jar Abrams 1.8.0
    eed3si9n authored Sep 1, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    942c364 View commit details
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -21,16 +21,14 @@ Setup

### Using Published Plugin

![Bintray version](https://img.shields.io/bintray/v/eed3si9n/sbt-plugins/sbt-assembly.svg)
[![sbt-assembly Scala version support](https://index.scala-lang.org/sbt/sbt-assembly/sbt-assembly/latest-by-scala-version.svg?targetType=Sbt)](https://index.scala-lang.org/sbt/sbt-assembly/sbt-assembly)

Add sbt-assembly as a dependency in `project/plugins.sbt`:

```scala
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "x.y.z")
```

(You may need to check this project's tags to see what the most recent release is.)

Usage
-----

4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / version := "0.15.1-SNAPSHOT"
ThisBuild / version := "1.0.1-SNAPSHOT"
ThisBuild / organization := "com.eed3si9n"

def scala212 = "2.12.8"
@@ -14,7 +14,7 @@ lazy val root = (project in file("."))
scalacOptions := Seq("-deprecation", "-unchecked", "-Dscalac.patmat.analysisBudget=1024", "-Xfuture")
libraryDependencies ++= Seq(
"org.scalactic" %% "scalactic" % "3.0.8",
"com.eed3si9n.jarjarabrams" %% "jarjar-abrams-core" % "0.1.0",
"com.eed3si9n.jarjarabrams" %% "jarjar-abrams-core" % "1.8.0",
"org.scalatest" %% "scalatest" % "3.1.1" % Test,
)
(pluginCrossBuild / sbtVersion) := {
6 changes: 4 additions & 2 deletions src/sbt-test/caching/caching/build.sbt
Original file line number Diff line number Diff line change
@@ -4,8 +4,10 @@ lazy val root = (project in file(".")).
scalaVersion := "2.11.12",
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test",
libraryDependencies += "ch.qos.logback" % "logback-classic" % "0.9.29" % "runtime",
assemblyOption in assembly := (assemblyOption in assembly).value.copy(cacheOutput = true),
assemblyOption in assembly := (assemblyOption in assembly).value.copy(cacheUnzip = true),
assemblyOption in assembly ~= {
_.withCacheOutput(true)
.withCacheUnzip(true)
},
assemblyJarName in assembly := "foo.jar",
TaskKey[Seq[File]]("genresource") := {
val dirs = (unmanagedResourceDirectories in Compile).value
4 changes: 2 additions & 2 deletions src/sbt-test/merging/mergefail/build.sbt
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@ lazy val testmerge = (project in file(".")).
settings(
version := "0.1",
assemblyJarName in assembly := "foo.jar",
mergeStrategy in assembly := {
val old = (mergeStrategy in assembly).value
assemblyMergeStrategy in assembly := {
val old = (assemblyMergeStrategy in assembly).value

{
case _ => MergeStrategy.singleOrError
1 change: 1 addition & 0 deletions src/sbt-test/sbt-assembly/piecemeal/build.sbt
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ assembleArtifact in (ThisBuild, assemblyPackageDependency) := false
lazy val root = (project in file("."))
.settings(
name := "foo",
mainClass in assembly := Some("Main"),

// assembly / assemblyOption ~= {
// _.withIncludeScala(false)
6 changes: 6 additions & 0 deletions src/sbt-test/shading/jdk11/build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
scalaVersion := "2.12.7"

lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.14"
lazy val scala213 = "2.13.6"

crossScalaVersions in ThisBuild := List(scalaVersion.value, scala211, scala212, scala213)

assemblyShadeRules in assembly := Seq(
ShadeRule.rename("example.A" -> "example.C").inProject
)
2 changes: 1 addition & 1 deletion src/sbt-test/shading/jdk11/test
Original file line number Diff line number Diff line change
@@ -1 +1 @@
> assembly
> +assembly
8 changes: 7 additions & 1 deletion src/sbt-test/shading/keeponly/build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.14"
lazy val scala213 = "2.13.6"

scalaVersion := scala211
crossScalaVersions := List(scala211, scala212, scala213)

lazy val testkeep = (project in file(".")).
settings(
version := "0.1",
assemblyJarName in assembly := "foo.jar",
scalaVersion := "2.11.12",
assemblyShadeRules in assembly := Seq(
ShadeRule.keep("keep.**").inProject
),
6 changes: 4 additions & 2 deletions src/sbt-test/shading/keeponly/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# check if the file gets created
> assembly
> +assembly
$ exists target/scala-2.11/foo.jar
$ exists target/scala-2.12/foo.jar
$ exists target/scala-2.13/foo.jar

# check if it says hello
> check
> +check
11 changes: 9 additions & 2 deletions src/sbt-test/shading/scalasigannot/build.sbt
Original file line number Diff line number Diff line change
@@ -2,14 +2,20 @@ version in ThisBuild := "1.0-SNAPSHOT"
organization in ThisBuild := "scalasigannottest"
scalaVersion in ThisBuild := "2.13.1"

lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.14"
lazy val scala213 = "2.13.6"

crossScalaVersions in ThisBuild := List(scalaVersion.value, scala211, scala212, scala213)


val shadingSettings: Seq[Def.Setting[_]] = Seq(
assemblyShadeRules in assembly := Seq(
ShadeRule.rename(
"to.be.shaded.**" -> "shade.@1"
).inAll
),

assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false),
assemblyOption in assembly ~= { _.withIncludeScala(false) },
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
cp.filterNot {p =>
@@ -48,6 +54,7 @@ lazy val root = project.in(file("."))
.settings(
Seq(
name := "scalasiggannottest",
mainClass in assembly := Some("scalasigannot.Main"),
libraryDependencies := Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value
),
2 changes: 1 addition & 1 deletion src/sbt-test/shading/scalasigannot/test
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Run the main project

> run
> +root/run