-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Drop interplay #447
Merged
Merged
Drop interplay #447
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import sbt._ | ||
import sbt.Keys._ | ||
import sbt.Package.ManifestAttributes | ||
|
||
/** | ||
* This AutoPlugin adds the `Omnidoc-Source-URL` key on the MANIFEST.MF of artifact-sources.jar so later Omnidoc can use | ||
* that value to link scaladocs to GitHub sources. | ||
*/ | ||
object Omnidoc extends AutoPlugin { | ||
|
||
object autoImport { | ||
lazy val omnidocSnapshotBranch = settingKey[String]("Git branch for development versions") | ||
lazy val omnidocPathPrefix = settingKey[String]("Prefix before source directory paths") | ||
lazy val omnidocSourceUrl = settingKey[Option[String]]("Source URL for scaladoc linking") | ||
} | ||
|
||
val repoName = "scalatestplus-play" | ||
|
||
val omnidocGithubRepo: Option[String] = Some(s"playframework/${repoName}") | ||
|
||
val omnidocTagPrefix: Option[String] = Some("") | ||
|
||
val SourceUrlKey = "Omnidoc-Source-URL" | ||
|
||
override def requires = sbt.plugins.JvmPlugin | ||
|
||
override def trigger = noTrigger | ||
|
||
import autoImport.* | ||
|
||
override def projectSettings = Seq( | ||
omnidocSourceUrl := omnidocGithubRepo.map { repo => | ||
val development: String = (omnidocSnapshotBranch ?? "main").value | ||
val tagged: String = omnidocTagPrefix.getOrElse("v") + version.value | ||
val tree: String = if (isSnapshot.value) development else tagged | ||
val prefix: String = "/" + (omnidocPathPrefix ?? "").value | ||
val path: String = { | ||
val buildDir: File = (ThisBuild / baseDirectory).value | ||
val projDir: File = baseDirectory.value | ||
val rel: Option[String] = IO.relativize(buildDir, projDir) | ||
rel match { | ||
case None if buildDir == projDir => "" // Same dir (sbt 0.13) | ||
case Some("") => "" // Same dir (sbt 1.0) | ||
case Some(childDir) => prefix + childDir // Child dir | ||
case None => "" // Disjoint dirs (Rich: I'm not sure if this can happen) | ||
} | ||
} | ||
s"https://github.com/${repo}/tree/${tree}${path}" | ||
}, | ||
Compile / packageSrc / packageOptions ++= omnidocSourceUrl.value.toSeq.map { url => | ||
ManifestAttributes(SourceUrlKey -> url) | ||
} | ||
) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import sbt._ | ||
import sbt.Keys._ | ||
import sbt.io.IO | ||
|
||
object Playdoc extends AutoPlugin { | ||
|
||
object autoImport { | ||
final val Docs = config("docs") | ||
val playdocDirectory = settingKey[File]("Base directory of play documentation") | ||
val playdocPackage = taskKey[File]("Package play documentation") | ||
} | ||
|
||
import autoImport._ | ||
|
||
override def requires = sbt.plugins.JvmPlugin | ||
|
||
override def trigger = noTrigger | ||
|
||
override def projectSettings = | ||
Defaults.packageTaskSettings(playdocPackage, playdocPackage / mappings) ++ | ||
Seq( | ||
playdocDirectory := (ThisBuild / baseDirectory).value / "docs" / "manual", | ||
playdocPackage / mappings := { | ||
val base: File = playdocDirectory.value | ||
base.allPaths.pair(IO.relativize(base.getParentFile(), _)) | ||
}, | ||
playdocPackage / artifactClassifier := Some("playdoc"), | ||
playdocPackage / artifact ~= { _.withConfigurations(Vector(Docs)) } | ||
) ++ | ||
addArtifact(playdocPackage / artifact, playdocPackage) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
resolvers ++= DefaultOptions.resolvers(snapshot = true) | ||
resolvers ++= Seq( | ||
Resolver.typesafeRepo("releases"), | ||
Resolver.sonatypeRepo("releases"), | ||
Resolver.sonatypeRepo("snapshots"), // used by deploy nightlies, which publish here & use -Dplay.version | ||
) | ||
resolvers ++= Resolver | ||
.sonatypeOssRepos("snapshots") // used by deploy nightlies, which publish here & use -Dplay.version | ||
|
||
addSbtPlugin("com.typesafe.play" % "interplay" % sys.props.getOrElse("interplay.version", "3.1.7")) | ||
addSbtPlugin("com.typesafe.play" % "play-docs-sbt-plugin" % sys.props.getOrElse("play.version", "2.9.0-RC2")) | ||
|
||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") | ||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkurz How did we release this library without
sbt-ci-release
plugin? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interplay provided that: https://github.com/playframework/interplay/blob/ad1bddb900e2883f7ad78e59c70fc86603903a52/build.sbt#L19