Skip to content

Commit

Permalink
Improved versionScheme documentation (com-lihaoyi#1660)
Browse files Browse the repository at this point in the history
Pull request: com-lihaoyi#1660
  • Loading branch information
lefou authored Jan 8, 2022
1 parent 2440418 commit 815b9b0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scalalib/src/PublishModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,20 @@ trait PublishModule extends JavaModule { outer =>
def publishVersion: T[String]

/**
* Version scheme used for the model: Supported values are VersionScheme.EarlySemVer, VersionScheme.PVP, and VersionScheme.SemVerSpec
* Optional information about the used version scheme.
* This may enable dependency resolvers to properly resolve version ranges and version mismatches (conflicts).
* This information will be written as `info.versionScheme` property in the `pom.xml`.
* See [[VersionScheme]] for possible values.
*
* You can find more info under these links:
* - https://docs.scala-lang.org/overviews/core/binary-compatibility-for-library-authors.html#recommended-versioning-scheme
* - https://www.scala-lang.org/blog/2021/02/16/preventing-version-conflicts-with-versionscheme.html
* - https://www.scala-sbt.org/1.x/docs/Publishing.html#Version+scheme
* - https://semver.org
*
* @since Mill after 0.10.0-M5
*/
def versionScheme: T[Option[VersionScheme]] = None
def versionScheme: Target[Option[VersionScheme]] = T { None }

def publishSelfDependency: Target[Artifact] = T {
Artifact(pomSettings().organization, artifactId(), publishVersion())
Expand Down

0 comments on commit 815b9b0

Please sign in to comment.