From 9f5ab9097d61803ad59f604e8084049a3941e4d5 Mon Sep 17 00:00:00 2001 From: Julien Richard-Foy Date: Wed, 29 Nov 2023 14:27:56 +0100 Subject: [PATCH] Remove deprecated API --- .../main/scala/sbtversionpolicy/SbtVersionPolicyKeys.scala | 7 ++----- .../scala/sbtversionpolicy/SbtVersionPolicySettings.scala | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicyKeys.scala b/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicyKeys.scala index 490b5bb..e3944eb 100644 --- a/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicyKeys.scala +++ b/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicyKeys.scala @@ -20,13 +20,10 @@ trait SbtVersionPolicyKeys { final val versionCheck = taskKey[Unit]("Checks that the version is consistent with the intended compatibility level defined via versionPolicyIntention") final val versionPolicyIgnored = settingKey[Seq[OrganizationArtifactName]]("Exclude these dependencies from versionPolicyReportDependencyIssues.") - // Note: defined as a def because adding a val to a trait is not binary compatible - final def versionPolicyIgnoredInternalDependencyVersions = SettingKey[Option[Regex]]("versionPolicyIgnoredInternalDependencyVersions", "Exclude dependencies to projects of the current build whose version matches this regular expression.") + final val versionPolicyIgnoredInternalDependencyVersions = settingKey[Option[Regex]]("Exclude dependencies to projects of the current build whose version matches this regular expression.") - final def versionPolicyModuleVersionExtractor = SettingKey[PartialFunction[ModuleID, String]]("versionPolicyModuleVersionExtractor", "Parse version number from ModuleId. Defaults to `_.revision`") + final val versionPolicyModuleVersionExtractor = settingKey[PartialFunction[ModuleID, String]]("Parse version number from ModuleId. Defaults to `_.revision`") - @deprecated("Use libraryDependencySchemes instead", "1.1.0") - final val versionPolicyDependencySchemes = settingKey[Seq[ModuleID]]("""Versioning schemes for the library dependencies (e.g. "org.scala-lang" % "scala-compiler" % "strict")""") final val versionPolicyDefaultScheme = settingKey[Option[VersionCompatibility]]("Fallback reconciliation used to evaluate version policy issues in the library dependency.") final val versionPolicyDefaultDependencySchemes = settingKey[Seq[ModuleID]]("Fallback rules used to evaluate version policy issues in the library dependency.") diff --git a/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicySettings.scala b/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicySettings.scala index dc1d9f5..c4f575f 100644 --- a/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicySettings.scala +++ b/sbt-version-policy/src/main/scala/sbtversionpolicy/SbtVersionPolicySettings.scala @@ -55,7 +55,6 @@ object SbtVersionPolicySettings { ) def reconciliationSettings = Def.settings( - versionPolicyDependencySchemes ++= libraryDependencySchemes.value, versionPolicyFallbackReconciliations := { val sv = scalaVersion.value val sbv = scalaBinaryVersion.value @@ -80,7 +79,7 @@ object SbtVersionPolicySettings { versionPolicyDetailedReconciliations := { val sv = scalaVersion.value val sbv = scalaBinaryVersion.value - versionPolicyDependencySchemes.value.map { mod => + libraryDependencySchemes.value.map { mod => val rec = VersionCompatibility(mod.revision) match { case Some(r) => r case None => sys.error(s"Unrecognized reconciliation '${mod.revision}' in $mod") @@ -377,7 +376,6 @@ object SbtVersionPolicySettings { ) def schemesGlobalSettings = Seq( - versionPolicyDependencySchemes := Seq.empty, versionScheme := Some("early-semver") )