diff --git a/.travis.yml b/.travis.yml index fe8dc5a00..af5fed964 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,35 +25,18 @@ matrix: sudo: required services: - docker - - env: SCALA_VERSION=2.10 - os: linux - jdk: oraclejdk8 - sudo: required - services: - - docker - env: SCALA_VERSION=2.12 SBT_COURSIER=1 os: linux jdk: oraclejdk8 - env: SCALA_VERSION=2.12 SBT_SHADING=1 os: linux jdk: oraclejdk8 - - env: SCALA_VERSION=2.10 SBT_COURSIER=1 - os: linux - jdk: oraclejdk8 - services: - - docker - - env: SCALA_VERSION=2.10 SBT_SHADING=1 - os: linux - jdk: oraclejdk8 - env: SCALA_VERSION=2.12 SCALA_JS=1 os: linux jdk: oraclejdk8 - env: SCALA_VERSION=2.11 SCALA_JS=1 os: linux jdk: oraclejdk8 - - env: SCALA_VERSION=2.10 SCALA_JS=1 - os: linux - jdk: oraclejdk8 - os: linux jdk: oraclejdk8 script: diff --git a/appveyor.yml b/appveyor.yml index 47be3595e..a61516508 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,16 +25,12 @@ build_script: - ps: Start-Job -filepath .\scripts\start-it-auth-server.ps1 -ArgumentList $pwd, $env:TEST_REPOSITORY_HOST, $env:TEST_REPOSITORY_PORT, $env:TEST_REPOSITORY_USER, $env:TEST_REPOSITORY_PASSWORD - sbt scala212 coreJVM/publishLocal cacheJVM/publishLocal extra/publishLocal scalazJVM/publishLocal cli/publishLocal - sbt scala211 compile coreJVM/publishLocal - - sbt scala210 compile test_script: - sbt scala212 testsJVM/test - sbt scala211 testsJVM/test - - sbt scala210 testsJVM/test - sbt scala212 testsJVM/it:test - sbt scala211 testsJVM/it:test - - sbt scala210 testsJVM/it:test - - sbt scala212 "sbt-coursier/scripted sbt-coursier/simple" "sbt-shading/scripted sbt-shading/*" # for sbt 1.0 - - sbt scala210 "sbt-coursier/scripted sbt-coursier/*" "sbt-coursier/scripted sbt-coursier-0.13/*" "sbt-shading/scripted sbt-shading/*" "sbt-shading/scripted sbt-shading-0.13/*" # for sbt 0.13 + - sbt scala212 sbt-coursier/scripted sbt-shading/scripted branches: only: - master diff --git a/build.sbt b/build.sbt index 0fe94d8ad..502fa081f 100644 --- a/build.sbt +++ b/build.sbt @@ -10,11 +10,10 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .jvmConfigure(_.enablePlugins(ShadingPlugin)) .jvmSettings( shading, - quasiQuotesIfNecessary, - scalaXmlIfNecessary, libs ++= Seq( Deps.fastParse % "shaded", - Deps.jsoup % "shaded" + Deps.jsoup % "shaded", + Deps.scalaXml ), shadeNamespaces ++= Set( "org.jsoup", @@ -52,7 +51,7 @@ lazy val tests = crossProject(JSPlatform, JVMPlatform) dontPublish, hasITs, coursierPrefix, - libs += Deps.scalaAsync.value, + libs += Deps.scalaAsync, utest, sharedTestResources ) @@ -71,7 +70,7 @@ lazy val `proxy-tests` = project coursierPrefix, libs ++= Seq( Deps.dockerClient, - Deps.scalaAsync.value, + Deps.scalaAsync, Deps.slf4JNop ), utest, diff --git a/cli/src/main/scala-2.10/coursier/cli/Coursier.scala b/cli/src/main/scala-2.10/coursier/cli/Coursier.scala deleted file mode 100644 index 1f106cc1a..000000000 --- a/cli/src/main/scala-2.10/coursier/cli/Coursier.scala +++ /dev/null @@ -1,6 +0,0 @@ -package coursier.cli - -// dummy app to keep proguard quiet in 2.10 -object Coursier { - def main(args: Array[String]): Unit = {} -} diff --git a/project/Aliases.scala b/project/Aliases.scala index ee5cf0072..43cb12601 100644 --- a/project/Aliases.scala +++ b/project/Aliases.scala @@ -81,13 +81,8 @@ object Aliases { scriptedSettings.filterNot(_.key.key.label == libraryDependencies.key.label) ++ Seq( libraryDependencies ++= { scalaBinaryVersion.value match { - case "2.10" | "2.12" => + case "2.12" => partialVersion(scriptedSbt.value) match { - case Some((0, 13)) => - Seq( - "org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % ScriptedConf, - "org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf - ) case Some((1, _)) => Seq( "org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % ScriptedConf, diff --git a/project/Deps.scala b/project/Deps.scala index f88639cc1..ba99d43e0 100644 --- a/project/Deps.scala +++ b/project/Deps.scala @@ -24,15 +24,8 @@ object Deps { sbtPluginExtra("com.jsuereth" % "sbt-pgp" % ver, sbtv, sv) } - def scalaAsync = Def.setting { + def scalaAsync = "org.scala-lang.modules" %% "scala-async" % "0.9.7" - val version = - if (scalaBinaryVersion.value == "2.10") "0.9.5" - else "0.9.7" - - "org.scala-lang.modules" %% "scala-async" % version - } - def jarjar = "io.get-coursier.jarjar" % "jarjar-core" % "1.0.1-coursier-1" def jarjarTransitiveDeps = Seq( diff --git a/project/ScalaVersion.scala b/project/ScalaVersion.scala index 76451f00b..5af00a4ef 100644 --- a/project/ScalaVersion.scala +++ b/project/ScalaVersion.scala @@ -3,9 +3,8 @@ object ScalaVersion { def scala212 = "2.12.6" def scala211 = "2.11.12" - def scala210 = "2.10.7" - val versions = Seq(scala212, scala211, scala210) + val versions = Seq(scala212, scala211) val map = versions .map { v => diff --git a/project/Settings.scala b/project/Settings.scala index f30ea1ee9..810cee3c8 100644 --- a/project/Settings.scala +++ b/project/Settings.scala @@ -30,7 +30,7 @@ object Settings { organization := "io.get-coursier", scalazBintrayRepository, sonatypeRepository("releases"), - crossScalaVersions := Seq(scala212, scala211, scala210), // defined for all projects to trump sbt-doge + crossScalaVersions := Seq(scala212, scala211), // defined for all projects to trump sbt-doge scalacOptions ++= Seq( "-target:jvm-1.8", "-feature", @@ -68,13 +68,7 @@ object Settings { } lazy val shared = javaScalaPluginShared ++ Seq( - scalaVersion := scala212, - libs ++= { - if (scalaBinaryVersion.value == "2.10") - Seq(compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)) - else - Seq() - } + scalaVersion := scala212 ) lazy val pureJava = javaScalaPluginShared ++ Seq( @@ -110,23 +104,6 @@ object Settings { name := "coursier-" + name.value } - lazy val scalaXmlIfNecessary = Seq( - libs ++= { - if (scalaBinaryVersion.value == "2.10") Seq() - else Seq(Deps.scalaXml) - } - ) - - lazy val quasiQuotesIfNecessary = Seq( - libs ++= { - if (scalaBinaryVersion.value == "2.10") - // directly depending on that one so that it doesn't get shaded - Seq(Deps.quasiQuotes) - else - Nil - } - ) - lazy val noTests = Seq( test.in(Test) := {}, testOnly.in(Test) := {} @@ -159,7 +136,6 @@ object Settings { ) val sbtPluginScalaVersions = Map( - "0.13" -> "2.10", "1.0" -> "2.12" ) @@ -200,11 +176,10 @@ object Settings { ) } - val sbt013Version = "0.13.8" val sbt10Version = "1.0.2" val pluginOverrideCrossScalaVersion = Seq( - crossScalaVersions := Seq(scala212, scala210) + crossScalaVersions := Seq(scala212) ) lazy val plugin = @@ -220,19 +195,19 @@ object Settings { scriptedBufferLog := false, sbtPlugin := { scalaBinaryVersion.value match { - case "2.10" | "2.12" => true + case "2.12" => true case _ => false } }, sbtVersion.in(pluginCrossBuild) := { scalaBinaryVersion.value match { - case "2.10" => sbt013Version case "2.12" => sbt10Version case _ => sbtVersion.in(pluginCrossBuild).value } }, resolvers ++= Seq( - // added so that 2.10 artifacts of the other modules can be found by + // Still necessary? + // added so that 2.12 artifacts of the other modules can be found by // the too-naive-for-now inter-project resolver of the coursier SBT plugin Resolver.sonatypeRepo("snapshots"), // added for sbt-scripted to be fine even with ++2.11.x diff --git a/sbt-coursier/src/main/scala/coursier/CoursierPlugin.scala b/sbt-coursier/src/main/scala/coursier/CoursierPlugin.scala index a5dc13dfc..5de7f4364 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.librarymanagement._ import sbt.{ Configuration, Resolver, _ } import sbt.Keys._ -import SbtCompatibility._ - object CoursierPlugin extends AutoPlugin { override def trigger = allRequirements @@ -317,4 +315,19 @@ object CoursierPlugin extends AutoPlugin { inConfig(Compile)(treeSettings) ++ inConfig(Test)(treeSettings) + + private lazy val needsIvyXmlLocal = Seq(publishLocalConfiguration) ++ getPubConf("makeIvyXmlLocalConfiguration") + private lazy val needsIvyXml = Seq(publishConfiguration) ++ getPubConf("makeIvyXmlConfiguration") + + private[this] def getPubConf(method: String): List[TaskKey[PublishConfiguration]] = + try { + val cls = Keys.getClass + val m = cls.getMethod(method) + val task = m.invoke(Keys).asInstanceOf[TaskKey[PublishConfiguration]] + List(task) + } catch { + case _: Throwable => // FIXME Too wide + Nil + } + } diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/build.sbt index 826c05673..627874b74 100644 --- a/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/build.sbt +++ b/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/build.sbt @@ -1,7 +1,4 @@ -// for SbtExclusionRule with sbt 1.0 -import Compatibility._ - scalaVersion := "2.11.8" organization := "io.get-coursier.test" @@ -10,5 +7,5 @@ version := "0.1.0-SNAPSHOT" libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.1" % "1.0.0-RC1" -excludeDependencies += SbtExclusionRule("com.chuusai", "shapeless_2.11") +excludeDependencies += sbt.ExclusionRule("com.chuusai", "shapeless_2.11") excludeDependencies += "io.argonaut" %% "argonaut" diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/project/src/main/scala-2.10/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/project/src/main/scala-2.12/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 53962be7a..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/exclude-dependencies/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1,5 +0,0 @@ -object Compatibility { - - val SbtExclusionRule = sbt.ExclusionRule - -} diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/build.sbt index 19c403d7c..7465c34d7 100644 --- a/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/build.sbt +++ b/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/build.sbt @@ -1,6 +1,4 @@ -import Compatibility._ - lazy val noPomCheck = TaskKey[Unit]("noPomCheck") noPomCheck := { diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/project/src/main/scala-2.10/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 8824f1209..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Compatibility { - - implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal { - def configuration(conf: sbt.Configuration) = - rep.configuration(conf.name) - } - -} diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/project/src/main/scala-2.12/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/no-pom-artifact/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/build.sbt index 8bebbda09..0a8f118b2 100644 --- a/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/build.sbt +++ b/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/build.sbt @@ -1,6 +1,4 @@ -import Compatibility._ - val org = "io.get-coursier.scriptedtest" val ver = "0.1.0-SNAPSHOT" diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/project/src/main/scala-2.10/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 8824f1209..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Compatibility { - - implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal { - def configuration(conf: sbt.Configuration) = - rep.configuration(conf.name) - } - -} diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/project/src/main/scala-2.12/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/publish-local-sources-javadoc-conf/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/build.sbt index d4fce7575..9ba11f7b2 100644 --- a/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/build.sbt +++ b/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/build.sbt @@ -1,6 +1,4 @@ -import Compatibility._ - lazy val noJbossInterceptorCheck = TaskKey[Unit]("noJbossInterceptorCheck") noJbossInterceptorCheck := { diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/project/src/main/scala-2.10/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 8824f1209..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Compatibility { - - implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal { - def configuration(conf: sbt.Configuration) = - rep.configuration(conf.name) - } - -} diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/project/src/main/scala-2.12/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/sbt-assembly/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/build.sbt index 846809c67..b3ac5e630 100644 --- a/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/build.sbt +++ b/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/build.sbt @@ -1,6 +1,4 @@ -import Compatibility._ - scalaVersion := appConfiguration.value.provider.scalaProvider.version lazy val updateClassifiersCheck = TaskKey[Unit]("updateClassifiersCheck") diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/project/src/main/scala-2.10/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 8824f1209..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Compatibility { - - implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal { - def configuration(conf: sbt.Configuration) = - rep.configuration(conf.name) - } - -} diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/project/src/main/scala-2.12/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/scala-sources-javadoc-jars/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/build.sbt index 0c78e2523..8019f41f5 100644 --- a/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/build.sbt +++ b/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/build.sbt @@ -1,4 +1,3 @@ -import Compatibility._ scalaVersion := "2.12.2-bin-typelevel-4" scalaOrganization := "org.typelevel" diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/project/src/main/scala-2.10/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 114525fc4..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1,19 +0,0 @@ -object Compatibility { - - // patch method not available in sbt 0.13.8 - - implicit class CrossVersionOps(val companion: sbt.CrossVersion.type) extends AnyVal { - def patch: sbt.CrossVersion = new sbt.CrossVersion.Full(patchFun) - } - - // adapted from sbt.CrossVersion from the sbt 0.13.16 sources - - private val BinCompatV = """(\d+)\.(\d+)\.(\d+)(-\w+)??-bin(-.*)?""".r - - private def patchFun(fullVersion: String): String = - fullVersion match { - case BinCompatV(x, y, z, w, _) => s"""$x.$y.$z${if (w == null) "" else w}""" - case other => other - } - -} diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/project/src/main/scala-2.12/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/typelevel-with-dependencies/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/build.sbt b/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/build.sbt index 1441e151c..3108c1548 100644 --- a/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/build.sbt +++ b/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/build.sbt @@ -1,6 +1,4 @@ -import Compatibility._ - scalaVersion := appConfiguration.value.provider.scalaProvider.version lazy val updateSbtClassifiersCheck = TaskKey[Unit]("updateSbtClassifiersCheck") diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/project/src/main/scala-2.10/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 8824f1209..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Compatibility { - - implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal { - def configuration(conf: sbt.Configuration) = - rep.configuration(conf.name) - } - -} diff --git a/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/project/src/main/scala-2.12/Compatibility.scala b/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-coursier/src/sbt-test/sbt-coursier/update-sbt-classifiers/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/build.sbt b/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/build.sbt index ebf7f80c8..2a84893b3 100644 --- a/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/build.sbt +++ b/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/build.sbt @@ -1,7 +1,4 @@ -// for SbtExclusionRule with sbt 1.0 -import Compatibility._ - enablePlugins(coursier.ShadingPlugin) shadingNamespace := "test.shaded" shadeNamespaces += "argonaut" @@ -12,7 +9,7 @@ libraryDependencies ++= Seq( "org.scala-lang" % "scala-reflect" % scalaVersion.value ) -excludeDependencies += SbtExclusionRule("com.chuusai", "shapeless_2.11") +excludeDependencies += sbt.ExclusionRule("com.chuusai", "shapeless_2.11") scalaVersion := "2.11.8" organization := "io.get-coursier.test" diff --git a/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/project/src/main/scala-2.10/Compatibility.scala b/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/project/src/main/scala-2.10/Compatibility.scala deleted file mode 100644 index 19835e1be..000000000 --- a/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/project/src/main/scala-2.10/Compatibility.scala +++ /dev/null @@ -1 +0,0 @@ -object Compatibility diff --git a/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/project/src/main/scala-2.12/Compatibility.scala b/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/project/src/main/scala-2.12/Compatibility.scala deleted file mode 100644 index 53962be7a..000000000 --- a/sbt-shading/src/sbt-test/sbt-shading/exclude-dependencies/project/src/main/scala-2.12/Compatibility.scala +++ /dev/null @@ -1,5 +0,0 @@ -object Compatibility { - - val SbtExclusionRule = sbt.ExclusionRule - -} diff --git a/sbt-shared/src/main/scala-2.10/coursier/SbtCompatibility.scala b/sbt-shared/src/main/scala-2.10/coursier/SbtCompatibility.scala deleted file mode 100644 index c00ba3c98..000000000 --- a/sbt-shared/src/main/scala-2.10/coursier/SbtCompatibility.scala +++ /dev/null @@ -1,10 +0,0 @@ -package coursier - -object SbtCompatibility { - def needsIvyXmlLocal = List(sbt.Keys.deliverLocalConfiguration) - def needsIvyXml = List(sbt.Keys.deliverConfiguration) - - implicit class ResolverCompationExtraOps(val res: sbt.Resolver.type) { - def SbtRepositoryRoot = res.SbtPluginRepositoryRoot - } -} diff --git a/sbt-shared/src/main/scala-2.12/coursier/SbtCompatibility.scala b/sbt-shared/src/main/scala-2.12/coursier/SbtCompatibility.scala deleted file mode 100644 index eaec02c45..000000000 --- a/sbt-shared/src/main/scala-2.12/coursier/SbtCompatibility.scala +++ /dev/null @@ -1,19 +0,0 @@ -package coursier - -import sbt._, Keys._ - -object SbtCompatibility { - lazy val needsIvyXmlLocal = Seq(publishLocalConfiguration) ++ getPubConf("makeIvyXmlLocalConfiguration") - lazy val needsIvyXml = Seq(publishConfiguration) ++ getPubConf("makeIvyXmlConfiguration") - - private[this] def getPubConf(method: String) = - try { - val cls = Keys.getClass - val m = cls.getMethod(method) - val task = m.invoke(Keys).asInstanceOf[TaskKey[PublishConfiguration]] - List(task) - } catch { - case _: Throwable => // FIXME Too wide - Nil - } -} diff --git a/scripts/travis.sh b/scripts/travis.sh index 6a9bf7031..b6c8f200b 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -32,20 +32,12 @@ sbtShading() { runSbtCoursierTests() { addPgpKeys - if [ "$SCALA_VERSION" = "2.10" ]; then - CMDS=("sbt-coursier/scripted sbt-coursier/*" "sbt-coursier/scripted sbt-coursier-0.13/*") - else - CMDS=("sbt-coursier/scripted sbt-coursier/simple") # full scripted suite currently taking too long on Travis CI... - fi - ./scripts/with-test-repo.sh sbt scalaFromEnv "${CMD[@]}" + ./scripts/with-test-repo.sh sbt scalaFromEnv sbt-coursier/scripted sbt scalaFromEnv sbt-pgp-coursier/scripted } runSbtShadingTests() { - sbt scalaFromEnv "sbt-shading/scripted sbt-shading/*" - if [ "$SCALA_VERSION" = "2.10" ]; then - sbt scalaFromEnv "sbt-shading/scripted sbt-shading-0.13/*" - fi + sbt scalaFromEnv sbt-shading/scripted } jsCompile() { @@ -200,11 +192,11 @@ else jvmCompile if sbtCoursier; then - if [ "$SCALA_VERSION" = "2.10" -o "$SCALA_VERSION" = "2.12" ]; then + if [ "$SCALA_VERSION" = "2.12" ]; then runSbtCoursierTests fi elif sbtShading; then - if [ "$SCALA_VERSION" = "2.10" -o "$SCALA_VERSION" = "2.12" ]; then + if [ "$SCALA_VERSION" = "2.12" ]; then runSbtShadingTests fi else