Skip to content

Commit

Permalink
Upgrade clikt and mention CLI in the readme (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolberg authored Oct 3, 2024
1 parent 7bfd587 commit 94343ae
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ runtime dependencies that they reference.

The platform APIs can be specified by the JVM, a set of dependencies, or serialized type descriptors.

## Basic setup
## Basic Gradle setup

The most convenient way to run this tool is via the provided Gradle plugin.
The preferred mechanism to run Expediter is the provided Gradle plugin.

```kotlin
plugins {
Expand Down Expand Up @@ -300,3 +300,16 @@ expediter {

The output of the `jvm` check will be written into `build/expediter-jvm.json`, and the output of the
`android` check will be written into `build/expediter-android.json`.

## CLI

Expediter ships a simple CLI packaged as an uberjar.

```
java -jar cli-<version>-all.jar \
--project-classes=classes/ \
--libraries=lib/lib1.jar \
--libraries=lib/lib2.jar \
--jvm-platform=17 \
--output=expediter.json
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.toasttab.expediter.cli

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.main
import com.github.ajalt.clikt.parameters.options.default
import com.github.ajalt.clikt.parameters.options.multiple
import com.github.ajalt.clikt.parameters.options.option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package com.toasttab.expediter.cli

import com.github.ajalt.clikt.core.main
import com.toasttab.expediter.issue.Issue
import com.toasttab.expediter.issue.IssueReport
import com.toasttab.expediter.types.MemberAccess
Expand Down Expand Up @@ -42,7 +43,7 @@ class ExpediterCliCommandIntegrationTest {
} + listOf(
"--project-classes", System.getProperty("classes"),
"--output", output.toString(),
"--jvm-platform", "11"
"--jvm-platform", "8"
)
)

Expand All @@ -51,9 +52,16 @@ class ExpediterCliCommandIntegrationTest {
}

expectThat(report.issues).contains(
Issue.MissingType(
caller = "com/github/ajalt/mordant/internal/nativeimage/WinKernel32Lib",
target = "org/graalvm/word/PointerBase"
Issue.MissingMember(
caller = "com/toasttab/expediter/provider/PlatformClassloaderTypeProvider",
member = MemberAccess.MethodAccess(
"java/lang/ClassLoader",
ref = MemberSymbolicReference(
"getPlatformClassLoader",
"()Ljava/lang/ClassLoader;"
),
accessType = MethodAccessType.STATIC
)
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kotlin = "2.0.20"
serialization = "1.7.3"
asm = "9.7"
clikt = "4.4.0"
clikt = "5.0.0"

nexus = "1.3.0"
ktlint = "0.50.0"
Expand Down

0 comments on commit 94343ae

Please # to comment.