Skip to content

Commit

Permalink
chore: only apply lombok to java modules and remove testFixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippHeuer committed Feb 4, 2022
1 parent f2556c6 commit 2fcecf2
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 35 deletions.
1 change: 0 additions & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// In this section you declare the dependencies for your production and test code
dependencies {

}
Expand Down
35 changes: 12 additions & 23 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
plugins {
signing
`java-library`
`java-test-fixtures`
`maven-publish`
id("io.freefair.lombok") version "6.3.0"
}
Expand All @@ -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
Expand Down Expand Up @@ -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})"
Expand All @@ -116,17 +119,3 @@ subprojects {
}
}
}

tasks.register<Javadoc>("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"))
}
1 change: 0 additions & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// In this section you declare the dependencies for your production and test code
dependencies {
// Project
api(project(":api"))
Expand Down
2 changes: 0 additions & 2 deletions handler-reactor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
2 changes: 0 additions & 2 deletions handler-simple/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<MavenPublication> {
Expand Down
2 changes: 0 additions & 2 deletions handler-spring/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
6 changes: 4 additions & 2 deletions kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"))
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2fcecf2

Please sign in to comment.