diff --git a/build.gradle b/build.gradle deleted file mode 100644 index fe145dd..0000000 --- a/build.gradle +++ /dev/null @@ -1,13 +0,0 @@ -plugins { - id 'twomartens.versions' - id 'twomartens.nebula-release' -} - -versionCatalogUpdate { - sortByKey = false - keep { - keepUnusedVersions = true - keepUnusedLibraries = true - keepUnusedPlugins = true - } -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..64e90ce --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id("twomartens.versions") + id("twomartens.nebula-release") +} + +nebulaRelease { + addReleaseBranchPattern("/main/") +} + +versionCatalogUpdate { + sortByKey.set(false) + keep { + keepUnusedVersions.set(true) + keepUnusedLibraries.set(true) + keepUnusedPlugins.set(true) + } +} \ No newline at end of file diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle deleted file mode 100644 index af471e1..0000000 --- a/buildSrc/build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id 'groovy-gradle-plugin' -} - -repositories { - gradlePluginPortal() -} - -dependencies { - implementation libs.plugin.springboot - implementation libs.plugin.lombok - implementation libs.plugin.nebula.release - implementation libs.plugin.gradle.versions - implementation libs.plugin.version.catalog -} \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 0000000..b35e9bb --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + `kotlin-dsl` +} + +repositories { + gradlePluginPortal() + mavenCentral() +} + +dependencies { + implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) + implementation(libs.plugin.kotlin.gradle) + implementation(libs.plugin.springboot) + implementation(libs.plugin.lombok) + implementation(libs.plugin.nebula.release) + implementation(libs.plugin.gradle.versions) + implementation(libs.plugin.version.catalog) +} diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle.kts similarity index 79% rename from buildSrc/settings.gradle rename to buildSrc/settings.gradle.kts index 7cd729c..50483dc 100644 --- a/buildSrc/settings.gradle +++ b/buildSrc/settings.gradle.kts @@ -1,4 +1,4 @@ -rootProject.name = 'twomartens.config' +rootProject.name = "twomartens.config" dependencyResolutionManagement { versionCatalogs { diff --git a/buildSrc/src/main/groovy/twomartens.base.gradle b/buildSrc/src/main/groovy/twomartens.base.gradle deleted file mode 100644 index c6c8dd5..0000000 --- a/buildSrc/src/main/groovy/twomartens.base.gradle +++ /dev/null @@ -1,6 +0,0 @@ -plugins { - id 'idea' - id 'eclipse' -} - -group = projectgroup \ No newline at end of file diff --git a/buildSrc/src/main/groovy/twomartens.checkstyle.gradle b/buildSrc/src/main/groovy/twomartens.checkstyle.gradle deleted file mode 100644 index ef5353a..0000000 --- a/buildSrc/src/main/groovy/twomartens.checkstyle.gradle +++ /dev/null @@ -1,23 +0,0 @@ -plugins { - id 'checkstyle' - id 'twomartens.java-base' -} - -checkstyle { - toolVersion '10.0' - ignoreFailures = false - maxWarnings = 0 - - configFile rootProject.file('config/checkstyle/checkstyle.xml') - - configProperties = ['org.checkstyle.google.suppressionfilter.config': "${project.rootDir}/config/checkstyle/checkstyle-suppressions.xml"] - - tasks.withType(Checkstyle).tap { - configureEach { - reports { - xml.required = true - html.required = true - } - } - } -} \ No newline at end of file diff --git a/buildSrc/src/main/groovy/twomartens.java-base.gradle b/buildSrc/src/main/groovy/twomartens.java-base.gradle deleted file mode 100644 index c85aa0d..0000000 --- a/buildSrc/src/main/groovy/twomartens.java-base.gradle +++ /dev/null @@ -1,22 +0,0 @@ -plugins { - id 'java' - id 'java-library' - id 'twomartens.base' -} - -sourceCompatibility = projectSourceCompatibility -targetCompatibility = projectSourceCompatibility - -repositories { - mavenCentral() -} - -tasks.register('buildAll') { - group 'build' - dependsOn(build) - dependsOn(test) -} - -clean { - delete 'out' -} diff --git a/buildSrc/src/main/groovy/twomartens.java-preview.gradle b/buildSrc/src/main/groovy/twomartens.java-preview.gradle deleted file mode 100644 index 1459a9d..0000000 --- a/buildSrc/src/main/groovy/twomartens.java-preview.gradle +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id 'twomartens.java-base' -} - -tasks.withType(JavaCompile).configureEach { - options.compilerArgs += "--enable-preview" -} - -tasks.withType(Test).configureEach { - jvmArgs += "--enable-preview" -} - -tasks.withType(JavaExec).configureEach { - jvmArgs += '--enable-preview' -} \ No newline at end of file diff --git a/buildSrc/src/main/groovy/twomartens.java.gradle b/buildSrc/src/main/groovy/twomartens.java.gradle deleted file mode 100644 index 9b61efa..0000000 --- a/buildSrc/src/main/groovy/twomartens.java.gradle +++ /dev/null @@ -1,71 +0,0 @@ -import java.text.SimpleDateFormat - -plugins { - id 'jacoco' - id 'io.freefair.lombok' - id 'twomartens.java-base' - id 'twomartens.checkstyle' -} - -dependencies { - constraints.implementation libs.bundles.logging - - implementation libs.slf4j.api - runtimeOnly libs.bundles.logging - - testImplementation libs.bundles.test -} - -configurations { - configureEach { - exclude group: 'junit', module: 'junit' - // we are using log4j-slf4j2-impl, so we need to suppress spring include of log4j-slf4j-impl - exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl' - } -} - -test { - systemProperty 'junit.jupiter.execution.parallel.enabled', true - systemProperty 'junit.jupiter.execution.parallel.mode.default', "concurrent" - useJUnitPlatform() - maxHeapSize = "4g" - workingDir = rootProject.projectDir - finalizedBy jacocoTestReport -} - -configurations { - compileOnly { - extendsFrom annotationProcessor - } -} - -jacocoTestReport { - dependsOn(test) - reports { - xml.required = true - } -} - -jar { - doFirst { - manifest { - attributes 'Implementation-Title': rootProject.name, - 'Implementation-Version': archiveVersion.get(), - 'Implementation-Vendor': "Jim Martens", - 'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()), - 'Created-By': "Gradle ${gradle.gradleVersion}", - 'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})", - 'Build-OS': "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}" - } - } -} - -normalization.runtimeClasspath.metaInf { - ignoreAttribute("Build-Timestamp") -} - -tasks.register('cleanLibs') { - delete("${buildDir}/libs") -} - -tasks.build.dependsOn("cleanLibs") diff --git a/buildSrc/src/main/groovy/twomartens.nebula-release.gradle b/buildSrc/src/main/groovy/twomartens.nebula-release.gradle deleted file mode 100644 index 4cf743a..0000000 --- a/buildSrc/src/main/groovy/twomartens.nebula-release.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'com.netflix.nebula.release' - id 'twomartens.base' -} - -nebulaRelease { - addReleaseBranchPattern(/main/) -} - -task writeVersionProperties() { - group 'version' - buildDir.mkdirs() - file("$buildDir/version.properties").text = "VERSION=${project.version.toString()}\n" - mustRunAfter("release") - outputs.file("$buildDir/version.properties") -} \ No newline at end of file diff --git a/buildSrc/src/main/groovy/twomartens.spring-boot-cloud.gradle b/buildSrc/src/main/groovy/twomartens.spring-boot-cloud.gradle deleted file mode 100644 index 2feb1ed..0000000 --- a/buildSrc/src/main/groovy/twomartens.spring-boot-cloud.gradle +++ /dev/null @@ -1,40 +0,0 @@ -plugins { - id 'twomartens.spring-boot' -} - -dependencies { - implementation platform(libs.spring.cloud) - implementation libs.bundles.spring.boot.server - implementation libs.spring.openapi - - implementation libs.httpclient - implementation libs.prometheus -} - -sourceSets { - "server-test" { - java { - compileClasspath += main.output + test.output - runtimeClasspath += main.output + test.output - srcDir file('src/server-test/java') - } - resources.srcDir file('src/server-test/resources') - } -} - -configurations { - serverTestImplementation.extendsFrom testImplementation -} - -tasks.register('serverTest', Test) { - outputs.upToDateWhen { false } - systemProperty 'junit.jupiter.execution.parallel.enabled', true - systemProperty 'junit.jupiter.execution.parallel.mode.default', "concurrent" - systemProperty 'junit.jupiter.execution.parallel.mode.classes.default', "concurrent" - useJUnitPlatform() - maxHeapSize = "4g" - group = 'verification' - workingDir = rootProject.projectDir - testClassesDirs = sourceSets."server-test".output.classesDirs - classpath = sourceSets."server-test".runtimeClasspath -} diff --git a/buildSrc/src/main/groovy/twomartens.spring-boot.gradle b/buildSrc/src/main/groovy/twomartens.spring-boot.gradle deleted file mode 100644 index f9ede99..0000000 --- a/buildSrc/src/main/groovy/twomartens.spring-boot.gradle +++ /dev/null @@ -1,60 +0,0 @@ -plugins { - id 'org.springframework.boot' - id 'twomartens.java' -} - -dependencies { - implementation platform(libs.spring.boot) - - implementation libs.bundles.spring.boot - testImplementation libs.spring.boot.test - annotationProcessor libs.spring.boot.config -} - -sourceSets { - "integration-test" { - java { - compileClasspath += main.output + test.output - runtimeClasspath += main.output + test.output - srcDir file('src/integration-test/java') - } - resources.srcDir file('src/integration-test/resources') - } -} - -configurations { - configureEach { - exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' - exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' - } - integrationTestImplementation.extendsFrom testImplementation -} - -tasks.register('integrationTest', Test) { - systemProperty 'junit.jupiter.execution.parallel.enabled', true - systemProperty 'junit.jupiter.execution.parallel.mode.default', "concurrent" - systemProperty 'junit.jupiter.execution.parallel.mode.classes.default', "concurrent" - useJUnitPlatform() - maxHeapSize = "4g" - group = 'verification' - workingDir = rootProject.projectDir - testClassesDirs = sourceSets."integration-test".output.classesDirs - classpath = sourceSets."integration-test".runtimeClasspath -} - -tasks.named("buildAll").configure() { - dependsOn(integrationTest) -} - -springBoot { - buildInfo() -} - -bootJar { - enabled = false -} - -jar { - enabled = true - archiveClassifier.set("") -} \ No newline at end of file diff --git a/buildSrc/src/main/groovy/twomartens.versions.gradle b/buildSrc/src/main/groovy/twomartens.versions.gradle deleted file mode 100644 index 60eb26c..0000000 --- a/buildSrc/src/main/groovy/twomartens.versions.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id "com.github.ben-manes.versions" - id "nl.littlerobots.version-catalog-update" -} - -dependencyUpdates { - revision = "release" - gradleReleaseChannel = "current" -} - -def isNonStable = { String version -> - def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) } - def regex = /^[0-9,.v-]+(-r)?$/ - return !stableKeyword && !(version ==~ regex) -} - -tasks.named("dependencyUpdates").configure { - rejectVersionIf { - isNonStable(it.candidate.version) - } -} - -tasks.named("versionCatalogUpdate").configure { - group 'version' -} - -tasks.named("dependencyUpdates").configure { - group 'version' -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/twomartens.base.gradle.kts b/buildSrc/src/main/kotlin/twomartens.base.gradle.kts new file mode 100644 index 0000000..a863b4c --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.base.gradle.kts @@ -0,0 +1,6 @@ +plugins { + idea +} + +val projectgroup: String = providers.gradleProperty("projectgroup").get() +group = projectgroup \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/twomartens.checkstyle.gradle.kts b/buildSrc/src/main/kotlin/twomartens.checkstyle.gradle.kts new file mode 100644 index 0000000..e80a466 --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.checkstyle.gradle.kts @@ -0,0 +1,23 @@ +plugins { + checkstyle + id("twomartens.java-base") +} + +checkstyle { + toolVersion = "10.0" + setIgnoreFailures(false) + maxWarnings = 0 + + configFile = rootProject.file("config/checkstyle/checkstyle.xml") + + configProperties = mapOf( + "org.checkstyle.google.suppressionfilter.config" to + "${project.rootDir}/config/checkstyle/checkstyle-suppressions.xml") + +} +tasks.withType().configureEach { + reports { + xml.required.set(true) + html.required.set(true) + } +} diff --git a/buildSrc/src/main/kotlin/twomartens.java-base.gradle.kts b/buildSrc/src/main/kotlin/twomartens.java-base.gradle.kts new file mode 100644 index 0000000..c665e7d --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.java-base.gradle.kts @@ -0,0 +1,30 @@ +plugins { + java + `java-library` + id("twomartens.base") + application +} + +val projectSourceCompatibility: String = rootProject.properties["projectSourceCompatibility"].toString() + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(projectSourceCompatibility)) + } +} + +repositories { + mavenCentral() +} + +tasks.register("buildAll") { + group = "build" + dependsOn("build") + dependsOn("test") +} + +tasks.clean { + doFirst { + delete("out") + } +} diff --git a/buildSrc/src/main/kotlin/twomartens.java-preview.gradle.kts b/buildSrc/src/main/kotlin/twomartens.java-preview.gradle.kts new file mode 100644 index 0000000..55b0390 --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.java-preview.gradle.kts @@ -0,0 +1,15 @@ +plugins { + id("twomartens.java-base") +} + +tasks.withType().configureEach { + options.compilerArgs.plusAssign("--enable-preview") +} + +tasks.withType().configureEach { + jvmArgs.plusAssign("--enable-preview") +} + +tasks.withType().configureEach { + jvmArgs.plusAssign("--enable-preview") +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/twomartens.java.gradle.kts b/buildSrc/src/main/kotlin/twomartens.java.gradle.kts new file mode 100644 index 0000000..b6408e3 --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.java.gradle.kts @@ -0,0 +1,80 @@ +import org.gradle.accessors.dm.LibrariesForLibs +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +plugins { + jacoco + id("io.freefair.lombok") + id("twomartens.java-base") + id("twomartens.checkstyle") +} + +val libs = the() + +dependencies { + constraints.implementation(libs.bundles.logging) + + implementation(libs.slf4j.api) + runtimeOnly(libs.bundles.logging) + + testImplementation(libs.bundles.test) + testImplementation(kotlin("test-junit5")) +} + +configurations { + configureEach { + exclude(group="junit", module="junit") + // we are using log4j-slf4j2-impl, so we need to suppress spring include of log4j-slf4j-impl + exclude(group="org.apache.logging.log4j", module="log4j-slf4j-impl") + } +} + +tasks.withType().configureEach { + systemProperty("junit.jupiter.execution.parallel.enabled", true) + systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent") + useJUnitPlatform() + maxHeapSize = "4g" + workingDir = rootProject.projectDir + finalizedBy(tasks.jacocoTestReport) +} + +configurations { + compileOnly { + extendsFrom(configurations.annotationProcessor.get()) + } +} + +tasks.jacocoTestReport { + dependsOn(tasks.test) + reports { + xml.required.set(true) + } +} + +val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + +tasks.jar { + doFirst { + manifest { + attributes["Implementation-Title"] = rootProject.name + attributes["Implementation-Version"] = archiveVersion.get() + attributes["Implementation-Vendor"] = "Jim Martens" + attributes["Build-Timestamp"] = LocalDateTime.now().format(formatter) + attributes["Created-By"] = "Gradle ${gradle.gradleVersion}" + attributes["Build-Jdk"] = "${providers.systemProperty("java.version").get()} (${providers.systemProperty("java.vendor").get()} ${providers.systemProperty("java.vm.version").get()})" + attributes["Build-OS"] = "${providers.systemProperty("os.name").get()} ${providers.systemProperty("os.arch").get()} ${providers.systemProperty("os.version").get()}" + } + } +} + +normalization.runtimeClasspath.metaInf { + ignoreAttribute("Build-Timestamp") +} + +tasks.register("cleanLibs") { + delete("${buildDir}/libs") +} + +tasks.build { + dependsOn("cleanLibs") +} diff --git a/buildSrc/src/main/kotlin/twomartens.nebula-release.gradle.kts b/buildSrc/src/main/kotlin/twomartens.nebula-release.gradle.kts new file mode 100644 index 0000000..859b39a --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.nebula-release.gradle.kts @@ -0,0 +1,18 @@ +import java.nio.file.Files + +plugins { + id("twomartens.base") +} + +apply(plugin="com.netflix.nebula.release") + +tasks.register("writeVersionProperties") { + group = "version" + mustRunAfter("release") + outputs.file("$buildDir/version.properties") + val directory = buildDir + doLast { + Files.createDirectories(directory.toPath()) + File("$buildDir/version.properties").writeText("VERSION=${project.version.toString()}\n") + } +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/twomartens.spring-boot-cloud.gradle.kts b/buildSrc/src/main/kotlin/twomartens.spring-boot-cloud.gradle.kts new file mode 100644 index 0000000..bfbf0f4 --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.spring-boot-cloud.gradle.kts @@ -0,0 +1,49 @@ +import org.gradle.accessors.dm.LibrariesForLibs + +plugins { + id("twomartens.spring-boot") +} + +val libs = the() + +dependencies { + implementation(platform(libs.spring.cloud)) + implementation(libs.bundles.spring.boot.server) + implementation(libs.spring.openapi) + + implementation(libs.httpclient) + implementation(libs.prometheus) +} + +sourceSets { + create("server-test") { + java { + compileClasspath += sourceSets.main.get().output + sourceSets.test.get().output + runtimeClasspath += sourceSets.main.get().output + sourceSets.test.get().output + setSrcDirs(listOf("src/server-test")) + } + } +} + +idea { + module { + testSources.from(sourceSets["server-test"].java.srcDirs) + } +} + +val serverTestImplementation: Configuration by configurations.getting { + extendsFrom(configurations["testImplementation"]) +} + +tasks.register("serverTest") { + outputs.upToDateWhen { false } + systemProperty("junit.jupiter.execution.parallel.enabled", true) + systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent") + systemProperty("junit.jupiter.execution.parallel.mode.classes.default", "concurrent") + useJUnitPlatform() + maxHeapSize = "4g" + group = "verification" + workingDir = rootProject.projectDir + testClassesDirs = sourceSets["server-test"].output.classesDirs + classpath = sourceSets["server-test"].runtimeClasspath +} diff --git a/buildSrc/src/main/kotlin/twomartens.spring-boot.gradle.kts b/buildSrc/src/main/kotlin/twomartens.spring-boot.gradle.kts new file mode 100644 index 0000000..77787a3 --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.spring-boot.gradle.kts @@ -0,0 +1,72 @@ +import org.gradle.accessors.dm.LibrariesForLibs + +plugins { + id("org.springframework.boot") + id("twomartens.java") +} + +val libs = the() + +dependencies { + implementation(platform(libs.spring.boot)) + + implementation(libs.bundles.spring.boot) + testImplementation(libs.spring.boot.test) + annotationProcessor(libs.spring.boot.config) +} + +sourceSets { + create("integration-test") { + java { + compileClasspath += sourceSets.main.get().output + sourceSets.test.get().output + runtimeClasspath += sourceSets.main.get().output + sourceSets.test.get().output + setSrcDirs(listOf("src/integration-test")) + } + } +} + +idea { + module { + testSources.from(sourceSets["integration-test"].java.srcDirs) + } +} + +val integrationTestImplementation by configurations.getting { + extendsFrom(configurations.testImplementation.get()) +} + +configurations { + configureEach { + exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging") + exclude(group = "org.junit.vintage", module = "junit-vintage-engine") + } +} + +tasks.register("integrationTest") { + systemProperty("junit.jupiter.execution.parallel.enabled", true) + systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent") + systemProperty("junit.jupiter.execution.parallel.mode.classes.default", "concurrent") + useJUnitPlatform() + maxHeapSize = "4g" + group = "verification" + workingDir = rootProject.projectDir + testClassesDirs = sourceSets["integration-test"].output.classesDirs + classpath = sourceSets["integration-test"].runtimeClasspath +} + +tasks.named("buildAll") { + dependsOn("integrationTest") +} + +springBoot { + buildInfo() +} + +tasks.bootJar { + enabled = false +} + +tasks.jar { + enabled = true + archiveClassifier.set("") +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/twomartens.versions.gradle.kts b/buildSrc/src/main/kotlin/twomartens.versions.gradle.kts new file mode 100644 index 0000000..9b54faf --- /dev/null +++ b/buildSrc/src/main/kotlin/twomartens.versions.gradle.kts @@ -0,0 +1,32 @@ +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask + +plugins { + id("com.github.ben-manes.versions") + id("nl.littlerobots.version-catalog-update") +} + +tasks.withType().configureEach { + revision = "release" + gradleReleaseChannel = "current" +} + +fun String.isNonStable(): Boolean { + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { uppercase().contains(it) } + val regex = "^[0-9,.v-]+(-r)?$".toRegex() + val isStable = stableKeyword || regex.matches(this) + return isStable.not() +} + +tasks.withType { + rejectVersionIf { + candidate.version.isNonStable() + } +} + +tasks.named("versionCatalogUpdate").configure { + group = "version" +} + +tasks.named("dependencyUpdates").configure { + group = "version" +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f715417..9c6b1ed 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,10 +14,11 @@ junit = "5.9.2" assertj = "3.24.2" mockito = "5.3.0" keycloak = "22.0.0" -plugin-nebula-release = "17.1.0" +plugin-nebula-release = "17.2.2" plugin-lombok = "8.0.1" plugin-gradle-versions = "0.46.0" plugin-version-catalog = "0.8.0" +plugin-kotlin-gradle = "1.9.0" [libraries] spring-boot = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "spring-boot" } @@ -72,6 +73,7 @@ plugin-springboot = { module = "org.springframework.boot:spring-boot-gradle-plug plugin-lombok = { module = "io.freefair.gradle:lombok-plugin", version.ref = "plugin-lombok" } plugin-gradle-versions = { module = "com.github.ben-manes:gradle-versions-plugin", version.ref = "plugin-gradle-versions" } plugin-version-catalog = { module = "nl.littlerobots.vcu:plugin", version.ref = "plugin-version-catalog" } +plugin-kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "plugin-kotlin-gradle" } [bundles] logging = [ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae0804..84a0b92 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/module-server/server.gradle b/module-server/server.gradle deleted file mode 100644 index 610a7aa..0000000 --- a/module-server/server.gradle +++ /dev/null @@ -1,10 +0,0 @@ -plugins { - id 'twomartens.spring-boot-cloud' -} - -dependencies { - implementation libs.mapstruct.base - implementation libs.bundles.spring.boot.security - annotationProcessor libs.mapstruct.processor - -} \ No newline at end of file diff --git a/module-server/server.gradle.kts b/module-server/server.gradle.kts new file mode 100644 index 0000000..500f575 --- /dev/null +++ b/module-server/server.gradle.kts @@ -0,0 +1,9 @@ +plugins { + id("twomartens.spring-boot-cloud") +} + +dependencies { + implementation(libs.mapstruct.base) + implementation(libs.bundles.spring.boot.security) + annotationProcessor(libs.mapstruct.processor) +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 9349cde..0000000 --- a/settings.gradle +++ /dev/null @@ -1,8 +0,0 @@ -rootProject.name = projectname - -include 'server' - -rootProject.children.each { subproject -> - subproject.projectDir = file("module-" + subproject.name) - subproject.buildFileName = "${subproject.name}.gradle" -} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..8abb2dd --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,9 @@ +val projectname: String = providers.gradleProperty("projectname").get() +rootProject.name = projectname + +include("server") + +for (subproject in rootProject.children) { + subproject.projectDir = file("module-" + subproject.name) + subproject.buildFileName = "${subproject.name}.gradle.kts" +} \ No newline at end of file