mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
SBT: add support for unified docs (#284)
Unified documentation can be generated with the sbt unidoc command.
This commit is contained in:
parent
88f4ef293b
commit
33e4f2b35e
|
|
@ -1,4 +1,4 @@
|
||||||
# PlanetSide Login Server [](https://travis-ci.org/psforever/PSF-LoginServer) [](https://codecov.io/gh/psforever/PSF-LoginServer/)
|
# PlanetSide Login Server [](https://travis-ci.org/psforever/PSF-LoginServer) [](https://codecov.io/gh/psforever/PSF-LoginServer/) [](https://psforever.github.io/docs/master/index.html)
|
||||||
This project contains the code to run and manage the login and world server roles for PlanetSide 1.
|
This project contains the code to run and manage the login and world server roles for PlanetSide 1.
|
||||||
The login server and world server are currently combined for ease of contributing.
|
The login server and world server are currently combined for ease of contributing.
|
||||||
|
|
||||||
|
|
@ -53,6 +53,11 @@ sbt pslogin/run
|
||||||
```
|
```
|
||||||
This will clone the repository and SBT will compile and run the login server. Note: SBT is quite slow at starting up. It's recommended you have an open SBT console in order to avoid this startup time.
|
This will clone the repository and SBT will compile and run the login server. Note: SBT is quite slow at starting up. It's recommended you have an open SBT console in order to avoid this startup time.
|
||||||
|
|
||||||
|
### Generating Documentation
|
||||||
|
Using SBT, you can generate documentation for both the common and pslogin projects using `sbt unidoc`.
|
||||||
|
|
||||||
|
Current documentation is available at [https://psforever.github.io/docs/master/index.html](https://psforever.github.io/docs/master/index.html)
|
||||||
|
|
||||||
## Running the Server
|
## Running the Server
|
||||||
|
|
||||||
To run a headless, non-interactive server, run
|
To run a headless, non-interactive server, run
|
||||||
|
|
|
||||||
15
build.sbt
15
build.sbt
|
|
@ -3,6 +3,20 @@ lazy val commonSettings = Seq(
|
||||||
version := "1.0.2-SNAPSHOT",
|
version := "1.0.2-SNAPSHOT",
|
||||||
scalaVersion := "2.11.8",
|
scalaVersion := "2.11.8",
|
||||||
scalacOptions := Seq("-unchecked", "-feature", "-deprecation", "-encoding", "utf8", "-language:postfixOps"),
|
scalacOptions := Seq("-unchecked", "-feature", "-deprecation", "-encoding", "utf8", "-language:postfixOps"),
|
||||||
|
// scaladoc flags: https://github.com/scala/scala/blob/2.11.x/src/scaladoc/scala/tools/nsc/doc/Settings.scala
|
||||||
|
// Trick taken from https://groups.google.com/d/msg/scala-user/mxV9ok7J_Eg/kt-LnsrD0bkJ
|
||||||
|
scalacOptions in (Compile,doc) <<= baseDirectory map {
|
||||||
|
bd => Seq(
|
||||||
|
"-groups",
|
||||||
|
"-implicits",
|
||||||
|
"-doc-title", "PSF-LoginServer - ",
|
||||||
|
"-doc-version", "master",
|
||||||
|
"-doc-footer", "Copyright PSForever",
|
||||||
|
// For non unidoc builds, you may need bd.getName before the template parameter
|
||||||
|
"-doc-source-url", "https://github.com/psforever/PSF-LoginServer/blob/master/€{FILE_PATH}.scala",
|
||||||
|
"-sourcepath", bd.getAbsolutePath // needed for scaladoc relative source paths
|
||||||
|
)
|
||||||
|
},
|
||||||
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
|
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"com.typesafe.akka" %% "akka-actor" % "2.4.4",
|
"com.typesafe.akka" %% "akka-actor" % "2.4.4",
|
||||||
|
|
@ -40,6 +54,7 @@ lazy val psloginPackSettings = packAutoSettings ++ Seq(
|
||||||
|
|
||||||
lazy val root = (project in file(".")).
|
lazy val root = (project in file(".")).
|
||||||
settings(commonSettings: _*).
|
settings(commonSettings: _*).
|
||||||
|
enablePlugins(ScalaUnidocPlugin).
|
||||||
settings(psloginPackSettings: _*).
|
settings(psloginPackSettings: _*).
|
||||||
aggregate(pslogin, common)
|
aggregate(pslogin, common)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,5 @@ logLevel := Level.Warn
|
||||||
|
|
||||||
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.7.9")
|
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.7.9")
|
||||||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")
|
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")
|
||||||
|
// https://github.com/sbt/sbt-unidoc
|
||||||
|
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue