File tree 2 files changed +13
-4
lines changed 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import Keys._
10
10
import com .typesafe .tools .mima .plugin .MimaPlugin .autoImport ._
11
11
import de .heikoseeberger .sbtheader .HeaderPlugin .autoImport ._
12
12
13
+ import java .net .URLClassLoader
13
14
import java .util .Arrays
14
15
15
16
import scala .collection .mutable
@@ -104,6 +105,13 @@ object MyScalaJSPlugin extends AutoPlugin {
104
105
jsEnv := new NodeJSEnv (
105
106
NodeJSEnv .Config ().withSourceMap(wantSourceMaps.value)),
106
107
108
+ scalaJSLinkerImpl := {
109
+ val deps = (fullClasspath in (Build .linker, Runtime )).value
110
+ val urls = Attributed .data(deps).map(_.toURI.toURL).toArray
111
+
112
+ LinkerImpl .default(new URLClassLoader (urls, getClass.getClassLoader))
113
+ },
114
+
107
115
// Link source maps to GitHub sources
108
116
addScalaJSCompilerOption(Def .setting {
109
117
" mapSourceURI:" +
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "1.0.0")
6
6
7
7
addSbtPlugin(" org.portable-scala" % " sbt-platform-deps" % " 1.0.0" )
8
8
9
- libraryDependencies += " com.google.javascript" % " closure-compiler" % " v20190513"
10
-
11
9
libraryDependencies += " com.google.jimfs" % " jimfs" % " 1.1"
12
10
11
+ // Bump guava for closure compiler used by linker.
12
+ // Since it is loaded by reflection, the normal eviction doesn't work.
13
+ // Expect that you need to update this if you update closure-compiler.
14
+ libraryDependencies += " com.google.guava" % " guava-testlib" % " 25.1-jre"
15
+
13
16
libraryDependencies += " org.eclipse.jgit" % " org.eclipse.jgit.pgm" % " 3.2.0.201312181205-r"
14
17
15
18
unmanagedSourceDirectories in Compile ++= {
@@ -20,8 +23,6 @@ unmanagedSourceDirectories in Compile ++= {
20
23
root / " logging/jvm/src/main/scala" ,
21
24
root / " linker-interface/shared/src/main/scala" ,
22
25
root / " linker-interface/jvm/src/main/scala" ,
23
- root / " linker/shared/src/main/scala" ,
24
- root / " linker/jvm/src/main/scala" ,
25
26
root / " js-envs/src/main/scala" ,
26
27
root / " nodejs-env/src/main/scala" ,
27
28
root / " test-adapter/src/main/scala" ,
You can’t perform that action at this time.
0 commit comments