@@ -1270,22 +1270,33 @@ object Build {
12701270 }
12711271 )
12721272
1273- lazy val `scala3-repl-shaded ` = project.in(file(" repl-shaded" ))
1274- .dependsOn(`scala3-repl `)
1273+ lazy val `scala3-repl-embedded ` = project.in(file(" repl-shaded" ))
1274+ .dependsOn(`scala-library-bootstrapped `)
12751275 .enablePlugins(sbtassembly.AssemblyPlugin )
1276+ .settings(publishSettings)
12761277 .settings(
1277- name := " scala3-repl-shaded " ,
1278- moduleName := " scala3-repl-shaded " ,
1278+ name := " scala3-repl-embedded " ,
1279+ moduleName := " scala3-repl-embedded " ,
12791280 version := dottyVersion,
12801281 versionScheme := Some (" semver-spec" ),
12811282 scalaVersion := referenceVersion,
12821283 crossPaths := true ,
12831284 autoScalaLibrary := true ,
1285+ libraryDependencies ++= Seq (
1286+ " org.jline" % " jline-reader" % " 3.29.0" ,
1287+ " org.jline" % " jline-terminal" % " 3.29.0" ,
1288+ " org.jline" % " jline-terminal-jni" % " 3.29.0" ,
1289+ ),
12841290 // Source directories
12851291 Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
12861292 // Assembly configuration for shading
1287- assembly / assemblyJarName := s " scala3-repl-shaded- ${version.value}.jar " ,
1288-
1293+ assembly / assemblyJarName := s " scala3-repl-embedded- ${version.value}.jar " ,
1294+ // Add scala3-repl to assembly classpath without making it a published dependency
1295+ assembly / fullClasspath := {
1296+ val replJar = (`scala3-repl` / Compile / packageBin).value
1297+ val cp = (assembly / fullClasspath).value
1298+ cp :+ Attributed .blank(replJar)
1299+ },
12891300 assembly / test := {}, // Don't run tests for assembly
12901301 // Exclude scala-library and jline from assembly (users provide them on classpath)
12911302 assembly / assemblyExcludedJars := {
@@ -1305,7 +1316,7 @@ object Build {
13051316 val tmpDir = IO .createTemporaryDirectory
13061317 try {
13071318 IO .unzip(originalJar, tmpDir)
1308- val shadedDir = tmpDir / " dotty" / " shaded "
1319+ val shadedDir = tmpDir / " dotty" / " isolated "
13091320 IO .createDirectory(shadedDir)
13101321
13111322 (tmpDir ** " *" ).get.foreach { file =>
@@ -1343,32 +1354,10 @@ object Build {
13431354
13441355 originalJar
13451356 },
1346- // Don't publish scala3-repl-shaded - it's an internal build artifact
1347- publish / skip := true ,
1348- publishLocal / skip := true ,
1349-
1350- )
1351-
1352- lazy val `scala3-repl-embedded` = project.in(file(" repl-embedded" ))
1353- .dependsOn(`scala-library-bootstrapped`)
1354- .settings(publishSettings)
1355- .settings(
1356- name := " scala3-repl-embedded" ,
1357- moduleName := " scala3-repl-embedded" ,
1358- version := dottyVersion,
1359- versionScheme := Some (" semver-spec" ),
1360- scalaVersion := referenceVersion,
1361- crossPaths := true ,
1362- libraryDependencies ++= Seq (
1363- " org.jline" % " jline-reader" % " 3.29.0" ,
1364- " org.jline" % " jline-terminal" % " 3.29.0" ,
1365- " org.jline" % " jline-terminal-jni" % " 3.29.0" ,
1366- ),
1367- // No source files in this project - just publishes the shaded jar
1368- Compile / unmanagedSourceDirectories := Seq .empty,
1369- // Use the shaded assembly jar as our packageBin
1370- Compile / packageBin := (`scala3-repl-shaded` / Compile / assembly).value,
1357+ // Use the shaded assembly jar as our packageBin for publishing
1358+ Compile / packageBin := (Compile / assembly).value,
13711359 publish / skip := false ,
1360+
13721361 )
13731362
13741363 // ==============================================================================================
0 commit comments