Im trying to use jooq with gradle (kotlin). Source: gradle-jooq-plugin
I'm am trying it since yesterday, now i do not have any resources to look at.
I assume i don't get it right, since i am new to kotlin. But the examples did not work for me either (i know the explanation of the plugin is good and the examples are easy..)
I am very thankful if any of you can lead me where i did a mistake, because i am more than curious.
Following is a snippet of my build.gradle
file. I am testing with Junit 5 (if it would have any impact, i guess not)
import nu.studer.gradle.jooq.JooqEdition
plugins {
java
jacoco // test coverage and reports
id("org.springframework.boot") version "2.2.6.RELEASE"
id("org.sonarqube") version "2.8"
id("nu.studer.jooq") version "4.1"
id("java-library")
`kotlin-dsl`
}
apply(plugin = "io.spring.dependency-management")
apply(plugin = "nu.studer.jooq")
dependencies {
apply(plugin = "nu.studer.jooq")
// ### Spring ###
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-jooq")
compileOnly("org.springframework.boot:spring-boot-starter-actuator")
// ### Database ###
implementation("org.postgresql:postgresql:42.2.11")
implementation("org.liquibase:liquibase-core:3.8.8")
implementation("org.jooq:jooq")
jooqRuntime("postgresql:postgresql:9.1-901.jdbc4")
}
ext {
jooq.version = "3.12.3"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
jooq {
version = "3.12.3"
edition = JooqEdition.OSS
"sample"(sourceSets["main"]) {
}
}
My problem
The "sample"(sourceSets["main"])
is from here. A gradle (kotlin) example. But i get the following error:
Expression '"sample"' of type 'String' cannot be invoked as a function. The function 'invoke()' is not found