mirror of https://github.com/sbt/sbt.git
commit
ca81973f5e
|
|
@ -1,11 +1 @@
|
||||||
target/
|
target/
|
||||||
.idea/
|
|
||||||
node_modules/
|
|
||||||
|
|
||||||
# tut backups?
|
|
||||||
.*.swp
|
|
||||||
|
|
||||||
# pants
|
|
||||||
.pants.d
|
|
||||||
.pants.workdir.file_lock
|
|
||||||
.pids
|
|
||||||
|
|
|
||||||
13
.travis.yml
13
.travis.yml
|
|
@ -2,13 +2,22 @@ language: scala
|
||||||
scala: 2.12.7
|
scala: 2.12.7
|
||||||
os: linux
|
os: linux
|
||||||
jdk: oraclejdk8
|
jdk: oraclejdk8
|
||||||
|
before_install:
|
||||||
|
- git fetch --tags
|
||||||
script:
|
script:
|
||||||
- scripts/travis.sh
|
- scripts/travis.sh
|
||||||
matrix:
|
stages:
|
||||||
|
- name: test
|
||||||
|
- name: release
|
||||||
|
if: (branch = master AND type = push) OR (tag IS present)
|
||||||
|
jobs:
|
||||||
include:
|
include:
|
||||||
- env: SBT_COURSIER=1
|
- env: SBT_COURSIER=1 SBT_COURSIER_TEST_GROUP=1
|
||||||
|
- env: SBT_COURSIER=1 SBT_COURSIER_TEST_GROUP=2
|
||||||
- env: SBT_SHADING=1
|
- env: SBT_SHADING=1
|
||||||
- env: SBT_PGP_COURSIER=1
|
- env: SBT_PGP_COURSIER=1
|
||||||
|
- stage: release
|
||||||
|
script: sbt ci-release
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
|
||||||
43
build.sbt
43
build.sbt
|
|
@ -1,7 +1,20 @@
|
||||||
|
|
||||||
import Aliases._
|
import Aliases._
|
||||||
import Settings._
|
import Settings._
|
||||||
import Publish._
|
|
||||||
|
inThisBuild(List(
|
||||||
|
organization := "io.get-coursier",
|
||||||
|
homepage := Some(url("https://github.com/coursier/coursier")),
|
||||||
|
licenses := Seq("Apache 2.0" -> url("http://opensource.org/licenses/Apache-2.0")),
|
||||||
|
developers := List(
|
||||||
|
Developer(
|
||||||
|
"alexarchambault",
|
||||||
|
"Alexandre Archambault",
|
||||||
|
"",
|
||||||
|
url("https://github.com/alexarchambault")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
))
|
||||||
|
|
||||||
val coursierVersion = "1.1.0-M7"
|
val coursierVersion = "1.1.0-M7"
|
||||||
|
|
||||||
|
|
@ -16,7 +29,7 @@ lazy val `sbt-shared` = project
|
||||||
// because we don't publish for 2.11 the following declaration
|
// because we don't publish for 2.11 the following declaration
|
||||||
// is more wordy than usual
|
// is more wordy than usual
|
||||||
// once support for sbt 0.13 is removed, this dependency can go away
|
// once support for sbt 0.13 is removed, this dependency can go away
|
||||||
libs ++= {
|
libraryDependencies ++= {
|
||||||
val dependency = "com.dwijnand" % "sbt-compat" % "1.2.6"
|
val dependency = "com.dwijnand" % "sbt-compat" % "1.2.6"
|
||||||
val sbtV = (sbtBinaryVersion in pluginCrossBuild).value
|
val sbtV = (sbtBinaryVersion in pluginCrossBuild).value
|
||||||
val scalaV = (scalaBinaryVersion in update).value
|
val scalaV = (scalaBinaryVersion in update).value
|
||||||
|
|
@ -30,10 +43,12 @@ lazy val `sbt-shared` = project
|
||||||
|
|
||||||
lazy val `sbt-coursier` = project
|
lazy val `sbt-coursier` = project
|
||||||
.in(file("modules/sbt-coursier"))
|
.in(file("modules/sbt-coursier"))
|
||||||
|
.enablePlugins(ScriptedPlugin)
|
||||||
.dependsOn(`sbt-shared`)
|
.dependsOn(`sbt-shared`)
|
||||||
.settings(
|
.settings(
|
||||||
plugin,
|
plugin,
|
||||||
utest,
|
libraryDependencies += "com.lihaoyi" %% "utest" % "0.6.4" % Test,
|
||||||
|
testFrameworks += new TestFramework("utest.runner.Framework"),
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"io.get-coursier" %% "coursier" % coursierVersion,
|
"io.get-coursier" %% "coursier" % coursierVersion,
|
||||||
"io.get-coursier" %% "coursier-cache" % coursierVersion,
|
"io.get-coursier" %% "coursier-cache" % coursierVersion,
|
||||||
|
|
@ -51,10 +66,16 @@ lazy val `sbt-coursier` = project
|
||||||
|
|
||||||
lazy val `sbt-pgp-coursier` = project
|
lazy val `sbt-pgp-coursier` = project
|
||||||
.in(file("modules/sbt-pgp-coursier"))
|
.in(file("modules/sbt-pgp-coursier"))
|
||||||
|
.enablePlugins(ScriptedPlugin)
|
||||||
.dependsOn(`sbt-coursier`)
|
.dependsOn(`sbt-coursier`)
|
||||||
.settings(
|
.settings(
|
||||||
plugin,
|
plugin,
|
||||||
libs += Deps.sbtPgp.value,
|
libraryDependencies += {
|
||||||
|
val sbtv = CrossVersion.binarySbtVersion(sbtVersion.in(pluginCrossBuild).value)
|
||||||
|
val sv = scalaBinaryVersion.value
|
||||||
|
val ver = "1.1.1"
|
||||||
|
Defaults.sbtPluginExtra("com.jsuereth" % "sbt-pgp" % ver, sbtv, sv)
|
||||||
|
},
|
||||||
scriptedDependencies := {
|
scriptedDependencies := {
|
||||||
scriptedDependencies.value
|
scriptedDependencies.value
|
||||||
// TODO Get dependency projects automatically
|
// TODO Get dependency projects automatically
|
||||||
|
|
@ -64,14 +85,19 @@ lazy val `sbt-pgp-coursier` = project
|
||||||
|
|
||||||
lazy val `sbt-shading` = project
|
lazy val `sbt-shading` = project
|
||||||
.in(file("modules/sbt-shading"))
|
.in(file("modules/sbt-shading"))
|
||||||
.enablePlugins(ShadingPlugin)
|
.enablePlugins(ScriptedPlugin, ShadingPlugin)
|
||||||
.dependsOn(`sbt-coursier`)
|
.dependsOn(`sbt-coursier`)
|
||||||
.settings(
|
.settings(
|
||||||
plugin,
|
plugin,
|
||||||
shading,
|
shading,
|
||||||
libs += Deps.jarjar % "shaded",
|
libraryDependencies += "io.get-coursier.jarjar" % "jarjar-core" % "1.0.1-coursier-1" % "shaded",
|
||||||
// dependencies of jarjar-core - directly depending on these so that they don't get shaded
|
// dependencies of jarjar-core - directly depending on these so that they don't get shaded
|
||||||
libs ++= Deps.jarjarTransitiveDeps,
|
libraryDependencies ++= Seq(
|
||||||
|
"com.google.code.findbugs" % "jsr305" % "2.0.2",
|
||||||
|
"org.ow2.asm" % "asm-commons" % "5.2",
|
||||||
|
"org.ow2.asm" % "asm-util" % "5.2",
|
||||||
|
"org.slf4j" % "slf4j-api" % "1.7.25"
|
||||||
|
),
|
||||||
scriptedDependencies := {
|
scriptedDependencies := {
|
||||||
scriptedDependencies.value
|
scriptedDependencies.value
|
||||||
// TODO Get dependency projects automatically
|
// TODO Get dependency projects automatically
|
||||||
|
|
@ -89,8 +115,7 @@ lazy val coursier = project
|
||||||
)
|
)
|
||||||
.settings(
|
.settings(
|
||||||
shared,
|
shared,
|
||||||
dontPublish,
|
skip.in(publish) := true,
|
||||||
moduleName := "sbt-coursier-root"
|
moduleName := "sbt-coursier-root"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -814,6 +814,8 @@ object Tasks {
|
||||||
|
|
||||||
val (currentProject, fallbackDependencies, configGraphs) = currentProjectTask.value
|
val (currentProject, fallbackDependencies, configGraphs) = currentProjectTask.value
|
||||||
|
|
||||||
|
val autoScalaLib = autoScalaLibrary.value
|
||||||
|
|
||||||
val resolvers = resolversTask.value
|
val resolvers = resolversTask.value
|
||||||
|
|
||||||
// TODO Warn about possible duplicated modules from source repositories?
|
// TODO Warn about possible duplicated modules from source repositories?
|
||||||
|
|
@ -909,7 +911,7 @@ object Tasks {
|
||||||
forceVersions =
|
forceVersions =
|
||||||
// order matters here
|
// order matters here
|
||||||
userForceVersions ++
|
userForceVersions ++
|
||||||
(if (configs("compile") || configs("scala-tool")) forcedScalaModules(so, sv) else Map()) ++
|
(if (autoScalaLib && (configs("compile") || configs("scala-tool"))) forcedScalaModules(so, sv) else Map()) ++
|
||||||
interProjectDependencies.map(_.moduleVersion),
|
interProjectDependencies.map(_.moduleVersion),
|
||||||
projectCache = parentProjectCache,
|
projectCache = parentProjectCache,
|
||||||
mapDependencies = if (typelevel && (configs("compile") || configs("scala-tool"))) typelevelOrgSwap else None
|
mapDependencies = if (typelevel && (configs("compile") || configs("scala-tool"))) typelevelOrgSwap else None
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
autoScalaLibrary := false
|
||||||
|
libraryDependencies += "com.chuusai" % "shapeless_2.12" % "2.3.2"
|
||||||
|
|
||||||
|
val checkScalaLibrary = TaskKey[Unit]("checkScalaLibrary")
|
||||||
|
|
||||||
|
checkScalaLibrary := {
|
||||||
|
val scalaLibsJars = managedClasspath
|
||||||
|
.in(Compile)
|
||||||
|
.value
|
||||||
|
.map(_.data.getName)
|
||||||
|
.filter(_.startsWith("scala-library"))
|
||||||
|
.sorted
|
||||||
|
val expectedScalaLibsJars = Seq(
|
||||||
|
"scala-library-2.12.0.jar"
|
||||||
|
)
|
||||||
|
assert(
|
||||||
|
scalaLibsJars == expectedScalaLibsJars,
|
||||||
|
s"$scalaLibsJars != $expectedScalaLibsJars"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
> checkScalaLibrary
|
||||||
|
|
@ -5,6 +5,8 @@ libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.41" from {
|
||||||
val f = file(sys.props("sbttest.base")) / "sbt-coursier" / "from" / "shapeless_2.11-2.3.0.jar"
|
val f = file(sys.props("sbttest.base")) / "sbt-coursier" / "from" / "shapeless_2.11-2.3.0.jar"
|
||||||
|
|
||||||
if (!f.exists()) {
|
if (!f.exists()) {
|
||||||
|
f.getParentFile.mkdirs()
|
||||||
|
|
||||||
val url0 = "https://repo1.maven.org/maven2/com/chuusai/shapeless_2.11/2.3.0/shapeless_2.11-2.3.0.jar"
|
val url0 = "https://repo1.maven.org/maven2/com/chuusai/shapeless_2.11/2.3.0/shapeless_2.11-2.3.0.jar"
|
||||||
|
|
||||||
sLog.value.warn(s"Fetching $url0")
|
sLog.value.warn(s"Fetching $url0")
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue