Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade clikt and mention CLI in the readme #120

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading