dlsc-software-consulting-gmbh / PreferencesFX

A framework for easily creating a UI for application settings / preferences.
Apache License 2.0
585 stars 67 forks source link

Module gson not found #455

Open conradbekondo opened 8 months ago

conradbekondo commented 8 months ago

I'm trying to use this library, but when I run the application, I get this error

image

Meanwhile my module-info.java looks like this

image

I have my build.gradle file look like this

plugins {
    id 'java'
    id 'application'
    id 'org.javamodularity.moduleplugin' version '1.8.12'
    id 'org.openjfx.javafxplugin' version '0.0.13'
    id 'org.beryx.jlink' version '2.25.0'
//    id 'com.opencastsoftware.gradle.buildinfo' version '0.3.0'
}

group 'ca.qbb'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven {
        url "https://sandec.jfrog.io/artifactory/repo"
    }
}

ext {
    junitVersion = '5.9.2'
}

sourceCompatibility = '17'
targetCompatibility = '17'

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}

application {
    mainModule = 'ca.qbb.qbbimporter'
    mainClass = 'ca.qbb.qbbimporter.Launcher'
}

javafx {
    version = '21'
    modules = ['javafx.controls', 'javafx.fxml']
}

dependencies {
    implementation('org.controlsfx:controlsfx:11.1.2')
    implementation("org.xerial:sqlite-jdbc:3.44.1.0")
    implementation("org.slf4j:slf4j-api:2.0.9")
    implementation('net.synedra:validatorfx:0.4.0') {
        exclude(group: 'org.openjfx')
    }
//    implementation("com.microsoft.alm:auth-secure-storage:0.6.4")
    implementation('org.kordamp.ikonli:ikonli-javafx:12.3.1')
    implementation 'org.projectlombok:lombok:1.18.30'
    implementation("io.reactivex.rxjava3:rxjava:3.1.8")
    implementation("commons-io:commons-io:2.15.1")
    implementation('com.dlsc.gemsfx:gemsfx:1.90.0')
    implementation("org.apache.commons:commons-lang3:3.14.0")
    implementation('com.dlsc.preferencesfx:preferencesfx-core:11.8.0')

    testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
    testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")

    runtimeOnly("ch.qos.logback:logback-classic:1.4.14")

    annotationProcessor("org.projectlombok:lombok:1.18.30")

}

test {
    useJUnitPlatform()
}

jlink {
    imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
        name = "${group}-${version}"
    }
}

jlinkZip {
    group = 'distribution'
}

The classpath looks like this image

The gson dependency seems to be available, but it's not available at runtime. I don't know what I'm doing wrong. Please help

bartekc7 commented 8 months ago

The last version that works for me is 11.12.0.