Skip to content

Commit

Permalink
Port CLI readme (#1031)
Browse files Browse the repository at this point in the history
<!--
  ⬆ Put your description above this! ⬆

  Please be descriptive and detailed.
  
Please read our [Contributing
Guidelines](https://github.com/tinyspeck/foundry/blob/main/.github/CONTRIBUTING.md)
and [Code of Conduct](https://slackhq.github.io/code-of-conduct).

Don't worry about deleting this, it's not visible in the PR!
-->
  • Loading branch information
ZacSweers authored Oct 14, 2024
1 parent 2c3409e commit 085bebe
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tools/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Foundry CLIs

An artifact containing basic CLI utilities for Kotlin.

## Installation

[![Maven Central](https://img.shields.io/maven-central/v/com.slack.foundry/cli.svg)](https://mvnrepository.com/artifact/com.slack.foundry/cli)
```kotlin
// In Gradle
dependencies {
implementation("com.slack.foundry:cli:<version>")
}

// In kotlin script
@file:DependsOn("com.slack.foundry:cli:{version}")
```

## Local testing

If consuming these utilities from a kotlin script file, you can test changes like so:

1. Set the version in `gradle.properties`, such as `2.5.0-LOCAL1`.
2. Run `./gradlew publishToMavenLocal` to publish the current version to your local maven repository.
3. In your script file, add the local repository and update the version:
```kotlin
@file:Repository("file:///Users/{username}/.m2/repository")
@file:DependsOn("com.slack.foundry:cli:{version you set in gradle.properties}")
```
4. Repeat as needed while testing, incrementing the version number each time to avoid caching issues.

0 comments on commit 085bebe

Please sign in to comment.