Skip to content

Commit af87206

Browse files
committed
Add missing reference docs for *.dep directives
1 parent dbcad25 commit af87206

File tree

3 files changed

+56
-4
lines changed

3 files changed

+56
-4
lines changed

modules/directives/src/main/scala/scala/build/preprocessing/directives/Dependency.scala

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,35 @@ import scala.build.preprocessing.directives.DirectiveUtil.*
1919
import scala.cli.commands.SpecificationLevel
2020

2121
@DirectiveExamples("//> using dep com.lihaoyi::os-lib:0.9.1")
22+
@DirectiveExamples(
23+
"//> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar"
24+
)
2225
@DirectiveExamples("//> using test.dep org.scalatest::scalatest:3.2.10")
2326
@DirectiveExamples("//> using test.dep org.scalameta::munit:0.7.29")
2427
@DirectiveExamples(
2528
"//> using compileOnly.dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.23.2"
2629
)
2730
@DirectiveExamples(
28-
"//> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar"
31+
"//> using scalafix.dep com.github.xuwei-k::scalafix-rules:0.5.1"
2932
)
3033
@DirectiveUsage(
3134
"//> using dep org:name:ver | //> using deps org:name:ver org2:name2:ver2",
32-
"`//> using dep` _org_`:`name`:`ver"
35+
"""`//> using dep` _org_`:`name`:`ver
36+
|`//> using deps` _org_`:`name`:`ver _org_`:`name`:`ver
37+
|`//> using dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
38+
|
39+
|`//> using test.dep` _org_`:`name`:`ver
40+
|`//> using test.deps` _org_`:`name`:`ver _org_`:`name`:`ver
41+
|`//> using test.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
42+
|
43+
|`//> using compileOnly.dep` _org_`:`name`:`ver
44+
|`//> using compileOnly.deps` _org_`:`name`:`ver _org_`:`name`:`ver
45+
|`//> using compileOnly.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
46+
|
47+
|`//> using scalafix.dep` _org_`:`name`:`ver
48+
|`//> using scalafix.deps` _org_`:`name`:`ver _org_`:`name`:`ver
49+
|`//> using scalafix.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
50+
|""".stripMargin
3351
)
3452
@DirectiveDescription("Add dependencies")
3553
@DirectiveLevel(SpecificationLevel.MUST)

website/docs/reference/directives.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,34 @@ Manually add sources to the project. Does not support chaining, sources are adde
9999
Add dependencies
100100

101101
`//> using dep` _org_`:`name`:`ver
102+
`//> using deps` _org_`:`name`:`ver _org_`:`name`:`ver
103+
`//> using dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
104+
105+
`//> using test.dep` _org_`:`name`:`ver
106+
`//> using test.deps` _org_`:`name`:`ver _org_`:`name`:`ver
107+
`//> using test.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
108+
109+
`//> using compileOnly.dep` _org_`:`name`:`ver
110+
`//> using compileOnly.deps` _org_`:`name`:`ver _org_`:`name`:`ver
111+
`//> using compileOnly.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
112+
113+
`//> using scalafix.dep` _org_`:`name`:`ver
114+
`//> using scalafix.deps` _org_`:`name`:`ver _org_`:`name`:`ver
115+
`//> using scalafix.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
116+
102117

103118
#### Examples
104119
`//> using dep com.lihaoyi::os-lib:0.9.1`
105120

121+
`//> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar`
122+
106123
`//> using test.dep org.scalatest::scalatest:3.2.10`
107124

108125
`//> using test.dep org.scalameta::munit:0.7.29`
109126

110127
`//> using compileOnly.dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.23.2`
111128

112-
`//> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar`
129+
`//> using scalafix.dep com.github.xuwei-k::scalafix-rules:0.5.1`
113130

114131
### Exclude sources
115132

website/docs/reference/scala-command/directives.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,34 @@ Adds compiler plugins
4040
Add dependencies
4141

4242
`//> using dep` _org_`:`name`:`ver
43+
`//> using deps` _org_`:`name`:`ver _org_`:`name`:`ver
44+
`//> using dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
45+
46+
`//> using test.dep` _org_`:`name`:`ver
47+
`//> using test.deps` _org_`:`name`:`ver _org_`:`name`:`ver
48+
`//> using test.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
49+
50+
`//> using compileOnly.dep` _org_`:`name`:`ver
51+
`//> using compileOnly.deps` _org_`:`name`:`ver _org_`:`name`:`ver
52+
`//> using compileOnly.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
53+
54+
`//> using scalafix.dep` _org_`:`name`:`ver
55+
`//> using scalafix.deps` _org_`:`name`:`ver _org_`:`name`:`ver
56+
`//> using scalafix.dependencies` _org_`:`name`:`ver _org_`:`name`:`ver
57+
4358

4459
#### Examples
4560
`//> using dep com.lihaoyi::os-lib:0.9.1`
4661

62+
`//> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar`
63+
4764
`//> using test.dep org.scalatest::scalatest:3.2.10`
4865

4966
`//> using test.dep org.scalameta::munit:0.7.29`
5067

5168
`//> using compileOnly.dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.23.2`
5269

53-
`//> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar`
70+
`//> using scalafix.dep com.github.xuwei-k::scalafix-rules:0.5.1`
5471

5572
### Java options
5673

0 commit comments

Comments
 (0)