diff --git a/sbt/src/sbt-test/project/transitive-plugins/a/build.sbt b/sbt/src/sbt-test/project/transitive-plugins/a/build.sbt deleted file mode 100644 index b4dba18b0..000000000 --- a/sbt/src/sbt-test/project/transitive-plugins/a/build.sbt +++ /dev/null @@ -1,11 +0,0 @@ -publishTo := Some(Resolver.file("test-publish", (baseDirectory in ThisBuild).value / "repo/")) -resolvers += ("test" at ((baseDirectory in ThisBuild).value / "repo/").asURL.toString) -resolvers += Resolver.mavenLocal - -name := "demo1" - -organization := "org.example" - -version := "0.1" - -sbtPlugin := true diff --git a/sbt/src/sbt-test/project/transitive-plugins/b/build.sbt b/sbt/src/sbt-test/project/transitive-plugins/b/build.sbt deleted file mode 100644 index f3cc43f01..000000000 --- a/sbt/src/sbt-test/project/transitive-plugins/b/build.sbt +++ /dev/null @@ -1,13 +0,0 @@ -publishTo := Some(Resolver.file("test-publish", (baseDirectory in ThisBuild).value / "repo")) -resolvers += ("test" at ((baseDirectory in ThisBuild).value / "repo").asURL.toString) -resolvers += Resolver.mavenLocal - -name := "demo2" - -organization := "org.example" - -version := "0.2" - -sbtPlugin := true - -addSbtPlugin("org.example" % "demo1" % "0.1") diff --git a/sbt/src/sbt-test/project/transitive-plugins/build.sbt b/sbt/src/sbt-test/project/transitive-plugins/build.sbt index 748bb09e2..163993352 100644 --- a/sbt/src/sbt-test/project/transitive-plugins/build.sbt +++ b/sbt/src/sbt-test/project/transitive-plugins/build.sbt @@ -1,17 +1,44 @@ +ThisBuild / organization := "org.example" lazy val root = (project in file(".")) - -lazy val a = proj(project in file("a")) -lazy val b = proj(project in file("b")) -lazy val c = proj(project in file("c")) - -def proj(p: Project): Project = - p.settings( - ivyPaths := IvyPaths((baseDirectory in root).value, Some((target in root).value / "ivy-cache")), - resolvers += { - val ivyHome = Classpaths.bootIvyHome(appConfiguration.value) getOrElse sys.error("Launcher did not provide the Ivy home directory.") - Resolver.file("real-local", ivyHome / "local")(Resolver.ivyStylePatterns) - }, - resolvers += Resolver.typesafeIvyRepo("releases"), // not sure why this isn't included by default - resolvers += Resolver.mavenLocal + .settings( + commonSettings + ) + +lazy val commonSettings = Seq( + ivyPaths := IvyPaths((baseDirectory in ThisBuild).value, Some((target in LocalRootProject).value / "ivy-cache")), + publishTo := Some(Resolver.file("test-publish", (baseDirectory in ThisBuild).value / "repo/")), + // to get sbt artifacts + resolvers += { + val ivyHome = Classpaths.bootIvyHome(appConfiguration.value) getOrElse sys.error("Launcher did not provide the Ivy home directory.") + Resolver.file("real-local", ivyHome / "local")(Resolver.ivyStylePatterns) + }, + resolvers += Resolver.mavenLocal, + resolvers += ("test-repo" at ((baseDirectory in ThisBuild).value / "repo/").asURL.toString) +) + +lazy val a = (project in file("a")) + .enablePlugins(SbtPlugin) + .settings( + commonSettings, + name := "demo1", + version := "0.1" + ) + +lazy val b = (project in file("b")) + .enablePlugins(SbtPlugin) + .settings( + commonSettings, + name := "demo2", + version := "0.2", + addSbtPlugin("org.example" % "demo1" % "0.1") + ) + +lazy val c = (project in file("c")) + .enablePlugins(SbtPlugin) + .settings( + commonSettings, + name := "demo3", + version := "0.3", + addSbtPlugin("org.example" % "demo2" % "0.2") ) diff --git a/sbt/src/sbt-test/project/transitive-plugins/c/build.sbt b/sbt/src/sbt-test/project/transitive-plugins/c/build.sbt deleted file mode 100644 index 283c7fede..000000000 --- a/sbt/src/sbt-test/project/transitive-plugins/c/build.sbt +++ /dev/null @@ -1,15 +0,0 @@ -publishTo := Some(Resolver.file("test-publish", (baseDirectory in ThisBuild).value / "repo")) -resolvers += ("test" at ((baseDirectory in ThisBuild).value / "repo").asURL.toString) -resolvers += Resolver.mavenLocal - -name := "demo3" - -organization := "org.example" - -version := "0.3" - -sbtPlugin := true - -//addSbtPlugin("org.example" % "demo1" % "0.1") - -addSbtPlugin("org.example" % "demo2" % "0.2")