-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for unmanagedBase (lib) (#91)
* Fix #90 --------- Co-authored-by: Kizuki Yasue <kizuki-yasue@m3.com>
- Loading branch information
Showing
7 changed files
with
49 additions
and
0 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,15 @@ | ||
ThisBuild / version := "0.1.0-SNAPSHOT" | ||
|
||
lazy val util = projectMatrix | ||
.jvmPlatform(scalaVersions = Seq("2.12.19", "2.13.13")) | ||
|
||
lazy val root = (projectMatrix in file(".")) | ||
.dependsOn(util) | ||
.jvmPlatform(scalaVersions = Seq("2.12.19")) | ||
|
||
// ss is second system | ||
lazy val ss = projectMatrix | ||
.dependsOn(util) | ||
.jvmPlatform(scalaVersions = Seq("2.13.13")) | ||
|
||
lazy val strayJar = project |
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,5 @@ | ||
sys.props.get("plugin.version") match { | ||
case Some(x) => addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % x) | ||
case _ => sys.error("""|The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin) | ||
} |
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 @@ | ||
object Main extends App { | ||
println(com.example.Lib.getMessage) | ||
} |
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 @@ | ||
object Main extends App { | ||
println(com.example.Lib.getMessage) | ||
} |
7 changes: 7 additions & 0 deletions
7
src/sbt-test/projectMatrix/lib/strayJar/src/main/java/com/example/Lib.java
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,7 @@ | ||
package com.example; | ||
|
||
public class Lib { | ||
public static String getMessage() { | ||
return "Hello, World!"; | ||
} | ||
} |
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 @@ | ||
# debug | ||
#> unmanagedBase | ||
|
||
# make jar | ||
> strayJar/package | ||
|
||
# check root | ||
$ mkdir lib | ||
$ copy-file strayJar/target/scala-2.12/strayJar_2.12-0.1.0-SNAPSHOT.jar lib/strayJar.jar | ||
> root2_12/compile | ||
|
||
# check ss | ||
$ mkdir ss/lib | ||
$ copy-file strayJar/target/scala-2.12/strayJar_2.12-0.1.0-SNAPSHOT.jar ss/lib/strayJar.jar | ||
> ss/compile |