Closed martingd closed 3 years ago
I am aware there is a workaround:
def assemblyRules = Assembly.defaultRules ++ Seq(ExcludePattern("scala/.*"))
as described in this comment to issue #575.
However, the docs states that the above method should work and is the preferred method of excluding the Scala library from the assembly.
Thank for reporting! Can't tell why it isn't working right now though. Will look into it.
This issue seem due to transitive dependencies pulling the Scala lib.
The scalaLibraryIvyDeps
target is also used in the compileClasspath
to compile the code. So, if you make it empty and provide the scala library by no other means, than the compilation fails as expected. One way to fix this is to add the scala library via compileIvyDeps
.
The documentation was wrong. We also changed scala libaray handling in mill. I fixed the documentation in #1507. This issue is no longer valid. See documentation for how to properly exclude files from assembly.
According to the documentation, the Scala library can be excluded from the assembly like this:
However, this causes a crash in the compile task.
Example
This example shows the issue using Mill 0.6.1 on macOS 10.15 Catalina with JDK 1.8.0_231:
Project Layout
Mill build script
Also tested with
scalaVersion
set to"2.10.0"
and"2.13.1"
.Failing compile task