From 2fcecf2c939b5882554f44293aea0ab7aef3d767 Mon Sep 17 00:00:00 2001 From: Philipp Heuer Date: Fri, 4 Feb 2022 20:44:37 +0100 Subject: [PATCH] chore: only apply lombok to java modules and remove testFixtures --- api/build.gradle.kts | 1 - build.gradle.kts | 35 +++++++------------ core/build.gradle.kts | 1 - handler-reactor/build.gradle.kts | 2 -- handler-simple/build.gradle.kts | 2 -- handler-spring/build.gradle.kts | 2 -- kotlin/build.gradle.kts | 6 ++-- .../kotlin/EventManagerExtensionsTest.kt | 2 -- 8 files changed, 16 insertions(+), 35 deletions(-) diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 45c5128..869c0bd 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -1,4 +1,3 @@ -// In this section you declare the dependencies for your production and test code dependencies { } diff --git a/build.gradle.kts b/build.gradle.kts index 313a8a8..8ee2308 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,6 @@ plugins { signing `java-library` - `java-test-fixtures` `maven-publish` id("io.freefair.lombok") version "6.3.0" } @@ -23,16 +22,17 @@ subprojects { apply(plugin = "signing") apply(plugin = "java-library") apply(plugin = "maven-publish") - apply(plugin = "io.freefair.lombok") - apply(plugin = "java-test-fixtures") base { archivesBaseName = artifactId } - lombok { - version.set("1.18.22") - disableConfig.set(true) + if (!project.name.contains("kotlin")) { + apply(plugin = "io.freefair.lombok") + lombok { + version.set("1.18.22") + disableConfig.set(true) + } } // Source Compatibility @@ -96,10 +96,13 @@ subprojects { } // javadoc & delombok - val delombok by getting(io.freefair.gradle.plugins.lombok.tasks.Delombok::class) javadoc { - dependsOn(delombok) - source(delombok) + if (!project.name.contains("kotlin")) { + val delombok by getting(io.freefair.gradle.plugins.lombok.tasks.Delombok::class) + dependsOn(delombok) + source(delombok) + } + options { title = "${project.artifactId} (v${project.version})" windowTitle = "${project.artifactId} (v${project.version})" @@ -116,17 +119,3 @@ subprojects { } } } - -tasks.register("aggregateJavadoc") { - group = JavaBasePlugin.DOCUMENTATION_GROUP - options { - title = "${rootProject.name} (v${project.version})" - windowTitle = "${rootProject.name} (v${project.version})" - encoding = "UTF-8" - } - - source(subprojects.map { it.tasks.delombok.get() }) - classpath = files(subprojects.map { it.sourceSets["main"].compileClasspath }) - - setDestinationDir(file("${rootDir}/docs/static/javadoc")) -} diff --git a/core/build.gradle.kts b/core/build.gradle.kts index c8d6bb7..e8ddd47 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,4 +1,3 @@ -// In this section you declare the dependencies for your production and test code dependencies { // Project api(project(":api")) diff --git a/handler-reactor/build.gradle.kts b/handler-reactor/build.gradle.kts index 15390c4..b61c3a4 100644 --- a/handler-reactor/build.gradle.kts +++ b/handler-reactor/build.gradle.kts @@ -1,9 +1,7 @@ -// In this section you declare the dependencies for your production and test code dependencies { // Project api(project(":api")) testImplementation(project(":core")) - testImplementation(testFixtures(project(":core"))) // Reactor - see https://repo1.maven.org/maven2/io/projectreactor/reactor-bom/Dysprosium-SR12/reactor-bom-Dysprosium-SR12.pom api(group = "io.projectreactor", name = "reactor-core", version = "3.4.14") diff --git a/handler-simple/build.gradle.kts b/handler-simple/build.gradle.kts index a4f0d0a..803f2de 100644 --- a/handler-simple/build.gradle.kts +++ b/handler-simple/build.gradle.kts @@ -1,9 +1,7 @@ -// In this section you declare the dependencies for your production and test code dependencies { // Project api(project(":api")) testImplementation(project(":core")) - testImplementation(testFixtures(project(":core"))) } publishing.publications.withType { diff --git a/handler-spring/build.gradle.kts b/handler-spring/build.gradle.kts index e3ed527..5669b73 100644 --- a/handler-spring/build.gradle.kts +++ b/handler-spring/build.gradle.kts @@ -1,9 +1,7 @@ -// In this section you declare the dependencies for your production and test code dependencies { // Project api(project(":api")) testImplementation(project(":core")) - testImplementation(testFixtures(project(":core"))) // Spring implementation(group = "org.springframework.boot", name = "spring-boot-starter", version = "2.6.3") diff --git a/kotlin/build.gradle.kts b/kotlin/build.gradle.kts index 12aa1a5..a52020e 100644 --- a/kotlin/build.gradle.kts +++ b/kotlin/build.gradle.kts @@ -1,4 +1,7 @@ -// In this section you declare the dependencies for your production and test code +plugins { + kotlin("jvm") version "1.6.0" +} + dependencies { // Project api(project(":api")) @@ -8,7 +11,6 @@ dependencies { testImplementation(group = "org.jetbrains.kotlinx", name="kotlinx-coroutines-test", version = "1.6.0") testImplementation(project(":core")) testImplementation(project(":handler-simple")) - testImplementation(testFixtures(project(":core"))) } tasks.test { diff --git a/kotlin/src/test/java/com/github/philippheuer/events4j/kotlin/EventManagerExtensionsTest.kt b/kotlin/src/test/java/com/github/philippheuer/events4j/kotlin/EventManagerExtensionsTest.kt index e3bdc62..20f44f0 100644 --- a/kotlin/src/test/java/com/github/philippheuer/events4j/kotlin/EventManagerExtensionsTest.kt +++ b/kotlin/src/test/java/com/github/philippheuer/events4j/kotlin/EventManagerExtensionsTest.kt @@ -3,13 +3,11 @@ package com.github.philippheuer.events4j.kotlin import com.github.philippheuer.events4j.core.EventManager import kotlinx.coroutines.* import kotlinx.coroutines.test.* -import lombok.extern.slf4j.Slf4j import org.junit.jupiter.api.* import org.junit.jupiter.api.Assertions.* @ExperimentalCoroutinesApi -@Slf4j class EventManagerExtensionsTest { @Test