mirror of https://github.com/sbt/sbt.git
Unidoc
This commit is contained in:
parent
40d4e6186e
commit
4eb096de9c
|
|
@ -136,7 +136,14 @@ See [PROFILING](./PROFILING.md)
|
|||
Other notes for maintainers
|
||||
---------------------------
|
||||
|
||||
### Publishing VS Code Extensions
|
||||
Please note that these tests run PAINFULLY slow if the version set in
|
||||
`build.sbt` is set to SNAPSHOT, as every time the scripted test boots
|
||||
up a test instance of sbt, remote mirrors are scanned for possible
|
||||
updates. It is recommended that you set the version suffix to
|
||||
`-devel`, as in `1.0.0-devel`.
|
||||
|
||||
Note for maintainers
|
||||
====================
|
||||
|
||||
Reference https://code.visualstudio.com/docs/extensions/publish-extension
|
||||
|
||||
|
|
@ -158,3 +165,14 @@ Contributing to sbt requires you or your employer to sign the
|
|||
To make it easier to respect our license agreements, we have added an sbt task
|
||||
that takes care of adding the LICENSE headers to new files. Run `headerCreate`
|
||||
and sbt will put a copyright notice into it.
|
||||
|
||||
### Building API docs
|
||||
|
||||
1. Rebase wip/unidoc branch https://github.com/eed3si9n/sbt/tree/wip/unidoc on top of the target sbt version.
|
||||
2. Set the version to the target version.
|
||||
3. Check out the right versions for all modules locally, and run ./sbt-allsources.sh.
|
||||
4. ghpagesPushSite
|
||||
|
||||
### Building Documentation
|
||||
|
||||
The scala-sbt.org site documentation is a separate project [website](https://github.com/sbt/website). Follow [the steps in the README](https://github.com/sbt/website#scala-sbtorg) to generate the documentation.
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ def mimaSettingsSince(versions: Seq[String]): Seq[Def.Setting[_]] = Def settings
|
|||
val scriptedSbtReduxMimaSettings = Def.settings(mimaPreviousArtifacts := Set())
|
||||
|
||||
lazy val sbtRoot: Project = (project in file("."))
|
||||
.enablePlugins(ScriptedPlugin) // , SiteScaladocPlugin, GhpagesPlugin)
|
||||
.enablePlugins(ScriptedPlugin, ScalaUnidocPlugin, DocsPlugin)
|
||||
.aggregate(nonRoots: _*)
|
||||
.settings(
|
||||
buildLevelSettings,
|
||||
|
|
@ -196,7 +196,6 @@ lazy val sbtRoot: Project = (project in file("."))
|
|||
else "")
|
||||
},
|
||||
Util.baseScalacOptions,
|
||||
Docs.settings,
|
||||
scalacOptions += "-Ymacro-expand:none", // for both sxr and doc
|
||||
Util.publishPomSettings,
|
||||
otherRootSettings,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ package sbt
|
|||
import java.io.File
|
||||
import java.nio.channels.ClosedChannelException
|
||||
import sbt.internal.inc.{ AnalyzingCompiler, MappedFileConverter, PlainVirtualFile }
|
||||
import sbt.internal.util.{ DeprecatedJLine, Terminal }
|
||||
import sbt.internal.util.{ DeprecatedJLine, Terminal => UTerminal }
|
||||
import sbt.util.Logger
|
||||
import xsbti.compile.{ Compilers, Inputs }
|
||||
|
||||
|
|
@ -46,14 +46,14 @@ final class Console(compiler: AnalyzingCompiler) {
|
|||
initialCommands: String,
|
||||
cleanupCommands: String
|
||||
)(loader: Option[ClassLoader], bindings: Seq[(String, Any)])(implicit log: Logger): Try[Unit] = {
|
||||
apply(classpath, options, initialCommands, cleanupCommands, Terminal.get)(loader, bindings)
|
||||
apply(classpath, options, initialCommands, cleanupCommands, UTerminal.get)(loader, bindings)
|
||||
}
|
||||
def apply(
|
||||
classpath: Seq[File],
|
||||
options: Seq[String],
|
||||
initialCommands: String,
|
||||
cleanupCommands: String,
|
||||
terminal: Terminal
|
||||
terminal: UTerminal
|
||||
)(loader: Option[ClassLoader], bindings: Seq[(String, Any)])(implicit log: Logger): Try[Unit] = {
|
||||
def console0(): Unit =
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ package sbt
|
|||
|
||||
import java.nio.file.Paths
|
||||
import sbt.util.Level
|
||||
import sbt.internal.util.{ AttributeKey, FullReader, LineReader, Terminal }
|
||||
import sbt.internal.util.{ AttributeKey, FullReader, LineReader, Terminal => UTerminal }
|
||||
import sbt.internal.util.complete.{
|
||||
Completion,
|
||||
Completions,
|
||||
|
|
@ -400,7 +400,7 @@ object BasicCommands {
|
|||
def oldshell: Command = Command.command(OldShell, Help.more(Shell, OldShellDetailed)) { s =>
|
||||
val history = (s get historyPath) getOrElse (new File(s.baseDir, ".history")).some
|
||||
val prompt = (s get shellPrompt) match { case Some(pf) => pf(s); case None => "> " }
|
||||
val reader = new FullReader(history, s.combinedParser, LineReader.HandleCONT, Terminal.console)
|
||||
val reader = new FullReader(history, s.combinedParser, LineReader.HandleCONT, UTerminal.console)
|
||||
val line = reader.readLine(prompt)
|
||||
line match {
|
||||
case Some(line) =>
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ object Defaults extends BuildCommon {
|
|||
)
|
||||
)
|
||||
private[sbt] lazy val globalCore: Seq[Setting[_]] = globalDefaults(
|
||||
defaultTestTasks(test) ++ defaultTestTasks(testOnly) ++ defaultTestTasks(testQuick) ++ Seq(
|
||||
defaultTestTasks(Keys.test) ++ defaultTestTasks(testOnly) ++ defaultTestTasks(testQuick) ++ Seq(
|
||||
excludeFilter :== HiddenFileFilter,
|
||||
fileInputs :== Nil,
|
||||
fileInputIncludeFilter :== AllPassFilter.toNio,
|
||||
|
|
@ -1089,7 +1089,7 @@ object Defaults extends BuildCommon {
|
|||
)
|
||||
)
|
||||
lazy val testTasks
|
||||
: Seq[Setting[_]] = testTaskOptions(test) ++ testTaskOptions(testOnly) ++ testTaskOptions(
|
||||
: Seq[Setting[_]] = testTaskOptions(Keys.test) ++ testTaskOptions(testOnly) ++ testTaskOptions(
|
||||
testQuick
|
||||
) ++ testDefaults ++ Seq(
|
||||
testLoader := ClassLoaders.testTask.value,
|
||||
|
|
@ -1104,23 +1104,23 @@ object Defaults extends BuildCommon {
|
|||
executeTests := (
|
||||
Def.taskDyn {
|
||||
allTestGroupsTask(
|
||||
(streams in test).value,
|
||||
(streams in Keys.test).value,
|
||||
loadedTestFrameworks.value,
|
||||
testLoader.value,
|
||||
(testGrouping in test).value,
|
||||
(testExecution in test).value,
|
||||
(fullClasspath in test).value,
|
||||
(testGrouping in Keys.test).value,
|
||||
(testExecution in Keys.test).value,
|
||||
(fullClasspath in Keys.test).value,
|
||||
testForkedParallel.value,
|
||||
(javaOptions in test).value,
|
||||
(javaOptions in Keys.test).value,
|
||||
(classLoaderLayeringStrategy).value,
|
||||
projectId = s"${thisProject.value.id} / ",
|
||||
)
|
||||
}
|
||||
).value,
|
||||
// ((streams in test, loadedTestFrameworks, testLoader, testGrouping in test, testExecution in test, fullClasspath in test, javaHome in test, testForkedParallel, javaOptions in test) flatMap allTestGroupsTask).value,
|
||||
testResultLogger in (Test, test) :== TestResultLogger.SilentWhenNoTests, // https://github.com/sbt/sbt/issues/1185
|
||||
test := {
|
||||
val trl = (testResultLogger in (Test, test)).value
|
||||
testResultLogger in (Test, Keys.test) :== TestResultLogger.SilentWhenNoTests, // https://github.com/sbt/sbt/issues/1185
|
||||
Keys.test := {
|
||||
val trl = (testResultLogger in (Test, Keys.test)).value
|
||||
val taskName = Project.showContextKey(state.value).show(resolvedScoped.value)
|
||||
try trl.run(streams.value.log, executeTests.value, taskName)
|
||||
finally close(testLoader.value)
|
||||
|
|
@ -1236,8 +1236,8 @@ object Defaults extends BuildCommon {
|
|||
|
||||
def testQuickFilter: Initialize[Task[Seq[String] => Seq[String => Boolean]]] =
|
||||
Def.task {
|
||||
val cp = (fullClasspath in test).value
|
||||
val s = (streams in test).value
|
||||
val cp = (fullClasspath in Keys.test).value
|
||||
val s = (streams in Keys.test).value
|
||||
val ans: Seq[Analysis] = cp.flatMap(_.metadata get Keys.analysis) map {
|
||||
case a0: Analysis => a0
|
||||
}
|
||||
|
|
@ -3923,13 +3923,15 @@ object Classpaths {
|
|||
// for forward-compatibility with launcher.jar prior to 1.3.11
|
||||
private[this] def mavenRepoAllowInsecureProtocol(mavenRepo: xsbti.MavenRepository): Boolean =
|
||||
try {
|
||||
mavenRepo.allowInsecureProtocol
|
||||
false
|
||||
// mavenRepo.allowInsecureProtocol
|
||||
} catch { case _: NoSuchMethodError => false }
|
||||
|
||||
// for forward-compatibility with launcher.jar prior to 1.3.11
|
||||
private[this] def allowInsecureProtocol(ivyRepo: xsbti.IvyRepository): Boolean =
|
||||
try {
|
||||
ivyRepo.allowInsecureProtocol
|
||||
false
|
||||
// ivyRepo.allowInsecureProtocol
|
||||
} catch { case _: NoSuchMethodError => false }
|
||||
|
||||
@com.github.ghik.silencer.silent
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ object ConsoleProject {
|
|||
def apply(state: State, extra: String, cleanupCommands: String = "", options: Seq[String] = Nil)(
|
||||
implicit log: Logger
|
||||
): Unit = {
|
||||
/*
|
||||
val extracted = Project extract state
|
||||
val cpImports = new Imports(extracted, state)
|
||||
val bindings = ("currentState" -> state) :: ("extracted" -> extracted) :: ("cpHelpers" -> cpImports) :: Nil
|
||||
|
|
@ -70,6 +71,7 @@ object ConsoleProject {
|
|||
cleanupCommands,
|
||||
terminal
|
||||
)(Some(unit.loader), bindings).get
|
||||
*/
|
||||
()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
### Fixes
|
||||
|
||||
- Fixes triggered execution's resource leak by caching the watch service. [#3999][3999] by [@eatkins][@eatkins]
|
||||
- Fixes classloader classloader inheriting the dependencies of Scala compiler during `run` [zinc#505][zinc505] by [@eed3si9n][@eed3si9n]
|
||||
- Fixes forked test concurrency issue. [#4030][4030] by [@eatkins][@eatkins]
|
||||
- Fixes `new` command leaving behind target directory [#4033][4033] by [@eed3si9n][@eed3si9n]
|
||||
- Fixes handling on null Content-Type. [lm214][lm214] by [@staale][@staale]
|
||||
- Fixes null handling of `managedChecksums` in `ivySettings` file. [lm#218][lm218] by [@IanGabes][@IanGabes]
|
||||
- Adds `sbt.boot.lock` as a JVM property to opt-out of locking. [#3927][3927] by [@dwijnand][@dwijnand]
|
||||
- Provides `SBT_GLOBAL_SERVER_DIR` env var as a workaround to long socket file path on UNIX. [#3932][3932] by [@dwijnand][@dwijnand]
|
||||
- Fixes forked runs reporting noisy "Stream closed" exception. [#3970][3970] by [@retronym][@retronym]
|
||||
- Fixes test compilation not getting included in VS Code save trigger. [#4022][4022] by [@tmiyamon][@tmiyamon]
|
||||
- Fixes sbt server responding with string id when number id passed. [#4025][4025] by [@tiqwab][@tiqwab]
|
||||
- Fixes `getDecoder` in Analysis format [zinc#502][zinc502] by [@jilen][@jilen]
|
||||
- Fixes equal / hashCode inconsistencies around Array. [zinc#513][zinc513] by [@eed3si9n][@eed3si9n]
|
||||
- Whitelists `java9-rt-ext- output` in rt export process [lp#211][lp211] by [@eatkins][@eatkins]
|
||||
- Fixes JDK version detection. [lp#219][lp219] by [@eed3si9n][@eed3si9n] and [@2m][@2m]
|
||||
- Fixes quoting in Windows bat file. [lp#220][lp220] by [@ForNeVeR][@ForNeVeR]
|
||||
- Fixes `-error` not supressing startup logs. [#4036][4036] by [@eed3si9n][@eed3si9n]
|
||||
|
||||
### Improvements
|
||||
|
||||
- Performance optimization around logging. [util#152][util152] by [@retronym][@retronym]
|
||||
- Performance fix by caching the hashCode of `Configuration`. [lm#213][lm213] by [@retronym][@retronym]
|
||||
- Returns error code `-33000L` on sbt server when a command fails. [#3991][3991] by [@dwijnand][@dwijnand]
|
||||
- Allows wildcards in organization and artifact. [#215][lm215] by [@dhs3000][@dhs3000]
|
||||
- Updates to latest Jsch to support stronger key exchange algorithms. [lm#217][lm217] by [@ryandbair][@ryandbair]
|
||||
- Fixes preloading of compiler bridge. [lp#222][lp222] by [@analytically][@analytically]
|
||||
|
||||
### Internal
|
||||
|
||||
- Updates [contribution guide][CONTRIBUTING]. [#3960][3960]/[#4019][4019] by [@eed3si9n][@eed3si9n]
|
||||
- Deletes `buildinfo.BuildInfo` from sbt main that was intended for testing. [3967][3967] by [@dwijnand][@dwijnand] and [@xuwei-k][@xuwei-k]
|
||||
- Various improvements around Zinc benchmark by [@retronym][@retronym]
|
||||
|
||||
[@eed3si9n]: https://github.com/eed3si9n
|
||||
[@dwijnand]: http://github.com/dwijnand
|
||||
[@cunei]: https://github.com/cunei
|
||||
[@jvican]: https://github.com/jvican
|
||||
[@Duhemm]: https://github.com/Duhemm
|
||||
[@xuwei-k]: https://github.com/xuwei-k
|
||||
[@retronym]: https://github.com/retronym
|
||||
[@eatkins]: https://github.com/eatkins
|
||||
[@itohiro73]: https://github.com/itohiro73
|
||||
[@tmiyamon]: https://github.com/tmiyamon
|
||||
[@tiqwab]: https://github.com/tiqwab
|
||||
[@staale]: https://github.com/staale
|
||||
[@ryandbair]: https://github.com/ryandbair
|
||||
[@dhs3000]: https://github.com/dhs3000
|
||||
[@IanGabes]: https://github.com/IanGabes
|
||||
[@jilen]: https://github.com/jilen
|
||||
[@2m]: https://github.com/2m
|
||||
[@ForNeVeR]: https://github.com/ForNeVeR
|
||||
[@analytically]: https://github.com/analytically
|
||||
[3927]: https://github.com/sbt/sbt/pull/3927
|
||||
[3932]: https://github.com/sbt/sbt/pull/3932
|
||||
[3960]: https://github.com/sbt/sbt/pull/3960
|
||||
[3967]: https://github.com/sbt/sbt/pull/3967
|
||||
[3970]: https://github.com/sbt/sbt/pull/3970
|
||||
[3999]: https://github.com/sbt/sbt/pull/3999
|
||||
[3991]: https://github.com/sbt/sbt/pull/3991
|
||||
[4019]: https://github.com/sbt/sbt/pull/4019
|
||||
[4022]: https://github.com/sbt/sbt/pull/4022
|
||||
[4025]: https://github.com/sbt/sbt/pull/4025
|
||||
[4030]: https://github.com/sbt/sbt/pull/4030
|
||||
[4033]: https://github.com/sbt/sbt/pull/4033
|
||||
[4036]: https://github.com/sbt/sbt/pull/4036
|
||||
[util152]: https://github.com/sbt/util/pull/152
|
||||
[lm213]: https://github.com/sbt/librarymanagement/pull/213
|
||||
[lm214]: https://github.com/sbt/librarymanagement/pull/214
|
||||
[lm215]: https://github.com/sbt/librarymanagement/pull/215
|
||||
[lm217]: https://github.com/sbt/librarymanagement/pull/217
|
||||
[lm218]: https://github.com/sbt/librarymanagement/pull/218
|
||||
[zinc502]: https://github.com/sbt/zinc/pull/502
|
||||
[zinc505]: https://github.com/sbt/zinc/pull/505
|
||||
[zinc513]: https://github.com/sbt/zinc/pull/513
|
||||
[lp211]: https://github.com/sbt/sbt-launcher-package/pull/211
|
||||
[lp219]: https://github.com/sbt/sbt-launcher-package/pull/219
|
||||
[lp220]: https://github.com/sbt/sbt-launcher-package/pull/220
|
||||
[lp222]: https://github.com/sbt/sbt-launcher-package/pull/222
|
||||
[CONTRIBUTING]: https://github.com/sbt/sbt/blob/1.x/CONTRIBUTING.md
|
||||
|
|
@ -68,13 +68,13 @@ object Dependencies {
|
|||
def addSbtLmIvy = addSbtModule(sbtLmPath, "lmIvy", libraryManagementIvy)
|
||||
def addSbtLmIvyTest = addSbtModule(sbtLmPath, "lmIvy", libraryManagementIvy, Some(Test))
|
||||
|
||||
def addSbtCompilerInterface = addSbtModule(sbtZincPath, "compilerInterfaceJVM", compilerInterface)
|
||||
def addSbtCompilerClasspath = addSbtModule(sbtZincPath, "zincClasspathJVM2_12", compilerClasspath)
|
||||
def addSbtCompilerApiInfo = addSbtModule(sbtZincPath, "zincApiInfoJVM2_12", compilerApiInfo)
|
||||
def addSbtCompilerBridge = addSbtModule(sbtZincPath, "compilerBridgeJVM2_12", compilerBridge)
|
||||
def addSbtZinc = addSbtModule(sbtZincPath, "zincJVM2_12", zinc)
|
||||
def addSbtZincCompile = addSbtModule(sbtZincPath, "zincCompileJVM2_12", zincCompile)
|
||||
def addSbtZincCompileCore = addSbtModule(sbtZincPath, "zincCompileCoreJVM2_12", zincCompileCore)
|
||||
def addSbtCompilerInterface = addSbtModule(sbtZincPath, "compilerInterface", compilerInterface)
|
||||
def addSbtCompilerClasspath = addSbtModule(sbtZincPath, "zincClasspath", compilerClasspath)
|
||||
def addSbtCompilerApiInfo = addSbtModule(sbtZincPath, "zincApiInfo", compilerApiInfo)
|
||||
def addSbtCompilerBridge = addSbtModule(sbtZincPath, "compilerBridge", compilerBridge)
|
||||
def addSbtZinc = addSbtModule(sbtZincPath, "zinc", zinc)
|
||||
def addSbtZincCompile = addSbtModule(sbtZincPath, "zincCompile", zincCompile)
|
||||
def addSbtZincCompileCore = addSbtModule(sbtZincPath, "zincCompileCore", zincCompileCore)
|
||||
|
||||
val lmCoursierShaded = "io.get-coursier" %% "lm-coursier-shaded" % "2.0.0"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,89 @@
|
|||
import sbt._
|
||||
/*
|
||||
import sbt._, Keys._
|
||||
|
||||
import StatusPlugin.autoImport._
|
||||
import com.typesafe.sbt.site.SitePlugin.autoImport._
|
||||
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
|
||||
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._
|
||||
import com.typesafe.sbt.site.SiteScaladocPlugin
|
||||
import SiteScaladocPlugin.autoImport._
|
||||
import com.typesafe.sbt.sbtghpages.GhpagesPlugin
|
||||
import GhpagesPlugin.autoImport._
|
||||
import com.typesafe.sbt.SbtGit, SbtGit.{ git, GitKeys }
|
||||
import Sxr.{ sxr, SxrConf }
|
||||
*/
|
||||
import sbtunidoc.{ BaseUnidocPlugin, ScalaUnidocPlugin }
|
||||
import BaseUnidocPlugin.autoImport._
|
||||
import ScalaUnidocPlugin.autoImport._
|
||||
|
||||
object Docs {
|
||||
def settings: Seq[Setting[_]] = Nil
|
||||
object DocsPlugin extends AutoPlugin {
|
||||
override def requires = GhpagesPlugin && ScalaUnidocPlugin && SiteScaladocPlugin
|
||||
|
||||
/*
|
||||
val siteExcludes = Set(".buildinfo", "objects.inv")
|
||||
def siteInclude(f: File) = !siteExcludes.contains(f.getName)
|
||||
|
||||
def settings: Seq[Setting[_]] = Def settings (
|
||||
override def projectSettings: Seq[Setting[_]] = Def settings (
|
||||
siteSubdirName in SiteScaladoc := "api",
|
||||
siteIncludeSxr("sxr"),
|
||||
ghPagesSettings
|
||||
ghPagesSettings,
|
||||
unidocProjectFilter in (ScalaUnidoc, unidoc) := {
|
||||
inProjects(projectRefs(baseDirectory.value): _*)
|
||||
},
|
||||
doc in Compile := { (unidoc in Compile).value.head }
|
||||
)
|
||||
|
||||
/**
|
||||
* This is a list manually constructed from
|
||||
* sbt:sbtRoot> projects
|
||||
*/
|
||||
def projectRefs(base: File): Seq[ProjectReference] = {
|
||||
val parent = base.getParentFile
|
||||
val lmPath = parent / "librarymanagement"
|
||||
val zincPath = parent / "zinc"
|
||||
val ioPath = parent / "io"
|
||||
Vector(
|
||||
LocalProject("actionsProj"),
|
||||
LocalProject("collectionProj"),
|
||||
LocalProject("commandProj"),
|
||||
LocalProject("completeProj"),
|
||||
LocalProject("coreMacrosProj"),
|
||||
LocalProject("logicProj"),
|
||||
LocalProject("mainProj"),
|
||||
LocalProject("mainSettingsProj"),
|
||||
LocalProject("protocolProj"),
|
||||
LocalProject("runProj"),
|
||||
LocalProject("sbtProj"),
|
||||
LocalProject("scriptedPluginProj"),
|
||||
LocalProject("scriptedSbtProj"),
|
||||
LocalProject("stdTaskProj"),
|
||||
LocalProject("taskProj"),
|
||||
LocalProject("testAgentProj"),
|
||||
LocalProject("utilCache"),
|
||||
LocalProject("utilControl"),
|
||||
LocalProject("utilInterface"),
|
||||
LocalProject("utilLogging"),
|
||||
LocalProject("utilPosition"),
|
||||
LocalProject("utilRelation"),
|
||||
LocalProject("utilScripted"),
|
||||
LocalProject("utilTracking"),
|
||||
|
||||
) ++
|
||||
Vector(
|
||||
ProjectRef(lmPath, "lmCore"),
|
||||
ProjectRef(lmPath, "lmIvy"),
|
||||
) ++
|
||||
Vector(
|
||||
// skipping some of the internal subprojects here
|
||||
ProjectRef(zincPath, "compilerBridge"),
|
||||
ProjectRef(zincPath, "compilerInterface"),
|
||||
ProjectRef(zincPath, "zinc"),
|
||||
ProjectRef(zincPath, "zincApiInfo"),
|
||||
ProjectRef(zincPath, "zincClassfile"),
|
||||
ProjectRef(zincPath, "zincClasspath"),
|
||||
ProjectRef(zincPath, "zincCompile"),
|
||||
ProjectRef(zincPath, "zincCompileCore"),
|
||||
ProjectRef(zincPath, "zincCore"),
|
||||
ProjectRef(zincPath, "zincPersist"),
|
||||
) ++
|
||||
Vector(
|
||||
ProjectRef(ioPath, "io"),
|
||||
)
|
||||
}
|
||||
|
||||
def ghPagesSettings = Def settings (
|
||||
git.remoteRepo := "git@github.com:sbt/sbt.github.com.git",
|
||||
localRepoDirectory,
|
||||
|
|
@ -35,16 +98,9 @@ object Docs {
|
|||
Path.userHome / ".sbt" / "ghpages" / status / organization.value / name.value
|
||||
}
|
||||
|
||||
def siteIncludeSxr(prefix: String) = Def settings (
|
||||
mappings in sxr := Path.allSubpaths(sxr.value).toSeq,
|
||||
siteSubdirName in SxrConf := prefix,
|
||||
addMappingsToSiteDir(mappings in sxr, siteSubdirName in SxrConf)
|
||||
)
|
||||
|
||||
def synchLocalImpl = Def task {
|
||||
val repo = ghpagesUpdatedRepository.value
|
||||
val versioned = repo / version.value
|
||||
IO.delete(versioned / "sxr")
|
||||
IO.delete(versioned / "api")
|
||||
val mappings = ghpagesPrivateMappings.value
|
||||
val toCopy = for ((file, target) <- mappings if siteInclude(file))
|
||||
|
|
@ -52,5 +108,4 @@ object Docs {
|
|||
IO.copy(toCopy)
|
||||
repo
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,3 +12,7 @@ addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.14")
|
|||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
|
||||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1")
|
||||
addSbtPlugin("com.swoval" % "sbt-java-format" % "0.3.1")
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
|
||||
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1")
|
||||
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sbt -Dsbtio.path=../io -Dsbtutil.path=../util -Dsbtlm.path=../librarymanagement -Dsbtzinc.path=../zinc "$@"
|
||||
sbt -Dsbtio.path=../io -Dsbtlm.path=../librarymanagement -Dsbtzinc.path=../zinc "$@"
|
||||
|
|
|
|||
|
|
@ -13,52 +13,51 @@ import sbt.internal.FileChangesMacro
|
|||
|
||||
import scala.language.experimental.macros
|
||||
|
||||
package object sbt
|
||||
extends sbt.IOSyntax0
|
||||
with sbt.std.TaskExtra
|
||||
with sbt.internal.util.Types
|
||||
with sbt.ProjectExtra
|
||||
with sbt.librarymanagement.DependencyBuilders
|
||||
with sbt.librarymanagement.DependencyFilterExtra
|
||||
with sbt.librarymanagement.LibraryManagementSyntax
|
||||
with sbt.BuildExtra
|
||||
with sbt.TaskMacroExtra
|
||||
with sbt.ScopeFilter.Make
|
||||
with sbt.BuildSyntax
|
||||
with sbt.OptionSyntax
|
||||
with sbt.SlashSyntax
|
||||
with sbt.Import {
|
||||
// IO
|
||||
def uri(s: String): URI = new URI(s)
|
||||
def file(s: String): File = new File(s)
|
||||
def url(s: String): URL = new URL(s)
|
||||
implicit def fileToRichFile(file: File): sbt.io.RichFile = new sbt.io.RichFile(file)
|
||||
implicit def filesToFinder(cc: Traversable[File]): sbt.io.PathFinder =
|
||||
sbt.io.PathFinder.strict(cc)
|
||||
/*
|
||||
* Provides macro extension methods. Because the extension methods are all macros, no instance
|
||||
* of FileChangesMacro.TaskOps is ever made which is why it is ok to use `???`.
|
||||
*/
|
||||
implicit def taskToTaskOpts[T](t: TaskKey[T]): FileChangesMacro.TaskOps[T] = ???
|
||||
implicit val fileStampJsonFormatter: JsonFormat[Seq[(NioPath, FileStamp)]] =
|
||||
FileStamp.Formats.seqPathFileStampJsonFormatter
|
||||
implicit val pathJsonFormatter: JsonFormat[Seq[NioPath]] = FileStamp.Formats.seqPathJsonFormatter
|
||||
implicit val fileJsonFormatter: JsonFormat[Seq[File]] = FileStamp.Formats.seqFileJsonFormatter
|
||||
implicit val singlePathJsonFormatter: JsonFormat[NioPath] = FileStamp.Formats.pathJsonFormatter
|
||||
implicit val singleFileJsonFormatter: JsonFormat[File] = FileStamp.Formats.fileJsonFormatter
|
||||
// others
|
||||
// package object sbt
|
||||
// extends sbt.IOSyntax0
|
||||
// with sbt.std.TaskExtra
|
||||
// with sbt.internal.util.Types
|
||||
// with sbt.ProjectExtra
|
||||
// with sbt.librarymanagement.DependencyBuilders
|
||||
// with sbt.librarymanagement.DependencyFilterExtra
|
||||
// with sbt.librarymanagement.LibraryManagementSyntax
|
||||
// with sbt.BuildExtra
|
||||
// with sbt.TaskMacroExtra
|
||||
// with sbt.ScopeFilter.Make
|
||||
// with sbt.BuildSyntax
|
||||
// with sbt.OptionSyntax
|
||||
// with sbt.SlashSyntax
|
||||
// with sbt.Import {
|
||||
// // IO
|
||||
// def uri(s: String): URI = new URI(s)
|
||||
// def file(s: String): File = new File(s)
|
||||
// def url(s: String): URL = new URL(s)
|
||||
// implicit def fileToRichFile(file: File): sbt.io.RichFile = new sbt.io.RichFile(file)
|
||||
// implicit def filesToFinder(cc: Traversable[File]): sbt.io.PathFinder =
|
||||
// sbt.io.PathFinder.strict(cc)
|
||||
// /*
|
||||
// * Provides macro extension methods. Because the extension methods are all macros, no instance
|
||||
// * of FileChangesMacro.TaskOps is ever made which is why it is ok to use `???`.
|
||||
// */
|
||||
// implicit def taskToTaskOpts[T](t: TaskKey[T]): FileChangesMacro.TaskOps[T] = ???
|
||||
// implicit val fileStampJsonFormatter: JsonFormat[Seq[(NioPath, FileStamp)]] =
|
||||
// FileStamp.Formats.seqPathFileStampJsonFormatter
|
||||
// implicit val pathJsonFormatter: JsonFormat[Seq[NioPath]] = FileStamp.Formats.seqPathJsonFormatter
|
||||
// implicit val fileJsonFormatter: JsonFormat[Seq[File]] = FileStamp.Formats.seqFileJsonFormatter
|
||||
// implicit val singlePathJsonFormatter: JsonFormat[NioPath] = FileStamp.Formats.pathJsonFormatter
|
||||
// implicit val singleFileJsonFormatter: JsonFormat[File] = FileStamp.Formats.fileJsonFormatter
|
||||
// others
|
||||
// object CompileOrder {
|
||||
// val JavaThenScala = xsbti.compile.CompileOrder.JavaThenScala
|
||||
// val ScalaThenJava = xsbti.compile.CompileOrder.ScalaThenJava
|
||||
// val Mixed = xsbti.compile.CompileOrder.Mixed
|
||||
// }
|
||||
// type CompileOrder = xsbti.compile.CompileOrder
|
||||
|
||||
object CompileOrder {
|
||||
val JavaThenScala = xsbti.compile.CompileOrder.JavaThenScala
|
||||
val ScalaThenJava = xsbti.compile.CompileOrder.ScalaThenJava
|
||||
val Mixed = xsbti.compile.CompileOrder.Mixed
|
||||
}
|
||||
type CompileOrder = xsbti.compile.CompileOrder
|
||||
// final val ThisScope = Scope.ThisScope
|
||||
// final val Global = Scope.Global
|
||||
// final val GlobalScope = Scope.GlobalScope
|
||||
|
||||
final val ThisScope = Scope.ThisScope
|
||||
final val Global = Scope.Global
|
||||
final val GlobalScope = Scope.GlobalScope
|
||||
|
||||
def config(name: String): Configuration =
|
||||
macro sbt.librarymanagement.ConfigurationMacro.configMacroImpl
|
||||
}
|
||||
// def config(name: String): Configuration =
|
||||
// macro sbt.librarymanagement.ConfigurationMacro.configMacroImpl
|
||||
// }
|
||||
|
|
|
|||
Loading…
Reference in New Issue