2015-08-19 09:56:08 +02:00
|
|
|
import Dependencies._
|
2017-06-14 07:56:08 +02:00
|
|
|
import Path._
|
2018-03-08 17:19:37 +01:00
|
|
|
import com.typesafe.tools.mima.core._, ProblemFilters._
|
2015-08-19 09:56:08 +02:00
|
|
|
|
2018-04-07 20:59:32 +02:00
|
|
|
val _ = {
|
2018-04-07 22:27:08 +02:00
|
|
|
//https://github.com/sbt/contraband/issues/122
|
2018-04-07 20:59:32 +02:00
|
|
|
sys.props += ("line.separator" -> "\n")
|
|
|
|
|
}
|
2022-06-13 05:46:55 +02:00
|
|
|
Global / semanticdbEnabled := !(Global / insideCI).value
|
2022-06-13 03:55:09 +02:00
|
|
|
Global / semanticdbVersion := "4.5.9"
|
2020-11-15 06:58:52 +01:00
|
|
|
ThisBuild / version := {
|
|
|
|
|
val old = (ThisBuild / version).value
|
|
|
|
|
nightlyVersion match {
|
|
|
|
|
case Some(v) => v
|
|
|
|
|
case _ =>
|
|
|
|
|
if ((ThisBuild / isSnapshot).value) "1.4.0-SNAPSHOT"
|
|
|
|
|
else old
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-04 18:42:46 +02:00
|
|
|
ThisBuild / versionScheme := Some("early-semver")
|
2019-10-20 01:53:11 +02:00
|
|
|
ThisBuild / organization := "org.scala-sbt"
|
|
|
|
|
ThisBuild / homepage := Some(url("https://github.com/sbt/librarymanagement"))
|
|
|
|
|
ThisBuild / description := "Library management module for sbt"
|
|
|
|
|
ThisBuild / scmInfo := {
|
|
|
|
|
val slug = "sbt/librarymanagement"
|
|
|
|
|
Some(ScmInfo(url(s"https://github.com/$slug"), s"git@github.com:$slug.git"))
|
|
|
|
|
}
|
|
|
|
|
ThisBuild / licenses := List(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))
|
|
|
|
|
ThisBuild / scalafmtOnCompile := true
|
|
|
|
|
ThisBuild / developers := List(
|
|
|
|
|
Developer("harrah", "Mark Harrah", "@harrah", url("https://github.com/harrah")),
|
|
|
|
|
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("http://eed3si9n.com/")),
|
|
|
|
|
Developer("dwijnand", "Dale Wijnand", "@dwijnand", url("https://github.com/dwijnand")),
|
|
|
|
|
)
|
2021-03-15 04:57:13 +01:00
|
|
|
ThisBuild / pomIncludeRepository := (_ => false) // drop repos other than Maven Central from POM
|
|
|
|
|
ThisBuild / publishTo := {
|
|
|
|
|
val nexus = "https://oss.sonatype.org/"
|
|
|
|
|
Some("releases" at nexus + "service/local/staging/deploy/maven2")
|
|
|
|
|
}
|
2019-05-12 01:49:04 +02:00
|
|
|
|
2019-05-10 06:11:39 +02:00
|
|
|
ThisBuild / Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat
|
|
|
|
|
|
2018-06-14 07:32:15 +02:00
|
|
|
def commonSettings: Seq[Setting[_]] = Def.settings(
|
2017-01-07 06:43:52 +01:00
|
|
|
scalaVersion := scala212,
|
2015-08-19 09:56:08 +02:00
|
|
|
// publishArtifact in packageDoc := false,
|
|
|
|
|
resolvers += Resolver.typesafeIvyRepo("releases"),
|
|
|
|
|
resolvers += Resolver.sonatypeRepo("snapshots"),
|
2017-11-14 10:57:29 +01:00
|
|
|
resolvers += Resolver.sbtPluginRepo("releases"),
|
2019-08-14 08:21:24 +02:00
|
|
|
testFrameworks += new TestFramework("verify.runner.Framework"),
|
2015-08-19 09:56:08 +02:00
|
|
|
// concurrentRestrictions in Global += Util.testExclusiveRestriction,
|
|
|
|
|
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
|
2021-05-03 04:18:03 +02:00
|
|
|
compile / javacOptions ++= Seq("-Xlint", "-Xlint:-serial"),
|
2021-02-21 20:09:52 +01:00
|
|
|
crossScalaVersions := Seq(scala212, scala213),
|
2015-09-07 10:40:23 +02:00
|
|
|
resolvers += Resolver.sonatypeRepo("public"),
|
2017-06-14 07:56:08 +02:00
|
|
|
scalacOptions := {
|
|
|
|
|
val old = scalacOptions.value
|
|
|
|
|
scalaVersion.value match {
|
2017-08-10 12:56:43 +02:00
|
|
|
case sv if sv.startsWith("2.10") =>
|
|
|
|
|
old diff List("-Xfuture", "-Ywarn-unused", "-Ywarn-unused-import")
|
2017-06-14 07:56:08 +02:00
|
|
|
case sv if sv.startsWith("2.11") => old ++ List("-Ywarn-unused", "-Ywarn-unused-import")
|
2021-01-17 10:18:49 +01:00
|
|
|
case sv if sv.startsWith("2.12") =>
|
|
|
|
|
old ++ List("-Ywarn-unused", "-Ywarn-unused-import", "-YdisableFlatCpCaching")
|
|
|
|
|
case _ => old
|
2017-06-14 07:56:08 +02:00
|
|
|
}
|
|
|
|
|
},
|
2019-08-28 00:50:17 +02:00
|
|
|
inCompileAndTest(
|
2021-05-03 04:18:03 +02:00
|
|
|
(console / scalacOptions) --= Vector("-Ywarn-unused-import", "-Ywarn-unused", "-Xlint")
|
2019-08-28 00:50:17 +02:00
|
|
|
),
|
2019-04-30 05:10:24 +02:00
|
|
|
scalafmtOnCompile := true,
|
|
|
|
|
Test / scalafmtOnCompile := true,
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / publishArtifact := true,
|
|
|
|
|
Test / publishArtifact := false,
|
|
|
|
|
Test / parallelExecution := false
|
2015-08-19 09:56:08 +02:00
|
|
|
)
|
|
|
|
|
|
2017-07-20 18:13:35 +02:00
|
|
|
val mimaSettings = Def settings (
|
2017-12-18 17:25:32 +01:00
|
|
|
mimaPreviousArtifacts := Set(
|
2019-08-28 00:50:17 +02:00
|
|
|
"1.0.0",
|
|
|
|
|
"1.0.1",
|
|
|
|
|
"1.0.2",
|
|
|
|
|
"1.0.3",
|
|
|
|
|
"1.0.4",
|
|
|
|
|
"1.1.0",
|
|
|
|
|
"1.1.1",
|
|
|
|
|
"1.1.2",
|
|
|
|
|
"1.1.3",
|
|
|
|
|
"1.1.4",
|
2018-08-01 06:13:09 +02:00
|
|
|
"1.2.0",
|
2019-10-20 02:02:25 +02:00
|
|
|
"1.3.0",
|
2021-05-03 04:18:03 +02:00
|
|
|
"1.4.0",
|
|
|
|
|
"1.5.0",
|
2022-06-13 04:24:44 +02:00
|
|
|
"1.6.0",
|
2019-08-28 00:50:17 +02:00
|
|
|
) map (
|
|
|
|
|
version =>
|
|
|
|
|
organization.value %% moduleName.value % version
|
|
|
|
|
cross (if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled)
|
|
|
|
|
),
|
2017-07-20 18:13:35 +02:00
|
|
|
)
|
|
|
|
|
|
2017-04-26 22:55:38 +02:00
|
|
|
lazy val lmRoot = (project in file("."))
|
2019-03-22 18:58:56 +01:00
|
|
|
.aggregate(lmCore, lmIvy)
|
2017-04-26 22:55:38 +02:00
|
|
|
.settings(
|
2015-08-19 09:56:08 +02:00
|
|
|
commonSettings,
|
2015-09-05 11:32:07 +02:00
|
|
|
name := "LM Root",
|
2015-08-19 09:56:08 +02:00
|
|
|
publish := {},
|
2015-09-02 09:25:37 +02:00
|
|
|
publishLocal := {},
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / publishArtifact := false,
|
2016-05-10 06:34:40 +02:00
|
|
|
publishArtifact := false,
|
2019-10-20 01:53:11 +02:00
|
|
|
mimaPreviousArtifacts := Set.empty,
|
|
|
|
|
customCommands,
|
2015-08-19 09:56:08 +02:00
|
|
|
)
|
|
|
|
|
|
2017-07-12 00:39:06 +02:00
|
|
|
lazy val lmCore = (project in file("core"))
|
|
|
|
|
.enablePlugins(ContrabandPlugin, JsonCodecPlugin)
|
2017-04-26 22:55:38 +02:00
|
|
|
.settings(
|
2015-08-19 09:56:08 +02:00
|
|
|
commonSettings,
|
2017-07-12 00:39:06 +02:00
|
|
|
name := "librarymanagement-core",
|
2017-08-10 12:56:43 +02:00
|
|
|
libraryDependencies ++= Seq(
|
|
|
|
|
jsch,
|
|
|
|
|
scalaReflect.value,
|
|
|
|
|
scalaCompiler.value,
|
|
|
|
|
launcherInterface,
|
2022-06-13 03:55:09 +02:00
|
|
|
gigahorseApacheHttp,
|
2017-08-10 12:56:43 +02:00
|
|
|
sjsonnewScalaJson.value % Optional,
|
2018-01-13 02:06:24 +01:00
|
|
|
scalaTest % Test,
|
2019-08-14 08:21:24 +02:00
|
|
|
scalaCheck % Test,
|
2019-08-18 05:06:52 +02:00
|
|
|
scalaVerify % Test,
|
2017-08-10 12:56:43 +02:00
|
|
|
),
|
2019-05-12 01:49:04 +02:00
|
|
|
libraryDependencies += scalaXml,
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / resourceGenerators += Def
|
2017-08-10 12:56:43 +02:00
|
|
|
.task(
|
|
|
|
|
Util.generateVersionFile(
|
|
|
|
|
version.value,
|
|
|
|
|
resourceManaged.value,
|
|
|
|
|
streams.value,
|
2021-05-03 04:18:03 +02:00
|
|
|
(Compile / compile).value
|
2017-08-10 12:56:43 +02:00
|
|
|
)
|
2017-06-21 14:47:35 +02:00
|
|
|
)
|
2017-08-10 12:56:43 +02:00
|
|
|
.taskValue,
|
2018-09-22 05:34:51 +02:00
|
|
|
Compile / scalacOptions ++= (scalaVersion.value match {
|
|
|
|
|
case v if v.startsWith("2.12.") => List("-Ywarn-unused:-locals,-explicits,-privates")
|
|
|
|
|
case _ => List()
|
|
|
|
|
}),
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / managedSourceDirectories +=
|
2017-07-02 01:27:54 +02:00
|
|
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / generateContrabands / sourceManaged := baseDirectory.value / "src" / "main" / "contraband-scala",
|
|
|
|
|
Compile / generateContrabands / contrabandFormatsForType := DatatypeConfig.getFormats,
|
2016-12-14 11:26:53 +01:00
|
|
|
// WORKAROUND sbt/sbt#2205 include managed sources in packageSrc
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / packageSrc / mappings ++= {
|
|
|
|
|
val srcs = (Compile / managedSources).value
|
|
|
|
|
val sdirs = (Compile / managedSourceDirectories).value
|
2016-12-14 11:26:53 +01:00
|
|
|
val base = baseDirectory.value
|
|
|
|
|
(((srcs --- sdirs --- base) pair (relativeTo(sdirs) | relativeTo(base) | flat)) toSeq)
|
2017-07-20 18:13:35 +02:00
|
|
|
},
|
|
|
|
|
mimaSettings,
|
2018-03-09 11:08:36 +01:00
|
|
|
mimaBinaryIssueFilters ++= Seq(
|
2018-03-27 12:19:28 +02:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.EvictionWarningOptions.this"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.EvictionWarningOptions.copy"),
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[IncompatibleResultTypeProblem](
|
|
|
|
|
"sbt.librarymanagement.EvictionWarningOptions.copy$default$7"
|
|
|
|
|
),
|
2018-03-09 11:08:36 +01:00
|
|
|
// internal class moved
|
|
|
|
|
exclude[MissingClassProblem]("sbt.internal.librarymanagement.InlineConfigurationFunctions"),
|
|
|
|
|
// dropped internal class parent (InlineConfigurationFunctions)
|
|
|
|
|
exclude[MissingTypesProblem]("sbt.librarymanagement.ModuleDescriptorConfiguration$"),
|
2018-03-08 15:39:20 +01:00
|
|
|
// Configuration's copy method was never meant to be public
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Configuration.copy"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Configuration.copy$default$*"),
|
2018-03-08 16:30:50 +01:00
|
|
|
// the data type copy methods were never meant to be public
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.copy"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.copy$default$*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleReportExtra.copy"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleReportExtra.copy$default$*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.copy"),
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.librarymanagement.ArtifactTypeFilterExtra.copy$default$*"
|
|
|
|
|
),
|
2018-03-08 16:30:50 +01:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleIDExtra.copy"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleIDExtra.copy$default$*"),
|
|
|
|
|
// these abstract classes are private[librarymanagement] so it's fine if they have more methods
|
|
|
|
|
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.*"),
|
|
|
|
|
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ModuleReportExtra.*"),
|
|
|
|
|
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.*"),
|
|
|
|
|
exclude[ReversedMissingMethodProblem]("sbt.librarymanagement.ModuleIDExtra.*"),
|
|
|
|
|
// these abstract classes are private[librarymanagement] so they can lose these abstract methods
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.type"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.url"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.checksum"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.name"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.configurations"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.classifier"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactExtra.extension"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilterExtra.types"),
|
2018-03-23 14:21:05 +01:00
|
|
|
// contraband issue
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ConfigurationReportLite.copy*"
|
|
|
|
|
),
|
2018-03-23 14:21:05 +01:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.UpdateReportLite.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Artifact.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ArtifactTypeFilter.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Binary.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Caller.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ChainedResolver.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Checksum.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ConfigRef.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ConfigurationReport.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ConflictManager.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Constant.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Developer.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Disabled.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.FileConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.FileRepository.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Full.copy*"),
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.librarymanagement.GetClassifiersConfiguration.copy*"
|
|
|
|
|
),
|
2018-03-23 14:21:05 +01:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.GetClassifiersModule.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.InclExclRule.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.IvyFileConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.KeyFileAuthentication.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.MakePomConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.MavenCache.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.MavenRepo.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleConfiguration.copy*"),
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.librarymanagement.ModuleDescriptorConfiguration.copy*"
|
|
|
|
|
),
|
2018-03-23 14:21:05 +01:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleID.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleInfo.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ModuleReport.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.OrganizationArtifactReport.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.PasswordAuthentication.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Patch.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.Patterns.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.PomConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.PublishConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.RetrieveConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ScalaModuleInfo.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ScmInfo.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.SftpRepository.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.SshConnection.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.SshRepository.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.UpdateConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.UpdateReport.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.UpdateStats.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.URLRepository.copy*"),
|
2019-08-28 00:50:17 +02:00
|
|
|
// private[sbt]
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.librarymanagement.ResolverFunctions.useSecureResolvers"
|
|
|
|
|
),
|
2019-08-28 21:07:35 +02:00
|
|
|
exclude[ReversedMissingMethodProblem](
|
|
|
|
|
"sbt.librarymanagement.MavenRepository.allowInsecureProtocol"
|
2020-06-06 00:59:08 +02:00
|
|
|
),
|
2020-11-15 06:58:52 +01:00
|
|
|
exclude[IncompatibleResultTypeProblem](
|
|
|
|
|
"sbt.librarymanagement.ResolverFunctions.validateURLRepository"
|
|
|
|
|
),
|
|
|
|
|
exclude[IncompatibleResultTypeProblem](
|
|
|
|
|
"sbt.librarymanagement.ResolverFunctions.validateMavenRepo"
|
|
|
|
|
),
|
|
|
|
|
exclude[IncompatibleResultTypeProblem](
|
|
|
|
|
"sbt.librarymanagement.ResolverFunctions.validateArtifact"
|
|
|
|
|
),
|
2020-06-06 00:59:08 +02:00
|
|
|
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.*.validateProtocol"),
|
2022-06-13 03:55:09 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.cross.CrossVersionUtil.TransitionDottyVersion"
|
|
|
|
|
),
|
2021-05-03 04:18:03 +02:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ScalaArtifacts.dottyID"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ScalaArtifacts.DottyIDPrefix"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ScalaArtifacts.toolDependencies*"),
|
2018-03-09 11:08:36 +01:00
|
|
|
),
|
2017-04-26 22:55:38 +02:00
|
|
|
)
|
2017-06-21 17:22:56 +02:00
|
|
|
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilPosition, addSbtUtilCache)
|
2017-07-12 00:39:06 +02:00
|
|
|
|
|
|
|
|
lazy val lmIvy = (project in file("ivy"))
|
2017-04-26 22:55:38 +02:00
|
|
|
.enablePlugins(ContrabandPlugin, JsonCodecPlugin)
|
2019-08-18 05:06:52 +02:00
|
|
|
.dependsOn(lmCore)
|
2017-07-12 00:39:06 +02:00
|
|
|
.settings(
|
|
|
|
|
commonSettings,
|
|
|
|
|
name := "librarymanagement-ivy",
|
2019-08-18 05:06:52 +02:00
|
|
|
libraryDependencies ++= Seq(
|
|
|
|
|
ivy,
|
|
|
|
|
scalaTest % Test,
|
|
|
|
|
scalaCheck % Test,
|
|
|
|
|
scalaVerify % Test,
|
|
|
|
|
),
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / managedSourceDirectories +=
|
2017-07-12 00:39:06 +02:00
|
|
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
2021-05-03 04:18:03 +02:00
|
|
|
Compile / generateContrabands / sourceManaged := baseDirectory.value / "src" / "main" / "contraband-scala",
|
|
|
|
|
Compile / generateContrabands / contrabandFormatsForType := DatatypeConfig.getFormats,
|
|
|
|
|
Compile / console / scalacOptions --=
|
2017-08-10 12:56:43 +02:00
|
|
|
Vector("-Ywarn-unused-import", "-Ywarn-unused", "-Xlint"),
|
2017-07-20 18:13:35 +02:00
|
|
|
mimaSettings,
|
2018-03-08 17:19:37 +01:00
|
|
|
mimaBinaryIssueFilters ++= Seq(
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"
|
|
|
|
|
),
|
|
|
|
|
exclude[IncompatibleMethTypeProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.checkStatusCode"
|
|
|
|
|
),
|
2018-03-27 12:19:28 +02:00
|
|
|
// sbt.internal methods that changed type signatures and aren't used elsewhere in production code
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.IvySbt#ParallelCachedResolutionResolveEngine.mergeErrors"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.IvySbt.cleanCachedResolutionCache"
|
|
|
|
|
),
|
2018-03-27 12:19:28 +02:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvyRetrieve.artifacts"),
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.IvyScalaUtil.checkModule"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.CachedResolutionResolveEngine.mergeErrors"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.CachedResolutionResolveCache.buildArtificialModuleDescriptor"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.CachedResolutionResolveCache.buildArtificialModuleDescriptors"
|
|
|
|
|
),
|
|
|
|
|
exclude[ReversedMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.CachedResolutionResolveEngine.mergeErrors"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"
|
|
|
|
|
),
|
|
|
|
|
exclude[IncompatibleMethTypeProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler#SbtUrlInfo.this"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.checkStatusCode"
|
|
|
|
|
),
|
2018-03-23 14:21:05 +01:00
|
|
|
// contraband issue
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.librarymanagement.ivy.ExternalIvyConfiguration.copy*"
|
|
|
|
|
),
|
2018-03-23 14:21:05 +01:00
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ivy.InlineIvyConfiguration.copy*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ivy.IvyPaths.copy*"),
|
2019-08-28 00:50:17 +02:00
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.urlFactory"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.http"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.open"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.this"
|
|
|
|
|
),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.internal.librarymanagement.CustomPomParser.versionRangeFlag"
|
|
|
|
|
),
|
2020-10-04 18:42:46 +02:00
|
|
|
exclude[MissingClassProblem]("sbt.internal.librarymanagement.FixedParser*"),
|
2022-06-13 04:24:44 +02:00
|
|
|
exclude[MissingClassProblem]("sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler*"),
|
|
|
|
|
exclude[MissingClassProblem]("sbt.internal.librarymanagement.JavaNetAuthenticator"),
|
|
|
|
|
exclude[MissingClassProblem]("sbt.internal.librarymanagement.CustomHttp*"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvySbt.http"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.internal.librarymanagement.IvySbt.this"),
|
|
|
|
|
exclude[DirectMissingMethodProblem]("sbt.librarymanagement.ivy.IvyPublisher.apply"),
|
|
|
|
|
exclude[DirectMissingMethodProblem](
|
|
|
|
|
"sbt.librarymanagement.ivy.IvyDependencyResolution.apply"
|
|
|
|
|
),
|
2018-03-08 17:19:37 +01:00
|
|
|
),
|
2017-07-12 00:39:06 +02:00
|
|
|
)
|
2016-05-10 06:34:40 +02:00
|
|
|
|
2019-10-20 01:53:11 +02:00
|
|
|
// lazy val lmScriptedTest = (project in file("scripted-test"))
|
|
|
|
|
// .enablePlugins(SbtPlugin)
|
|
|
|
|
// .settings(
|
|
|
|
|
// commonSettings,
|
|
|
|
|
// skip in publish := true,
|
|
|
|
|
// name := "scripted-test",
|
|
|
|
|
// scriptedLaunchOpts := {
|
|
|
|
|
// scriptedLaunchOpts.value ++
|
|
|
|
|
// Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
|
|
|
|
|
// },
|
|
|
|
|
// scriptedBufferLog := false
|
|
|
|
|
// )
|
|
|
|
|
// .enablePlugins(SbtScriptedIT)
|
2018-10-02 19:38:18 +02:00
|
|
|
|
2019-05-12 03:25:23 +02:00
|
|
|
// we are updating the nightly process, so we are commenting this out for now
|
|
|
|
|
// addCommandAlias("scriptedIvy", Seq(
|
|
|
|
|
// "lmCore/publishLocal",
|
|
|
|
|
// "lmIvy/publishLocal",
|
|
|
|
|
// "lmScriptedTest/clean",
|
|
|
|
|
// """set ThisBuild / scriptedTestLMImpl := "ivy"""",
|
|
|
|
|
// """set ThisBuild / scriptedLaunchOpts += "-Ddependency.resolution=ivy" """,
|
|
|
|
|
// "lmScriptedTest/scripted").mkString(";",";",""))
|
2018-10-15 19:20:36 +02:00
|
|
|
|
2016-05-10 06:34:40 +02:00
|
|
|
def customCommands: Seq[Setting[_]] = Seq(
|
|
|
|
|
commands += Command.command("release") { state =>
|
|
|
|
|
// "clean" ::
|
2017-07-06 15:05:04 +02:00
|
|
|
"+compile" ::
|
|
|
|
|
"+publishSigned" ::
|
2017-04-26 22:55:38 +02:00
|
|
|
"reload" ::
|
|
|
|
|
state
|
2016-05-10 06:34:40 +02:00
|
|
|
}
|
|
|
|
|
)
|
2018-01-11 15:02:45 +01:00
|
|
|
|
2018-03-14 17:59:09 +01:00
|
|
|
def inCompileAndTest(ss: SettingsDefinition*): Seq[Setting[_]] =
|
|
|
|
|
Seq(Compile, Test) flatMap (inConfig(_)(Def.settings(ss: _*)))
|