diff --git a/extractor/src/test/data/1.9/internal_config/build.sbt b/extractor/src/test/data/1.9/internal_config/build.sbt new file mode 100644 index 0000000..d2063e1 --- /dev/null +++ b/extractor/src/test/data/1.9/internal_config/build.sbt @@ -0,0 +1,11 @@ +import sbt.librarymanagement.Configurations.{CompileInternal, RuntimeInternal, TestInternal} + +ThisBuild / version := "0.1.0-SNAPSHOT" + +ThisBuild / scalaVersion := "3.3.3" + +libraryDependencies ++= Seq( + "junit" % "junit" % "4.13.2" % TestInternal, + "org.scalacheck" %% "scalacheck" % "1.17.1" % CompileInternal , + "com.typesafe" % "config" % "1.4.3" % RuntimeInternal, +) diff --git a/extractor/src/test/scala/org/jetbrains/sbt/ImportSpec.scala b/extractor/src/test/scala/org/jetbrains/sbt/ImportSpec.scala index 489f285..366f0c4 100644 --- a/extractor/src/test/scala/org/jetbrains/sbt/ImportSpec.scala +++ b/extractor/src/test/scala/org/jetbrains/sbt/ImportSpec.scala @@ -118,6 +118,8 @@ class ImportSpec extends AnyFreeSpecLike { "dependency_resolve_sbt_classifiers" in { testProject("dependency_resolve_sbt_classifiers", SbtVersion_1_9, options = ResolveSbtClassifiers) } "dependency_resolve_sources_and_javadocs_and_sbt_classifiers" in { testProject("dependency_resolve_sources_and_javadocs_and_sbt_classifiers", SbtVersion_1_9, options = ResolveSourcesAndJavaDocsAndSbtClassifiers) } + "internal_config" in { testProject("internal_config", SbtVersion_1_9, options = ResolveSources) } + "dependency_resolve_sbt_classifiers_prod_test_sources_separated" in { testProject("dependency_resolve_sbt_classifiers_prod_test_sources_separated", SbtVersion_1_9, options = ResolveSbtClassifiersAndSeparateProdTestSources) } } } diff --git a/extractor/src/test/scala/org/jetbrains/sbt/extractors/RepositoryExtractorSpec.scala b/extractor/src/test/scala/org/jetbrains/sbt/extractors/RepositoryExtractorSpec.scala index a532f87..9f4702a 100644 --- a/extractor/src/test/scala/org/jetbrains/sbt/extractors/RepositoryExtractorSpec.scala +++ b/extractor/src/test/scala/org/jetbrains/sbt/extractors/RepositoryExtractorSpec.scala @@ -11,6 +11,8 @@ class RepositoryExtractorSpec extends AnyFreeSpecLike { private val projects: Seq[ProjectRef] = Seq("project-1", "project-2").map(ProjectRef(file("/tmp/test-project"), _)) + private val projectToConfigurationsName = projects.map(_ -> Seq(sbt.Compile.name)).toMap + "RepositoryExtractor" - { "extract modules for all accepted projects when supplied" in { val moduleId = (name: String) => ModuleID("com.example", name, "SNAPSHOT") @@ -33,7 +35,7 @@ class RepositoryExtractorSpec extends AnyFreeSpecLike { ).apply, updateClassifiersReports = None, classpathTypes = const(Set(Artifact.DefaultType)), - dependencyConfigurations = const(Seq(sbt.Compile)) + projectToConfigurationsName = projectToConfigurationsName ).extract val expected = Seq( @@ -78,7 +80,7 @@ class RepositoryExtractorSpec extends AnyFreeSpecLike { )) ).apply), classpathTypes = const(Set(Artifact.DefaultType)), - dependencyConfigurations = const(Seq(sbt.Compile)) + projectToConfigurationsName = projectToConfigurationsName ).extract val expected = Seq( @@ -105,7 +107,7 @@ class RepositoryExtractorSpec extends AnyFreeSpecLike { ).apply, updateClassifiersReports = None, classpathTypes = const(Set(Artifact.DefaultType)), - dependencyConfigurations = const(Seq(sbt.Compile)) + projectToConfigurationsName = projectToConfigurationsName ).extract val expected = Seq(