-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from xerial/nested-proj2
#132: Handle the context project appropriately
- Loading branch information
Showing
11 changed files
with
106 additions
and
32 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
> 'set version := "0.1"' | ||
> pack | ||
$ exists target/pack/lib/scala-library-2.11.8.jar | ||
$ exists target/pack/lib/scala-library-2.12.4.jar | ||
$ absent target/pack/lib/slf4j-api-1.7.2.jar | ||
$ exists target/pack/lib/slf4j-api-1.7.6.jar | ||
$ exists target/pack/lib/slf4j-api-1.7.6.jar |
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,16 @@ | ||
name := "nested" | ||
|
||
version in ThisBuild := "0.1" | ||
|
||
scalaVersion in ThisBuild := "2.12.4" | ||
|
||
enablePlugins(PackPlugin) | ||
|
||
lazy val root = (project in file(".")) | ||
.dependsOn(module1, module2) | ||
|
||
lazy val module1 = (project in file("modules/module1")).dependsOn(lib1) | ||
lazy val module2 = (project in file("modules/module2")).dependsOn(lib2) | ||
|
||
lazy val lib1 = project in file("libs/lib1") | ||
lazy val lib2 = project in file("libs/lib2") |
5 changes: 5 additions & 0 deletions
5
src/sbt-test/sbt-pack/nested-project/libs/lib1/src/main/scala/lib1/Lib1.scala
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 @@ | ||
package lib1 | ||
|
||
object Lib1 { | ||
val value = 1 | ||
} |
5 changes: 5 additions & 0 deletions
5
src/sbt-test/sbt-pack/nested-project/libs/lib2/src/main/scala/lib2/Lib2.scala
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 @@ | ||
package lib2 | ||
|
||
object Lib2 { | ||
val value = 2 | ||
} |
9 changes: 9 additions & 0 deletions
9
src/sbt-test/sbt-pack/nested-project/modules/module1/src/main/scala/service/Main.scala
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,9 @@ | ||
package service | ||
|
||
import lib1.Lib1 | ||
|
||
object Main { | ||
def main(args: Array[String]): Unit = { | ||
println(Lib1.value) | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/sbt-test/sbt-pack/nested-project/modules/module2/src/main/scala/service/Main.scala
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,9 @@ | ||
package service | ||
|
||
import lib2.Lib2 | ||
|
||
object Main { | ||
def main(args: Array[String]): Unit = { | ||
println(Lib2.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 @@ | ||
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.10.1-SNAPSHOT") |
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,16 @@ | ||
> 'set version := "0.1"' | ||
> pack | ||
$ exists target/pack/lib/module1_2.12-0.1.jar | ||
$ exists target/pack/lib/module2_2.12-0.1.jar | ||
$ exists target/pack/lib/lib1_2.12-0.1.jar | ||
$ exists target/pack/lib/lib2_2.12-0.1.jar | ||
$ absent modules/module1/target/pack/lib/module1_2.12-0.1.jar | ||
$ absent modules/module1/target/pack/lib/module2_2.12-0.1.jar | ||
$ absent modules/module1/target/pack/lib/lib1_2.12-0.1.jar | ||
$ absent modules/module1/target/pack/lib/lib2_2.12-0.1.jar | ||
|
||
> module1/pack | ||
$ exists modules/module1/target/pack/lib/module1_2.12-0.1.jar | ||
$ absent modules/module1/target/pack/lib/module2_2.12-0.1.jar | ||
$ exists modules/module1/target/pack/lib/lib1_2.12-0.1.jar | ||
$ absent modules/module1/target/pack/lib/lib2_2.12-0.1.jar |