https://github.com/thoughtworksinc/sbt-api-mappings
An Sbt plugin that fills apiMappings for common Scala libraries.
https://github.com/thoughtworksinc/sbt-api-mappings
sbt-plugin scaladoc
Last synced: about 1 year ago
JSON representation
An Sbt plugin that fills apiMappings for common Scala libraries.
- Host: GitHub
- URL: https://github.com/thoughtworksinc/sbt-api-mappings
- Owner: ThoughtWorksInc
- License: apache-2.0
- Created: 2015-07-10T16:28:55.000Z (almost 11 years ago)
- Default Branch: 3.0.x
- Last Pushed: 2024-06-25T04:38:12.000Z (almost 2 years ago)
- Last Synced: 2025-03-27T15:47:40.284Z (about 1 year ago)
- Topics: sbt-plugin, scaladoc
- Language: Scala
- Homepage:
- Size: 295 KB
- Stars: 91
- Watchers: 31
- Forks: 17
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sbt-api-mappings
[](https://travis-ci.org/ThoughtWorksInc/sbt-api-mappings)
**sbt-api-mappings** is a sbt plugin that fills `apiMappings` for common Scala libraries.
## Motivation
Sometimes when you wrote ScalaDoc for your own classes, you may want to reference to documentation in some other libraries.
For example:
``` scala
/**
* My own class, which works with [[scala.Option]] and [[scalaz.Monad]].
*/
class MyClass(optionMonad: scalaz.Monad[Option])
```
Unfortunately when running `doc` command in Sbt, you will receive a warning and the link would not be created.
```
/path/to/MyClass.scala:3: Could not find any member to link for "scala.Option".
```
This plugin resolves the problem.
## Usage
### Step 1: Add the following lines in your `project/plugins.sbt`:
``` sbt
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "latest.release")
```
Note that sbt-api-mappings 1.x requires sbt 0.13.x, sbt-api-mappings 2.x requires sbt 1.x.
### Step 2: Reload the Sbt configuration:
```
> reload
```
### Step 3: Generate your API documentation:
```
> doc
```
Now, open the API documentation in your browser, and you will find the links to the `scala.Option` and `scalaz.Monad`'s documentation in your `MyClass` page.