Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CrossVersion val/type compat aliases & .disabled #121

Merged
merged 1 commit into from
Jul 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import sbt.internal.librarymanagement.cross.CrossVersionUtil
final case class ScalaVersion(full: String, binary: String)

abstract class CrossVersionFunctions {
/** Compatibility with 0.13 */
final val Disabled = sbt.librarymanagement.Disabled
final val Binary = sbt.librarymanagement.Binary
final val Full = sbt.librarymanagement.Full
final val Patch = sbt.librarymanagement.Patch
type Binary = sbt.librarymanagement.Binary
type Full = sbt.librarymanagement.Full
type Patch = sbt.librarymanagement.Patch

/** The first `major.minor` Scala version that the Scala binary version should be used for cross-versioning instead of the full version. */
val TransitionScalaVersion = CrossVersionUtil.TransitionScalaVersion
Expand All @@ -24,6 +32,9 @@ abstract class CrossVersionFunctions {
/** Cross-versions a module with the binary version (typically the binary Scala version). */
def binary: CrossVersion = Binary()

/** Disables cross versioning for a module. */
def disabled: CrossVersion = Disabled()

/** Cross-versions a module with a constant string (typically the binary Scala version). */
def constant(value: String): CrossVersion = Constant(value)

Expand Down