-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Idea: Fix dependency resolution of platform dependencies
JavaScript and native dependencies were ignored because the two parameters `platformVersion` and `compilerVersion` had been mixed up. Add a `require()` to `resolveSubset()` in order to enforce that a valid set of dependencies is passed.
- Loading branch information
Showing
4 changed files
with
59 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package seed.artefact | ||
|
||
import minitest.SimpleTestSuite | ||
import seed.model.Build.Dep | ||
import seed.model.Platform.JavaScript | ||
|
||
object ArtefactResolutionSpec extends SimpleTestSuite { | ||
test("dependencyFromDep()") { | ||
val scalaDep = Dep("org.scala-js", "scalajs-dom", "0.9.6") | ||
val javaDep = ArtefactResolution.dependencyFromDep( | ||
scalaDep, JavaScript, "0.6", "2.12") | ||
assertEquals(javaDep, | ||
Dep("org.scala-js", "scalajs-dom_sjs0.6_2.12", "0.9.6")) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package seed.artefact | ||
|
||
import minitest.SimpleTestSuite | ||
import seed.model.Build | ||
import seed.model.Build.Dep | ||
|
||
object CoursierSpec extends SimpleTestSuite { | ||
test("Resolve dependency") { | ||
val dep = Dep("org.scala-js", "scalajs-dom_sjs0.6_2.12", "0.9.6") | ||
val resolution = Coursier.resolveAndDownload(Set(dep), | ||
Build.Resolvers(), Coursier.DefaultIvyPath, | ||
Coursier.DefaultCachePath, optionalArtefacts = true) | ||
|
||
val result = | ||
Coursier.localArtefacts(resolution, Set(dep), optionalArtefacts = true) | ||
assert( | ||
result.exists(_.javaDocJar.nonEmpty) && | ||
result.exists(_.sourcesJar.nonEmpty)) | ||
} | ||
} |