-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from alejandrohdezma/feature/skip-in-publish
- Loading branch information
Showing
9 changed files
with
70 additions
and
13 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
16 changes: 8 additions & 8 deletions
16
modules/sbt-modules/src/sbt-test/sbt-modules/all-modules/build.sbt
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,13 +1,13 @@ | ||
lazy val a = module | ||
lazy val b = module | ||
lazy val c = module.settings(skip in publish := true) | ||
|
||
lazy val c = project.dependsOn(allModules: _*) | ||
lazy val d = project.dependsOn(allModules: _*) | ||
|
||
TaskKey[Unit]("check", "Checks c depends on a & b using `allModules`") := { | ||
val expected = List( | ||
ClasspathDependency(LocalProject("b"), None), | ||
ClasspathDependency(LocalProject("a"), None) | ||
) | ||
|
||
assert(c.dependencies == expected, s"Found: ${c.dependencies}\nExpected: $expected") | ||
TaskKey[Unit]("check", "Checks skip in publish for every module in build") := { | ||
assert(!(a / publish / skip).value) | ||
assert(!(b / publish / skip).value) | ||
assert((c / publish / skip).value) | ||
assert((d / publish / skip).value) | ||
assert((LocalRootProject / publish / skip).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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# this test ensures `allModules` contains the list of modules | ||
# this test ensures `skip in publish` setting is set correctly | ||
> check |
11 changes: 10 additions & 1 deletion
11
modules/sbt-modules/src/sbt-test/sbt-modules/simple/build.sbt
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,2 +1,3 @@ | ||
# this test ensures modules are instantiated from "modules" folder | ||
> check | ||
> checkModules | ||
> checkRoot |
13 changes: 13 additions & 0 deletions
13
modules/sbt-modules/src/sbt-test/sbt-modules/skip-in-publish/build.sbt
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,13 @@ | ||
lazy val a = module | ||
lazy val b = module | ||
|
||
lazy val c = project.dependsOn(allModules: _*) | ||
|
||
TaskKey[Unit]("check", "Checks c depends on a & b using `allModules`") := { | ||
val expected = List( | ||
ClasspathDependency(LocalProject("b"), None), | ||
ClasspathDependency(LocalProject("a"), None) | ||
) | ||
|
||
assert(c.dependencies == expected, s"Found: ${c.dependencies}\nExpected: $expected") | ||
} |
1 change: 1 addition & 0 deletions
1
modules/sbt-modules/src/sbt-test/sbt-modules/skip-in-publish/project/plugins.sbt
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("com.alejandrohdezma" % "sbt-modules" % sys.props("plugin.version")) |
2 changes: 2 additions & 0 deletions
2
modules/sbt-modules/src/sbt-test/sbt-modules/skip-in-publish/test
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,2 @@ | ||
# this test ensures `allModules` contains the list of modules | ||
> check |