sbt/sbt-app
bitloi 861fbccaea
[2.x] fix: Fixes autoScalaLibrary in test classloader (#8776)
When Test / autoScalaLibrary := false, build the non-fork test classloader
without the ScalaInstance layer: use Flat strategy and project classpath
only (rawCP), so tests do not see sbt's scala-library and avoid
NoSuchMethodError / version mismatch (e.g. scala/scala build).

- ClassLoaders.testTask: read autoScalaLibrary; when false use Flat and
  rawCP-only fullCP, and do not add si.libraryJars to exclude.
- Add scripted test tests/autoScalaLibrary-test-loader that runs test
  with Test / autoScalaLibrary := false.
2026-02-21 14:59:46 -05:00
..
src [2.x] fix: Fixes autoScalaLibrary in test classloader (#8776) 2026-02-21 14:59:46 -05:00