I'm new to Gradle and finding the documentation confusing.
I've downloaded the Jaunt webscraping API, however I can't seem to add it to my project. When downloaded, Jaunt is a folder that contains the jauntx.x.x.jar file inside it as a root for the library. In a normal IntelliJ project, I would simply add a reference to that .jar file.
However, I'm using Gradle as this project requires being built into an executable jar
I need to add the Jaunt library to the project but if I do it the normal way my project recognises the library while I'm developing it but as soon as I try to run it, it tells me that the com.jaunt package is not found.
I assume that it needs to be added to the build.gradle file, however I'm not sure how.
Can anyone advise?
Build.gradle as follows:
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}
repositories {
mavenCentral()
}
dependencies {
implementation files("libs/jaunt1.6.0.jar")
}
javafx {
version = "14"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
jar {
manifest {
attributes 'Main-Class': 'org.openjfx.Main'
attributes 'Class-Path': 'org/openjfx/ '
}
}
application {
mainClassName = 'org.openjfx.Main'
}