petr-panteleyev / jpackage-gradle-plugin

JPackage Gradle Plugin
https://codeberg.org/petr-panteleyev/jpackage-gradle-plugin
BSD 2-Clause "Simplified" License
97 stars 13 forks source link

How to install jpackage-gradle-plugin? #15

Closed HiranChaudhuri closed 2 years ago

HiranChaudhuri commented 2 years ago

I am not yet familiar with gradle but trying to add JPackage steps into an existing gradle-built project. By adding lines such as in https://github.com/petr-panteleyev/jpackage-gradle-plugin/blob/master/doc/examples/Non-ModularApplication.md I am getting this error:

$ ./gradlew jpackage
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3.3/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 
WARNING: Android is disabled.
To enable Android build, download the Android SDK. Then create a file local.properties with the following content:
    sdk.dir=<path to sdk>

FAILURE: Build failed with an exception.

* Where:
Build file '.../build.gradle' line: 203

* What went wrong:
A problem occurred evaluating root project 'settlers-remake'.
> Could not find method jpackage() for arguments [build_ftdkn45pscfmpxvak3ur56n0$_run_closure14@3ed882eb] on task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
2 actionable tasks: 2 up-to-date
$

So now I am wondering why my gradle installation should find your gradle plugin. Something is still missing, isn't it?

petr-panteleyev commented 2 years ago

Did you add this plugin to your build? https://plugins.gradle.org/plugin/org.panteleyev.jpackageplugin

Closing the issue cause it's not the plugin bug.

HiranChaudhuri commented 2 years ago

While I agree it is not a plugin bug, would it be worth adding a line or two to the documentation you created? It is not obvious that this plugin has made it's way to the gradle plugins site, and on https://plugins.gradle.org/plugin/org.panteleyev.jpackageplugin you can read how to add the plugin but not how to use it.

petr-panteleyev commented 2 years ago

Plugin portal gives an information how to import plugin. Plugin docs show how to use it. I don't plan on describing gradle basics while there are tons of docs on gradle site. Besides I would need to cover both Kotlin and Groovy and I don't really care about Groovy DSL at all.