From b6569c7d4b2eace0cba97fa014978b86c10c7712 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 4 Aug 2017 16:20:01 +0200 Subject: [PATCH 1/6] Switch to sbt 0.13.16 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index d9654cdc2..c091b86ca 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16-M1 +sbt.version=0.13.16 From 662cf62c9528108498c2000e91aba94c130411f4 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 4 Aug 2017 16:20:02 +0200 Subject: [PATCH 2/6] Switch to sbt-mima 0.1.15 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 34b1720c7..873a980fa 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ plugins_( "io.get-coursier" % "sbt-coursier" % coursierVersion, - "com.typesafe" % "sbt-mima-plugin" % "0.1.14", + "com.typesafe" % "sbt-mima-plugin" % "0.1.15", "org.xerial.sbt" % "sbt-pack" % "0.8.2", "com.jsuereth" % "sbt-pgp" % "1.0.1", "com.typesafe.sbt" % "sbt-proguard" % "0.2.3", From a798b04d999d7b2ee896c2909bf8d25c96bd532a Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 4 Aug 2017 16:20:02 +0200 Subject: [PATCH 3/6] Switch to scala-js 0.6.19 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 873a980fa..e7969dcb9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,7 +6,7 @@ plugins_( "com.jsuereth" % "sbt-pgp" % "1.0.1", "com.typesafe.sbt" % "sbt-proguard" % "0.2.3", "com.github.gseitz" % "sbt-release" % "1.0.5", - "org.scala-js" % "sbt-scalajs" % "0.6.17", + "org.scala-js" % "sbt-scalajs" % "0.6.19", "org.scoverage" % "sbt-scoverage" % "1.4.0", "io.get-coursier" % "sbt-shading" % coursierVersion, "org.xerial.sbt" % "sbt-sonatype" % "1.1", From 4e74e7f66dbe45e165ca696829eecb8b8b020d72 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 4 Aug 2017 16:20:02 +0200 Subject: [PATCH 4/6] Take into account new cross version fields in sbt 1.0 --- .../main/scala-2.12/coursier/SbtCompatibility.scala | 4 ++-- .../src/sbt-test/sbt-coursier/scala-js/build.sbt | 3 +++ .../sbt-coursier/scala-js/project/plugins.sbt | 13 +++++++++++++ .../src/sbt-test/sbt-coursier/scala-js/test | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier/scala-js/build.sbt create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier/scala-js/project/plugins.sbt create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier/scala-js/test diff --git a/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala b/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala index 257ddac1b..c02b6f6b4 100644 --- a/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala +++ b/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala @@ -22,12 +22,12 @@ object SbtCompatibility { implicit class BinaryOps(private val binary: Binary) extends AnyVal { def remapVersion(scalaBinaryVersion: String): String = - scalaBinaryVersion + binary.prefix + scalaBinaryVersion + binary.suffix } implicit class FullOps(private val full: Full) extends AnyVal { def remapVersion(scalaVersion: String): String = - scalaVersion + full.prefix + scalaVersion + full.suffix } } diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/build.sbt new file mode 100644 index 000000000..2c43a4b30 --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/build.sbt @@ -0,0 +1,3 @@ +scalaVersion := "2.12.3" +enablePlugins(ScalaJSPlugin) +libraryDependencies += "org.scala-js" %%% "scalajs-java-time" % "0.2.2" diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/project/plugins.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/project/plugins.sbt new file mode 100644 index 000000000..6abe6ecfb --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/project/plugins.sbt @@ -0,0 +1,13 @@ +{ + val pluginVersion = sys.props.getOrElse( + "plugin.version", + throw new RuntimeException( + """|The system property 'plugin.version' is not defined. + |Specify this property using the scriptedLaunchOpts -D.""".stripMargin + ) + ) + + addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion) +} + +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.19") diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/test b/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/test new file mode 100644 index 000000000..103bd8d2f --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier/scala-js/test @@ -0,0 +1 @@ +> update From 930a0129653da3016d5c77150cd53341f5df40cb Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 4 Aug 2017 16:20:03 +0200 Subject: [PATCH 5/6] Switch to sbt 1.0.0-RC3 --- project/Settings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Settings.scala b/project/Settings.scala index 65fc6e16d..cfc28083a 100644 --- a/project/Settings.scala +++ b/project/Settings.scala @@ -225,7 +225,7 @@ object Settings { sbtVersion := { scalaBinaryVersion.value match { case "2.10" => "0.13.8" - case "2.12" => "1.0.0-RC2" + case "2.12" => "1.0.0-RC3" case _ => sbtVersion.value } }, From d17e9b93b9a5d71abb17420457e3462251369d26 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Fri, 4 Aug 2017 16:20:04 +0200 Subject: [PATCH 6/6] Ensure publishing signed things works fine --- .../coursier/SbtCompatibility.scala | 3 ++ .../coursier/SbtCompatibility.scala | 3 ++ .../main/scala/coursier/CoursierPlugin.scala | 7 ++-- .../src/main/scala/coursier/ToSbt.scala | 14 ++++---- .../publish-local-signed/README | 3 ++ .../publish-local-signed/build.sbt | 6 ++++ .../publish-local-signed/project/plugins.sbt | 13 ++++++++ .../publish-local-signed/pubring.pgp | 17 ++++++++++ .../publish-local-signed/secring.pgp | 32 +++++++++++++++++++ .../src/main/scala/Foo.scala | 1 + .../publish-local-signed/test | 1 + .../publish-local-signed/README | 3 ++ .../publish-local-signed/build.sbt | 6 ++++ .../publish-local-signed/project/plugins.sbt | 11 +++++++ .../publish-local-signed/pubring.pgp | 17 ++++++++++ .../publish-local-signed/secring.pgp | 32 +++++++++++++++++++ .../src/main/scala/Foo.scala | 1 + .../publish-local-signed/test | 1 + 18 files changed, 158 insertions(+), 13 deletions(-) create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/README create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/build.sbt create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/project/plugins.sbt create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/pubring.pgp create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/secring.pgp create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/src/main/scala/Foo.scala create mode 100644 sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/test create mode 100644 sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README create mode 100644 sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt create mode 100644 sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt create mode 100644 sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp create mode 100644 sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp create mode 100644 sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala create mode 100644 sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test diff --git a/sbt-coursier/src/main/scala-2.10/coursier/SbtCompatibility.scala b/sbt-coursier/src/main/scala-2.10/coursier/SbtCompatibility.scala index 66cdfb17b..4890b9836 100644 --- a/sbt-coursier/src/main/scala-2.10/coursier/SbtCompatibility.scala +++ b/sbt-coursier/src/main/scala-2.10/coursier/SbtCompatibility.scala @@ -141,4 +141,7 @@ object SbtCompatibility { def dependencies = module.modules } + def needsIvyXmlLocal = sbt.Keys.deliverLocalConfiguration + def needsIvyXml = sbt.Keys.deliverConfiguration + } diff --git a/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala b/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala index c02b6f6b4..3a8a75f8a 100644 --- a/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala +++ b/sbt-coursier/src/main/scala-2.12/coursier/SbtCompatibility.scala @@ -30,4 +30,7 @@ object SbtCompatibility { full.prefix + scalaVersion + full.suffix } + def needsIvyXmlLocal = sbt.Keys.publishLocalConfiguration + def needsIvyXml = sbt.Keys.publishConfiguration + } diff --git a/sbt-coursier/src/main/scala/coursier/CoursierPlugin.scala b/sbt-coursier/src/main/scala/coursier/CoursierPlugin.scala index 6d376cf98..335059163 100644 --- a/sbt-coursier/src/main/scala/coursier/CoursierPlugin.scala +++ b/sbt-coursier/src/main/scala/coursier/CoursierPlugin.scala @@ -5,8 +5,6 @@ import sbt.Keys._ import SbtCompatibility._ -import coursier.core.ResolutionProcess - object CoursierPlugin extends AutoPlugin { override def trigger = allRequirements @@ -70,7 +68,6 @@ object CoursierPlugin extends AutoPlugin { task: TaskKey[T], shadedConfigOpt: Option[(String, String)] ): Setting[Task[T]] = - // not 100% sure that make writeFiles below happen before the actions triggered by task.value... task := task.dependsOn(Def.task { val currentProject = { val proj = coursierProject.value @@ -97,8 +94,8 @@ object CoursierPlugin extends AutoPlugin { withClassifiers = true, sbtClassifiers = true ).value, - makeIvyXmlBefore(publishLocalConfiguration, shadedConfigOpt), - makeIvyXmlBefore(publishConfiguration, shadedConfigOpt), + makeIvyXmlBefore(needsIvyXmlLocal, shadedConfigOpt), + makeIvyXmlBefore(needsIvyXml, shadedConfigOpt), update := Tasks.updateTask( shadedConfigOpt, withClassifiers = false diff --git a/sbt-coursier/src/main/scala/coursier/ToSbt.scala b/sbt-coursier/src/main/scala/coursier/ToSbt.scala index d8ea8da8d..875115fb6 100644 --- a/sbt-coursier/src/main/scala/coursier/ToSbt.scala +++ b/sbt-coursier/src/main/scala/coursier/ToSbt.scala @@ -1,12 +1,10 @@ package coursier +import java.io.File import java.util.GregorianCalendar import java.util.concurrent.ConcurrentHashMap import coursier.maven.MavenSource - -import sbt._ - import SbtCompatibility._ object ToSbt { @@ -50,7 +48,7 @@ object ToSbt { .orElse(MavenSource.typeDefaultClassifierOpt(artifact.attributes.`type`)) ) // .withConfigurations(Vector()) - .withUrl(Some(url(artifact.url))) + .withUrl(Some(sbt.url(artifact.url))) .withExtraAttributes(module.attributes ++ extraProperties) } @@ -72,7 +70,7 @@ object ToSbt { val callers = dependees.map { case (dependee, dependeeProj) => - Caller( + sbt.Caller( ToSbt.moduleId(dependee, dependeeProj.properties.toMap), dependeeProj.configurations.keys.toVector.map(ConfigRef(_)), dependee.module.attributes ++ dependeeProj.properties, @@ -223,17 +221,17 @@ object ToSbt { includeSignatures = includeSignatures ) - ConfigurationReport( + sbt.ConfigurationReport( ConfigRef(config), reports.toVector, Vector() ) } - UpdateReport( + sbt.UpdateReport( null, configReports.toVector, - UpdateStats(-1L, -1L, -1L, cached = false), + sbt.UpdateStats(-1L, -1L, -1L, cached = false), Map.empty ) } diff --git a/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/README b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/README new file mode 100644 index 000000000..b0e252877 --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/README @@ -0,0 +1,3 @@ +Only run with sbt 0.13 here - requires sbt-pgp-coursier with sbt 1.0 + +A few things from this test were grabbed from https://github.com/sbt/sbt-pgp/tree/431c0a50fc5e91b881ebb154f22cc6a0b209be10/pgp-plugin/src/sbt-test/sbt-pgp/skip diff --git a/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/build.sbt new file mode 100644 index 000000000..8759d53dd --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/build.sbt @@ -0,0 +1,6 @@ +scalaVersion := "2.12.3" + +// seen in https://github.com/sbt/sbt-pgp/blob/431c0a50fc5e91b881ebb154f22cc6a0b209be10/pgp-plugin/src/sbt-test/sbt-pgp/skip/build.sbt +credentials.in(GlobalScope) := Seq(Credentials("", "pgp", "", "test password")) +pgpSecretRing := baseDirectory.value / "secring.pgp" +pgpPublicRing := baseDirectory.value / "pubring.pgp" diff --git a/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/project/plugins.sbt b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/project/plugins.sbt new file mode 100644 index 000000000..3b6ee8315 --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/project/plugins.sbt @@ -0,0 +1,13 @@ +{ + val pluginVersion = sys.props.getOrElse( + "plugin.version", + throw new RuntimeException( + """|The system property 'plugin.version' is not defined. + |Specify this property using the scriptedLaunchOpts -D.""".stripMargin + ) + ) + + addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion) +} + +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1") diff --git a/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/pubring.pgp b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/pubring.pgp new file mode 100644 index 000000000..ee55772cc --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/pubring.pgp @@ -0,0 +1,17 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: BCPG v1.51 + +mQENBFVcLH0BCACmERkKh73zr+0nFl7/6WWP3QcNa3msWDlArP6GzQEOmFBNZEtv +1BRSKz1fGl4aZzpNPDh2rNcsjVhJPzwVLUzsJuWgBa2EdYafnsUjQ37V998iFhtZ +ZgbXieJ2yMvaNPPrPjgYBAZFrnQmH0oQDx+GWDd5Y3lQBx0heIJA5YjPN3meDzqZ +FC0qxSVeCPFYaxAFoMnNDEohpvGV3iiUTAyTgSDofxJqVV20oeMCJzC89VskCjSV +KIlCnKIRFA+WtND1AsJuIBM/x4JQkRF8xc/2tS5xGXSQllgwxHXEnhDDXcT0o6pY +Ni2xYSG0gcmwaBGvx8N1RjWcVms/iJ4ViayxABEBAAG0C1Rlc3QgPFRlc3Q+iQEc +BBMBAgAGBQJVXCx9AAoJEKotvJKVuRt6fQkH/1XhdHxOB5m92TasMkxCqjuK0EtQ +0HEIkoRC+Z9gOUqlhK58y+8DK9ZAEx/e09CDK1N+x/R3xQUKh2KbUpS7yiNzzqZO +OejWtmWw6gYNHy1COP9WKT8Qgr+z4d7GBTrGthEhvZftHyyqlN6JZJZ2ZcvE/Odz +QkMbd4aeRXi+KgzHp4fa1hLaA2BT7TT1trYH2L6OI6VbcEebnz+up738liHq9p/R +JrJP4JjLzWtEkL83pE6FHhXowsdaG8WKYfWRstX7RixHq5P13PW/iAZEAmJb08ER +mmguiicjExRk7UaIVwKPa5P1DAOgeK/ejCLsxrUKspIgt6JLQFbprGZHRdE= +=/1s8 +-----END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/secring.pgp b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/secring.pgp new file mode 100644 index 000000000..3123d8c7d --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/secring.pgp @@ -0,0 +1,32 @@ +-----BEGIN PGP PRIVATE KEY BLOCK----- +Version: BCPG v1.51 + +lQO+BFVcLH0BCACmERkKh73zr+0nFl7/6WWP3QcNa3msWDlArP6GzQEOmFBNZEtv +1BRSKz1fGl4aZzpNPDh2rNcsjVhJPzwVLUzsJuWgBa2EdYafnsUjQ37V998iFhtZ +ZgbXieJ2yMvaNPPrPjgYBAZFrnQmH0oQDx+GWDd5Y3lQBx0heIJA5YjPN3meDzqZ +FC0qxSVeCPFYaxAFoMnNDEohpvGV3iiUTAyTgSDofxJqVV20oeMCJzC89VskCjSV +KIlCnKIRFA+WtND1AsJuIBM/x4JQkRF8xc/2tS5xGXSQllgwxHXEnhDDXcT0o6pY +Ni2xYSG0gcmwaBGvx8N1RjWcVms/iJ4ViayxABEBAAH+AwMCQJCBiVce8z5gAZr+ +L8W6NOs8orCIgLbCjKAHuKan9mZXtvOaml/8EDiBjLvwekUQj0OI6S29y5QsQpvn +lo8vXAsJnA/Q0olrAim2aZPOXVjQOYsOwExo4SAu7zXBQ3w3+jYsM5kHYPWICr3g +3LzhVUmDTHjein/Xa9X7M8bzAY0Esoabl1aSKZ9K15P2ss7noHXrKZPxRk3jb0XP +jHE2h5zTLLkdyXnZ74ILVYYEOjqe7P/+eWBL5TIan73ekNCKkgRBKI+pWB8Bc8sA +ww2WtlkpsogVItjZ7spk03HVykSr/hS2TnVoR1vX+C8bPLjvwksNORWELf9z32vA +ASgqoqeKMc+qHLPnZOrNIoCwUgBHLq/XL09E4Sav1TnqQt14Ya3oTiWQARMY+6jC +FGpHhKhx4XjrBjUyGWm8EzC/IPWIXSs9oeOxfSag7QNCf3F1fOjUOYkt32bTpEiM +X5sxrovkW/bh0U7thnIsHeklDx99U89F3J0K5svN66f7XplN3wYgwBJA/Fjymgj0 +zYN0cibnL1rp6zyMRSu5iDQRq1A9rFzsOQb4+gyNMUvlSM1ajA/sFvHsk0xFXdPG +ADOx9Tn3f4JN58ylGnMygtBmcS4f+lDVS0Q96lRuyFRTze/+JuhVTPNk2kClNp8y +98dc4UMawEyZ55EbxhVKx10jZ74Sswk8N15NhSZN5IKBUwQ1JWAoMnn0UDFeniBW +gjmD/82a0QzosJRkOEKqaCUK02FUgFNcB/6Aauj5Pm6vDehWnk+4Kz4f2QrqdD+Y +DquqcQ88gPj7jJnRX/+lMwKd73PeK3GfpvWCkRcliUs47LQ585uc03lArxpG2j74 +hG9Lxt/B545sqsYt2ViJ0hNBRgwfUdGy6NVef4F6JxVxkD32eavDDUBfXC/a5zRu +m7QLVGVzdCA8VGVzdD6JARwEEwECAAYFAlVcLH0ACgkQqi28kpW5G3p9CQf/VeF0 +fE4Hmb3ZNqwyTEKqO4rQS1DQcQiShEL5n2A5SqWErnzL7wMr1kATH97T0IMrU37H +9HfFBQqHYptSlLvKI3POpk456Na2ZbDqBg0fLUI4/1YpPxCCv7Ph3sYFOsa2ESG9 +l+0fLKqU3olklnZly8T853NCQxt3hp5FeL4qDMenh9rWEtoDYFPtNPW2tgfYvo4j +pVtwR5ufP66nvfyWIer2n9Emsk/gmMvNa0SQvzekToUeFejCx1obxYph9ZGy1ftG +LEerk/Xc9b+IBkQCYlvTwRGaaC6KJyMTFGTtRohXAo9rk/UMA6B4r96MIuzGtQqy +kiC3oktAVumsZkdF0Q== +=wGX/ +-----END PGP PRIVATE KEY BLOCK----- \ No newline at end of file diff --git a/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/src/main/scala/Foo.scala b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/src/main/scala/Foo.scala new file mode 100644 index 000000000..d3c853cc0 --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/src/main/scala/Foo.scala @@ -0,0 +1 @@ +object Foo diff --git a/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/test b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/test new file mode 100644 index 000000000..97640db3a --- /dev/null +++ b/sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed/test @@ -0,0 +1 @@ +> publishLocalSigned diff --git a/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README new file mode 100644 index 000000000..507b1e0e2 --- /dev/null +++ b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README @@ -0,0 +1,3 @@ +See a similar test under sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed + +A few things from this test were grabbed from https://github.com/sbt/sbt-pgp/tree/431c0a50fc5e91b881ebb154f22cc6a0b209be10/pgp-plugin/src/sbt-test/sbt-pgp/skip diff --git a/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt new file mode 100644 index 000000000..8759d53dd --- /dev/null +++ b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt @@ -0,0 +1,6 @@ +scalaVersion := "2.12.3" + +// seen in https://github.com/sbt/sbt-pgp/blob/431c0a50fc5e91b881ebb154f22cc6a0b209be10/pgp-plugin/src/sbt-test/sbt-pgp/skip/build.sbt +credentials.in(GlobalScope) := Seq(Credentials("", "pgp", "", "test password")) +pgpSecretRing := baseDirectory.value / "secring.pgp" +pgpPublicRing := baseDirectory.value / "pubring.pgp" diff --git a/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt new file mode 100644 index 000000000..d59204c4b --- /dev/null +++ b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt @@ -0,0 +1,11 @@ +{ + val pluginVersion = sys.props.getOrElse( + "plugin.version", + throw new RuntimeException( + """|The system property 'plugin.version' is not defined. + |Specify this property using the scriptedLaunchOpts -D.""".stripMargin + ) + ) + + addSbtPlugin("io.get-coursier" % "sbt-pgp-coursier" % pluginVersion) +} diff --git a/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp new file mode 100644 index 000000000..ee55772cc --- /dev/null +++ b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp @@ -0,0 +1,17 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: BCPG v1.51 + +mQENBFVcLH0BCACmERkKh73zr+0nFl7/6WWP3QcNa3msWDlArP6GzQEOmFBNZEtv +1BRSKz1fGl4aZzpNPDh2rNcsjVhJPzwVLUzsJuWgBa2EdYafnsUjQ37V998iFhtZ +ZgbXieJ2yMvaNPPrPjgYBAZFrnQmH0oQDx+GWDd5Y3lQBx0heIJA5YjPN3meDzqZ +FC0qxSVeCPFYaxAFoMnNDEohpvGV3iiUTAyTgSDofxJqVV20oeMCJzC89VskCjSV +KIlCnKIRFA+WtND1AsJuIBM/x4JQkRF8xc/2tS5xGXSQllgwxHXEnhDDXcT0o6pY +Ni2xYSG0gcmwaBGvx8N1RjWcVms/iJ4ViayxABEBAAG0C1Rlc3QgPFRlc3Q+iQEc +BBMBAgAGBQJVXCx9AAoJEKotvJKVuRt6fQkH/1XhdHxOB5m92TasMkxCqjuK0EtQ +0HEIkoRC+Z9gOUqlhK58y+8DK9ZAEx/e09CDK1N+x/R3xQUKh2KbUpS7yiNzzqZO +OejWtmWw6gYNHy1COP9WKT8Qgr+z4d7GBTrGthEhvZftHyyqlN6JZJZ2ZcvE/Odz +QkMbd4aeRXi+KgzHp4fa1hLaA2BT7TT1trYH2L6OI6VbcEebnz+up738liHq9p/R +JrJP4JjLzWtEkL83pE6FHhXowsdaG8WKYfWRstX7RixHq5P13PW/iAZEAmJb08ER +mmguiicjExRk7UaIVwKPa5P1DAOgeK/ejCLsxrUKspIgt6JLQFbprGZHRdE= +=/1s8 +-----END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp new file mode 100644 index 000000000..3123d8c7d --- /dev/null +++ b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp @@ -0,0 +1,32 @@ +-----BEGIN PGP PRIVATE KEY BLOCK----- +Version: BCPG v1.51 + +lQO+BFVcLH0BCACmERkKh73zr+0nFl7/6WWP3QcNa3msWDlArP6GzQEOmFBNZEtv +1BRSKz1fGl4aZzpNPDh2rNcsjVhJPzwVLUzsJuWgBa2EdYafnsUjQ37V998iFhtZ +ZgbXieJ2yMvaNPPrPjgYBAZFrnQmH0oQDx+GWDd5Y3lQBx0heIJA5YjPN3meDzqZ +FC0qxSVeCPFYaxAFoMnNDEohpvGV3iiUTAyTgSDofxJqVV20oeMCJzC89VskCjSV +KIlCnKIRFA+WtND1AsJuIBM/x4JQkRF8xc/2tS5xGXSQllgwxHXEnhDDXcT0o6pY +Ni2xYSG0gcmwaBGvx8N1RjWcVms/iJ4ViayxABEBAAH+AwMCQJCBiVce8z5gAZr+ +L8W6NOs8orCIgLbCjKAHuKan9mZXtvOaml/8EDiBjLvwekUQj0OI6S29y5QsQpvn +lo8vXAsJnA/Q0olrAim2aZPOXVjQOYsOwExo4SAu7zXBQ3w3+jYsM5kHYPWICr3g +3LzhVUmDTHjein/Xa9X7M8bzAY0Esoabl1aSKZ9K15P2ss7noHXrKZPxRk3jb0XP +jHE2h5zTLLkdyXnZ74ILVYYEOjqe7P/+eWBL5TIan73ekNCKkgRBKI+pWB8Bc8sA +ww2WtlkpsogVItjZ7spk03HVykSr/hS2TnVoR1vX+C8bPLjvwksNORWELf9z32vA +ASgqoqeKMc+qHLPnZOrNIoCwUgBHLq/XL09E4Sav1TnqQt14Ya3oTiWQARMY+6jC +FGpHhKhx4XjrBjUyGWm8EzC/IPWIXSs9oeOxfSag7QNCf3F1fOjUOYkt32bTpEiM +X5sxrovkW/bh0U7thnIsHeklDx99U89F3J0K5svN66f7XplN3wYgwBJA/Fjymgj0 +zYN0cibnL1rp6zyMRSu5iDQRq1A9rFzsOQb4+gyNMUvlSM1ajA/sFvHsk0xFXdPG +ADOx9Tn3f4JN58ylGnMygtBmcS4f+lDVS0Q96lRuyFRTze/+JuhVTPNk2kClNp8y +98dc4UMawEyZ55EbxhVKx10jZ74Sswk8N15NhSZN5IKBUwQ1JWAoMnn0UDFeniBW +gjmD/82a0QzosJRkOEKqaCUK02FUgFNcB/6Aauj5Pm6vDehWnk+4Kz4f2QrqdD+Y +DquqcQ88gPj7jJnRX/+lMwKd73PeK3GfpvWCkRcliUs47LQ585uc03lArxpG2j74 +hG9Lxt/B545sqsYt2ViJ0hNBRgwfUdGy6NVef4F6JxVxkD32eavDDUBfXC/a5zRu +m7QLVGVzdCA8VGVzdD6JARwEEwECAAYFAlVcLH0ACgkQqi28kpW5G3p9CQf/VeF0 +fE4Hmb3ZNqwyTEKqO4rQS1DQcQiShEL5n2A5SqWErnzL7wMr1kATH97T0IMrU37H +9HfFBQqHYptSlLvKI3POpk456Na2ZbDqBg0fLUI4/1YpPxCCv7Ph3sYFOsa2ESG9 +l+0fLKqU3olklnZly8T853NCQxt3hp5FeL4qDMenh9rWEtoDYFPtNPW2tgfYvo4j +pVtwR5ufP66nvfyWIer2n9Emsk/gmMvNa0SQvzekToUeFejCx1obxYph9ZGy1ftG +LEerk/Xc9b+IBkQCYlvTwRGaaC6KJyMTFGTtRohXAo9rk/UMA6B4r96MIuzGtQqy +kiC3oktAVumsZkdF0Q== +=wGX/ +-----END PGP PRIVATE KEY BLOCK----- \ No newline at end of file diff --git a/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala new file mode 100644 index 000000000..d3c853cc0 --- /dev/null +++ b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala @@ -0,0 +1 @@ +object Foo diff --git a/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test new file mode 100644 index 000000000..97640db3a --- /dev/null +++ b/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test @@ -0,0 +1 @@ +> publishLocalSigned