Skip to content

Commit

Permalink
Remove deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrf committed Nov 30, 2023
1 parent fef2946 commit 9f5ab90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ object SbtVersionPolicySettings {
)

def reconciliationSettings = Def.settings(
versionPolicyDependencySchemes ++= libraryDependencySchemes.value,
versionPolicyFallbackReconciliations := {
val sv = scalaVersion.value
val sbv = scalaBinaryVersion.value
Expand All @@ -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")
Expand Down Expand Up @@ -377,7 +376,6 @@ object SbtVersionPolicySettings {
)

def schemesGlobalSettings = Seq(
versionPolicyDependencySchemes := Seq.empty,
versionScheme := Some("early-semver")
)

Expand Down

0 comments on commit 9f5ab90

Please sign in to comment.