-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JlinkPlugin: support multi-release dependencies (#1244)
* Fix error logging in JlinkPlugin (#1243) * Add a test case for multi-release dependency (#1243) * Add support for multi-release dependencies (#1243)
- Loading branch information
1 parent
659e0a9
commit 6e6eca0
Showing
5 changed files
with
90 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Various JlinkPlugin test cases that don't warrant setting up separate | ||
// `scripted` tests. | ||
|
||
import scala.sys.process.Process | ||
import com.typesafe.sbt.packager.Compat._ | ||
|
||
val runChecks = taskKey[Unit]("Run checks for a specific issue") | ||
|
||
// Exclude Scala by default to simplify the test. | ||
autoScalaLibrary in ThisBuild := false | ||
|
||
// Should succeed for multi-release artifacts | ||
val issue1243 = project | ||
.enablePlugins(JlinkPlugin) | ||
.settings( | ||
libraryDependencies ++= List( | ||
// An arbitrary multi-release artifact | ||
"org.apache.logging.log4j" % "log4j-core" % "2.12.0" | ||
), | ||
// Don't bother with providing dependencies. | ||
jlinkIgnoreMissingDependency := JlinkIgnore.everything, | ||
runChecks := jlinkBuildImage.value | ||
) |
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,8 @@ | ||
{ | ||
val pluginVersion = sys.props("project.version") | ||
if (pluginVersion == null) | ||
throw new RuntimeException("""|The system property 'project.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin) | ||
else | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version")) | ||
} |
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,3 @@ | ||
# These tasks can be aggregated, but running them one by one means | ||
# more granular output in case of a failure. | ||
> issue1243/runChecks |
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