Skip to content

Example for Gradle #32

@angusholder

Description

@angusholder

I was trying to use this with Gradle, so added a dependency like I typically would:

implementation("com.ngrok:ngrok-java-native:0.4.0")

This appeared to work correctly, however when I started the program, I got an obscure NullPointerException, which turned out to be because the ngrok_java.dll file was missing. I eventually worked out that I was missing a "classifier", like so:

implementation("com.ngrok:ngrok-java-native:0.4.0:windows-x86_64")

and this solved it. Maybe you could add a Gradle example to the README too?

I also have a question: how can I make a program that supports multiple platforms? ie: a single .jar file containing the native binaries for multiple platforms. I tried listing multiple classifiers like this

implementation("com.ngrok:ngrok-java-native:0.4.0:windows-x86_64")
implementation("com.ngrok:ngrok-java-native:0.4.0:linux-android-aarch_64")

but it gives a compile error due to duplicate classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions