mirror of https://github.com/sbt/sbt.git
commit
ca81973f5e
|
|
@ -1,11 +1 @@
|
|||
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
|
||||
os: linux
|
||||
jdk: oraclejdk8
|
||||
before_install:
|
||||
- git fetch --tags
|
||||
script:
|
||||
- scripts/travis.sh
|
||||
matrix:
|
||||
stages:
|
||||
- name: test
|
||||
- name: release
|
||||
if: (branch = master AND type = push) OR (tag IS present)
|
||||
jobs:
|
||||
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_PGP_COURSIER=1
|
||||
- stage: release
|
||||
script: sbt ci-release
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
|
|
|||
43
build.sbt
43
build.sbt
|
|
@ -1,7 +1,20 @@
|
|||
|
||||
import Aliases._
|
||||
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"
|
||||
|
||||
|
|
@ -16,7 +29,7 @@ lazy val `sbt-shared` = project
|
|||
// because we don't publish for 2.11 the following declaration
|
||||
// is more wordy than usual
|
||||
// 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 sbtV = (sbtBinaryVersion in pluginCrossBuild).value
|
||||
val scalaV = (scalaBinaryVersion in update).value
|
||||
|
|
@ -30,10 +43,12 @@ lazy val `sbt-shared` = project
|
|||
|
||||
lazy val `sbt-coursier` = project
|
||||
.in(file("modules/sbt-coursier"))
|
||||
.enablePlugins(ScriptedPlugin)
|
||||
.dependsOn(`sbt-shared`)
|
||||
.settings(
|
||||
plugin,
|
||||
utest,
|
||||
libraryDependencies += "com.lihaoyi" %% "utest" % "0.6.4" % Test,
|
||||
testFrameworks += new TestFramework("utest.runner.Framework"),
|
||||
libraryDependencies ++= Seq(
|
||||
"io.get-coursier" %% "coursier" % coursierVersion,
|
||||
"io.get-coursier" %% "coursier-cache" % coursierVersion,
|
||||
|
|
@ -51,10 +66,16 @@ lazy val `sbt-coursier` = project
|
|||
|
||||
lazy val `sbt-pgp-coursier` = project
|
||||
.in(file("modules/sbt-pgp-coursier"))
|
||||
.enablePlugins(ScriptedPlugin)
|
||||
.dependsOn(`sbt-coursier`)
|
||||
.settings(
|
||||
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.value
|
||||
// TODO Get dependency projects automatically
|
||||
|
|
@ -64,14 +85,19 @@ lazy val `sbt-pgp-coursier` = project
|
|||
|
||||
lazy val `sbt-shading` = project
|
||||
.in(file("modules/sbt-shading"))
|
||||
.enablePlugins(ShadingPlugin)
|
||||
.enablePlugins(ScriptedPlugin, ShadingPlugin)
|
||||
.dependsOn(`sbt-coursier`)
|
||||
.settings(
|
||||
plugin,
|
||||
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
|
||||
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.value
|
||||
// TODO Get dependency projects automatically
|
||||
|
|
@ -89,8 +115,7 @@ lazy val coursier = project
|
|||
)
|
||||
.settings(
|
||||
shared,
|
||||
dontPublish,
|
||||
skip.in(publish) := true,
|
||||
moduleName := "sbt-coursier-root"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -814,6 +814,8 @@ object Tasks {
|
|||
|
||||
val (currentProject, fallbackDependencies, configGraphs) = currentProjectTask.value
|
||||
|
||||
val autoScalaLib = autoScalaLibrary.value
|
||||
|
||||
val resolvers = resolversTask.value
|
||||
|
||||
// TODO Warn about possible duplicated modules from source repositories?
|
||||
|
|
@ -909,7 +911,7 @@ object Tasks {
|
|||
forceVersions =
|
||||
// order matters here
|
||||
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),
|
||||
projectCache = parentProjectCache,
|
||||
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"
|
||||
|
||||
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"
|
||||
|
||||
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