File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -32,3 +32,39 @@ Lastly, you can also add simple JAR files as dependencies with `--jar`:
32
32
``` bash
33
33
scala-cli compile Hello.scala --jar /path/to/library.jar
34
34
```
35
+
36
+ ## Update dependencies
37
+
38
+ To check if dependencies in using directives are up to date use ` dependency-update ` command:
39
+
40
+ ``` scala title=Hello.scala
41
+ //> using lib " com.lihaoyi::os-lib:0.7.8"
42
+ //> using lib " com.lihaoyi::utest:0.7.10"
43
+ import $ivy .`com.lihaoyi::geny:0.6.5`
44
+ import $dep .`com.lihaoyi::pprint:0.6.6`
45
+
46
+ object Hello extends App {
47
+ println(" Hello World" )
48
+ }
49
+ ```
50
+
51
+ ``` bash
52
+ scala-cli dependency-update Hello.scala
53
+ # Updates
54
+ # * com.lihaoyi::os-lib:0.7.8 -> 0.8.1
55
+ # * com.lihaoyi::utest:0.7.10 -> 0.8.0
56
+ # * com.lihaoyi::geny:0.6.5 -> 0.7.1
57
+ # * com.lihaoyi::pprint:0.6.6 -> 0.7.3
58
+ # To update all dependencies run:
59
+ # scala-cli dependency-update --all
60
+ ```
61
+
62
+ Passing ` --all ` to the ` dependency-update ` sub-command updates all dependencies in your sources.
63
+
64
+ ``` bash
65
+ scala-cli dependency-update Hello.scala --all
66
+ # Updated dependency to: com.lihaoyi::os-lib:0.8.1
67
+ # Updated dependency to: com.lihaoyi::utest:0.8.0
68
+ # Updated dependency to: com.lihaoyi::geny:0.7.1
69
+ # Updated dependency to: com.lihaoyi::pprint:0.7.3
70
+ ```
You can’t perform that action at this time.
0 commit comments