Gradle Kotlin DSL script for KotlinLab

For building KotlinLab (GitHub - sterglee/KotlinLabSimple: A MATLAB-like scientific scripting environment for Kotlin, a simpler Kotlin only version of KotlinLab) I used a Kotlin Gradle DSL script that builds the .jar file but it fails to load (KotlinLab builds perfectly with the IntelliJ IDEA).
Can anyone Gradle expert detect the cause?
Below I paste my Kotlin DSL script:

plugins {

java
application
kotlin("jvm") version "1.5.31"

}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(16))

}

}

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
implementation(fileTree("./lib/"))
implementation(fileTree("./libkotlin/"))
}

application {
mainClassName = “kotlinLabExec.kotlinLab.kotlinLab”
}

sourceSets {
main {
java.srcDir(“src/”)
}
}

tasks.register(“uberJar”) {
archiveClassifier.set(“uber”)
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)

from( {
    configurations.runtimeClasspath.get().filter {
        it.name.endsWith("jar")}.map{ zipTree(it) }
})

}

var libpathfiles= StringBuilder();
File("./lib").walk().forEach {
e-> if (e.toString().trim().endsWith(".jar"))
libpathfiles.append(e.toString().replaceFirst("./","").trim()).append(" ")

}

var kotlinlibpathfiles= StringBuilder();
File("./libkotlin").walk().forEach {
e-> if (e.toString().trim().endsWith(".jar"))
kotlinlibpathfiles.append(e.toString().replaceFirst("./","").trim()).append(" ")

}

var allClassPath = libpathfiles.toString().trim()+ " "+kotlinlibpathfiles.toString().trim()

tasks.jar {
baseName = “kotlinLab”

manifest {
        attributes["Class-Path"] = allClassPath.trim()
        attributes["Main-Class"] = "kotlinLabExec.kotlinLab.kotlinLab"
}

}

I found the problem:

Gradle didn’t pack the resources within the produced jar,
and I used a resource file in order to build some paths.

Now, I changed the code to init the same paths using
the “KotlinLab.class” file that of course exists,
and KotlinLabSimple is build very well and with Gradle as well as with the IntelliJ IDEA.