Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kitlangton/scala-update
Update your Scala dependencies interactively
https://github.com/kitlangton/scala-update
Last synced: 2 months ago
JSON representation
Update your Scala dependencies interactively
- Host: GitHub
- URL: https://github.com/kitlangton/scala-update
- Owner: kitlangton
- License: apache-2.0
- Created: 2022-06-27T00:32:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T13:20:33.000Z (9 months ago)
- Last Synced: 2024-10-11T08:44:46.007Z (3 months ago)
- Language: Scala
- Homepage:
- Size: 1.09 MB
- Stars: 133
- Watchers: 8
- Forks: 18
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scala-update
[![Release Artifacts][Badge-SonatypeReleases]][Link-SonatypeReleases]Update your Scala dependencies (both libraries and plugins) interactively. [Video Demo](https://twitter.com/kitlangton/status/1541417514823028740).
## Installation
### Homebrew (Mac Only)
```shell
brew install kitlangton/tap/scala-update
```*If you'd like slightly faster binaries on an M1 mac, install manually with GraalVM (the next step).*
### Manually with GraalVM
#### Prerequisites
You need GraalVM installed. If you don't have it, you may check their docs [here](https://www.graalvm.org/java/quickstart/). If you're using SDKMAN!, GraalVM images are available to install easily [here](https://sdkman.io/jdks#grl).
```shell
# See Java versions and pick a GraalVM version, for example 22.1.0.r17-grl
sdk list javasdk install java 22.1.0.r17-grl
# If you haven't set grl version as default, set it for the current terminal session
sdk use java 22.1.0.r17-grl
```You need `native-image` installed. You can install it with GraalVM updater.
```shell
gu install native-image
```#### Building Native Image with GraalVM
1. Build the native image with `show graalvm-native-image:packageBin`.
```shell
sbt 'show graalvm-native-image:packageBin'
# [info] ~/code/sbt-interactive-update/target/graalvm-native-image/scala-update
```2. Move the generated binary onto your `PATH`. For example (in project root directory)
```shell
# Might need to run with sudo
cp target/graalvm-native-image/scala-update /usr/local/bin
```## Usage
Run the command from within an sbt project folder.
```shell
scala-update
```The commands are displayed at the bottom of the interactive output.
Select the libraries you wish to update, then hit `Enter` to update your build files to the selected versions.
### Grouped Depenendcies
If multiple dependencies share a single version, they will be grouped.
### Multiple Versions
If a dependency has multiple possible update version—for instance, a new major version and a new minor version—then you can select which version to upgrade to.
## FAQ
### How did you make the interactive CLI?
I have another library, [zio-tui](https://github.com/kitlangton/zio-tui), for creating interactive command line programs just like this one.
[Badge-SonatypeReleases]: https://img.shields.io/nexus/r/https/oss.sonatype.org/io.github.kitlangton/scala-update_2.13.svg "Sonatype Releases"
[Badge-SonatypeSnapshots]: https://img.shields.io/nexus/s/https/oss.sonatype.org/io.github.kitlangton/scala-update_2.13.svg "Sonatype Snapshots"
[Link-SonatypeSnapshots]: https://oss.sonatype.org/content/repositories/snapshots/io/github/kitlangton/scala-update_2.13/ "Sonatype Snapshots"
[Link-SonatypeReleases]: https://oss.sonatype.org/content/repositories/releases/io/github/kitlangton/scala-update_2.13/ "Sonatype Releases"