Skip to content

Commit

Permalink
Merge pull request #565 from jiminhsieh/ticket/#555
Browse files Browse the repository at this point in the history
Fix broken links of build-in keys in docs (#555)
  • Loading branch information
dwijnand authored Dec 16, 2017
2 parents c825275 + 9d62369 commit 9d23525
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/reference/00-Getting-Started/05-Basic-Def.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ There are three flavors of key:
#### Built-in Keys

The built-in keys are just fields in an object called
[Keys](../sxr/sbt/Keys.scala.html). A `build.sbt` implicitly has an
[Keys](../api/sbt/Keys\$.html). A `build.sbt` implicitly has an
`import sbt.Keys._`, so `sbt.Keys.name` can be referred to as `name`.

#### Custom Keys
Expand Down
4 changes: 2 additions & 2 deletions src/reference/00-Getting-Started/06-Task-Graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ another task or setting. The value method is special and may only be
called in the argument to `:=` (or, `+=` or `++=`, which we'll see later).

As a first example, consider defining the `scalacOption` that depends on
`update` and `clean` tasks. Here are the definitions of these keys (from [Keys](../sxr/sbt/Keys.scala.html)).
`update` and `clean` tasks. Here are the definitions of these keys (from [Keys](../api/sbt/Keys\$.html)).

**Note**: The values calculated below are nonsensical for `scalaOptions`,
and it's just for demonstration purpose only:
Expand Down Expand Up @@ -277,7 +277,7 @@ Here's how it should look on the sbt shell:
[success] Total time: 0 s, completed Jan 2, 2017 11:44:51 PM
```

Next, take these two keys (from [Keys](../sxr/sbt/Keys.scala.html)):
Next, take these two keys (from [Keys](../api/sbt/Keys\$.html)):

```scala
val scalacOptions = taskKey[Seq[String]]("Options for the Scala compiler.")
Expand Down
4 changes: 2 additions & 2 deletions src/reference/00-Getting-Started/08-Library-Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ libraryDependencies += groupID % artifactID % revision % configuration
```

`libraryDependencies` is declared in
[Keys](../sxr/sbt/Keys.scala.html#sbt.Keys.libraryDependencies) like
[Keys](../api/sbt/Keys\$.html#libraryDependencies:sbt.SettingKey[Seq[sbt.librarymanagement.ModuleID]]) like
this:

```scala
Expand Down Expand Up @@ -195,7 +195,7 @@ resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repos
```

The `resolvers` key is defined in
[Keys](../sxr/sbt/Keys.scala.html#sbt.Keys.resolvers) like this:
[Keys](../api/sbt/Keys\$.html#resolvers:sbt.SettingKey[Seq[sbt.librarymanagement.Resolver]]) like this:

```scala
val resolvers = settingKey[Seq[Resolver]]("The user-defined additional resolvers for automatically managed dependencies.")
Expand Down
4 changes: 2 additions & 2 deletions src/reference/00-Getting-Started/11-Custom-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Getting Started Guide, especially [build.sbt][Basic-Def] and

### Defining a key

[Keys](../sxr/sbt/Keys.scala.html) is packed with examples
[Keys](../api/sbt/Keys\$.html) is packed with examples
illustrating how to define keys. Most of the keys are implemented in
[Defaults](../sxr/sbt/Defaults.scala.html).

Keys have one of three types. `SettingKey` and `TaskKey` are described in
[.sbt build definition][Basic-Def]. Read about `InputKey` on the
[Input Tasks][Input-Tasks] page.

Some examples from [Keys](../sxr/sbt/Keys.scala.html):
Some examples from [Keys](../api/sbt/Keys\$.html):

```scala
val scalaVersion = settingKey[String]("The version of Scala used for building.")
Expand Down
2 changes: 1 addition & 1 deletion src/reference/es/00-Getting-Started/05-Basic-Def.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Existen tres tipos de llaves:
#### Built-in Keys (Llaves ya incluídas)

Las llaves ya incluídas son simplemente campos de un objeto llamado
[Keys](../sxr/sbt/Keys.scala.html). Un archivo `build.sbt` tiene
[Keys](../api/sbt/Keys\$.html). Un archivo `build.sbt` tiene
implícitamente un `import sbt.Keys._`, de modo que `sbt.Keys.name` puede
ser referido como `name`.

Expand Down
2 changes: 1 addition & 1 deletion src/reference/ja/00-Getting-Started/05-Basic-Def.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
out: Basic-Def.html
---

[Keys]: ../../sxr/sbt/Keys.scala.html
[Keys]: ../../api/sbt/Keys\$.html
[Task-Graph]: Task-Graph.html
[Bare-Def]: Bare-Def.html
[Full-Def]: Full-Def.html
Expand Down
4 changes: 2 additions & 2 deletions src/reference/ja/00-Getting-Started/06-Task-Graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ out: Task-Graph.html

最初の例として、`update``clean` というタスクに依存した形で
`scalacOption` を定義したいとする。
[Keys](../sxr/sbt/Keys.scala.html) より)以下の二つのキーを例に説明する。
[Keys](../api/sbt/Keys\$.html) より)以下の二つのキーを例に説明する。

**注意**: ここで計算される `scalacOptions` の値はナンセンスなもので、説明のためだけのものだ:

Expand Down Expand Up @@ -267,7 +267,7 @@ sbt シェルで試すとこうなるはずだ:
[success] Total time: 0 s, completed Jan 2, 2017 11:44:51 PM
```

次に ([Keys](../sxr/sbt/Keys.scala.html) より) 以下の二つのキーを例に説明する:
次に ([Keys](../api/sbt/Keys\$.html) より) 以下の二つのキーを例に説明する:

```scala
val scalacOptions = taskKey[Seq[String]]("Options for the Scala compiler.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
out: Library-Dependencies.html
---

[Keys]: ../../sxr/sbt/Keys.scala.html
[Keys]: ../../api/sbt/Keys\$.html
[Apache Ivy]: https://ant.apache.org/ivy/
[Ivy revisions]: https://ant.apache.org/ivy/history/2.3.0-rc1/ivyfile/dependency.html#revision
[Extra attributes]: https://ant.apache.org/ivy/history/2.3.0-rc1/concept.html#extra
Expand Down
2 changes: 1 addition & 1 deletion src/reference/ja/00-Getting-Started/11-Custom-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ out: Custom-Settings.html
[Input-Tasks]: ../../docs/Input-Tasks.html
[Plugins]: ../../docs/Plugins.html
[Tasks]: ../../docs/Tasks.html
[Keys]: ../../sxr/sbt/Keys.scala.html
[Keys]: ../../api/sbt/Keys\$.html
[Defaults]: ../../sxr/sbt/Defaults.scala.html
[Scaladocs-IO]: ../api/sbt/io/IO\$.html

Expand Down
2 changes: 1 addition & 1 deletion src/reference/zh-cn/00-Getting-Started/05-Basic-Def.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ lazy val root = (project in file("."))

#### 内置的 Keys

内置的 keys 实际上是对象 [Keys](../../sxr/sbt/Keys.scala.html) 的字段。`build.sbt` 会隐式包含 `import sbt.Keys._`,所以可以通过 `name` 取到 `sbt.Keys.name`
内置的 keys 实际上是对象 [Keys](../../api/sbt/Keys\$.html) 的字段。`build.sbt` 会隐式包含 `import sbt.Keys._`,所以可以通过 `name` 取到 `sbt.Keys.name`

#### 自定义 Keys

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ sourceGenerators in Compile += Def.task {
[.sbt 构建定义][Basic-Def] 中提到过,当你通过 `:=` 或其他方法创建一个设置时,task key 创建的是 `Setting[Task[T]]` 而不是 `Setting[T]`
Setting 可以是 Task 的输入,但 Task 不能是 Setting 的输入。

以这两个 key 为例(从 [Keys](../../sxr/sbt/Keys.scala.html) 中):
以这两个 key 为例(从 [Keys](../../api/sbt/Keys\$.html) 中):

```scala
val scalacOptions = taskKey[Seq[String]]("Options for the Scala compiler.")
Expand Down Expand Up @@ -152,4 +152,4 @@ checksums := scalacOptions.value

```scala
cleanFiles += file("coverage-report-" + name.value + ".txt")
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ libraryDependencies += groupID % artifactID % revision
libraryDependencies += groupID % artifactID % revision % configuration
```

`libraryDependencies`[Keys](../../sxr/sbt/Keys.scala.html#sbt.Keys.libraryDependencies) 中像这样声明:
`libraryDependencies`[Keys](../../api/sbt/Keys\$.html#libraryDependencies:sbt.SettingKey[Seq[sbt.librarymanagement.ModuleID]]) 中像这样声明:

```scala
val libraryDependencies = settingKey[Seq[ModuleID]]("Declares managed dependencies.")
Expand Down Expand Up @@ -142,7 +142,7 @@ resolvers += name at location
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
```

`resolvers` key 在 [Keys](../../sxr/sbt/Keys.scala.html#sbt.Keys.resolvers) 中像这样定义:
`resolvers` key 在 [Keys](../../api/sbt/Keys\$.html#resolvers:sbt.SettingKey[Seq[sbt.librarymanagement.Resolver]]) 中像这样定义:

```scala
val resolvers = settingKey[Seq[Resolver]]("用户为托管依赖定义的额外的解析器。")
Expand Down
4 changes: 2 additions & 2 deletions src/reference/zh-cn/00-Getting-Started/11-Custom-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ out: Custom-Settings.html

### 定义一个键

[这里](../../sxr/sbt/Keys.scala.html)介绍了如何定义键。大多数的默认键定义在[这里](../../sxr/sbt/Defaults.scala.html)
[这里](../../api/sbt/Keys\$.html)介绍了如何定义键。大多数的默认键定义在[这里](../../sxr/sbt/Defaults.scala.html)

键有三种类型。`SettingKey``TaskKey`[.sbt 构建定义][Basic-Def]讲解。关于 `InputKey` 的内容在[输入任务][Input-Tasks]页面。

列举一些来自 [Keys](../../sxr/sbt/Keys.scala.html) 的例子:
列举一些来自 [Keys](../../api/sbt/Keys\$.html) 的例子:

```scala
val scalaVersion = settingKey[String]("scala的版本")
Expand Down

0 comments on commit 9d23525

Please sign in to comment.