Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
827df2b
Setup project skeleton
mpkorstanje Jul 30, 2026
ed2e1ee
Enable annotation processor for ConfigurationParameter
mpkorstanje Jul 30, 2026
14ffed5
Output minimal junit-platform-configuration-metadata.json
mpkorstanje Jul 30, 2026
63dd21b
Fix workaround for Javadoc
mpkorstanje Jul 30, 2026
578bdca
Fix verifyOSGi
mpkorstanje Jul 30, 2026
2d7547d
Fix describe module tests
mpkorstanje Jul 30, 2026
6bc410b
Fix allPublicTopLevelTypesHaveApiAnnotations test
mpkorstanje Jul 30, 2026
e06d4c1
Explain why processing linting is supressed
mpkorstanje Jul 30, 2026
ccea87e
Output junit-platform-configuration-metadata for platform-launcher
mpkorstanje Jul 30, 2026
fd1baf1
Fix checkBackwardCompatibility
mpkorstanje Jul 30, 2026
3295a99
Fix JarDescribeModuleTests
mpkorstanje Jul 30, 2026
3b5624f
Reduce scope to compileOnly
mpkorstanje Jul 31, 2026
314e8fd
Process annotations for Vintage
mpkorstanje Jul 31, 2026
a3aa4e5
Setup minimal unit test
mpkorstanje Aug 3, 2026
b155836
Add Eclipse IDE compatibility note
mpkorstanje Aug 4, 2026
149556b
Extract TestCompiler
mpkorstanje Aug 4, 2026
72d715b
Write output with platform independent newline
mpkorstanje Aug 4, 2026
c1789d6
Require annotated fields to be static with a constant value string
mpkorstanje Aug 4, 2026
9a1f897
Add Property.sourceType
mpkorstanje Aug 4, 2026
7c3df1f
Add deprecation and refactor
mpkorstanje Aug 4, 2026
d764e3f
Remove redundant local variable
mpkorstanje Aug 5, 2026
3b011f7
Generate some json output
mpkorstanje Aug 5, 2026
dd5fc8c
Use jakarta.json and serialize by hand
mpkorstanje Aug 6, 2026
7e7476c
Use JSON syntax highlighting in tests
mpkorstanje Aug 6, 2026
9381ee1
Shadow jakarta.json and parsson into processor jar
marcphilipp Aug 8, 2026
3cfa463
Fix ArchUnit check
marcphilipp Aug 8, 2026
b63ef2a
Merge branch 'main' into feature/generate-configuration-parameters-ov…
marcphilipp Aug 9, 2026
94a9f04
Fix `aggregateJavadocs` task
marcphilipp Aug 9, 2026
ec4e77c
Merge branch 'main' into feature/generate-configuration-parameters-ov…
marcphilipp Aug 9, 2026
433b3b9
Drop dependency on junit-platform-commons
marcphilipp Aug 9, 2026
525aa1c
Merge metadata files for standalone jar
marcphilipp Aug 9, 2026
fa5ab92
Fail if attempting to merge non-array nodes
marcphilipp Aug 9, 2026
d708416
Extract explicit type for deprecation
mpkorstanje Aug 6, 2026
bf68047
Deprecation.Warning level can be omitted
mpkorstanje Aug 6, 2026
5b0eef0
Remove ``: {@value}`` from doc comments
mpkorstanje Aug 6, 2026
8d46a8b
Only use the first paragraph of the documentation
mpkorstanje Aug 6, 2026
b8e9230
Add note about error handling
mpkorstanje Aug 6, 2026
d6c4cc2
Process Property.type
mpkorstanje Aug 6, 2026
7cf5a6d
Rename ConfigurationProperty to ConfigurationParameter
mpkorstanje Aug 9, 2026
59e4a87
Remove ConfigurationParameter.type from scope
mpkorstanje Aug 9, 2026
1e1741f
Document minimal scope
mpkorstanje Aug 9, 2026
5d7daad
Polish deprecation element
mpkorstanje Aug 9, 2026
3a1fdb9
Implement missing json conversions
mpkorstanje Aug 9, 2026
adfc951
Remove unused Json
mpkorstanje Aug 9, 2026
53aca3c
Document ConfigurationMetaData
mpkorstanje Aug 9, 2026
ef7e949
Rename JsonWriter to JsonConverter
mpkorstanje Aug 9, 2026
64dc068
Extract AnnotationMirrorUtil
mpkorstanje Aug 9, 2026
0084a4a
Extract ConfigurationParameterHandler
mpkorstanje Aug 9, 2026
8c264aa
Reorg ConfigurationParameterHandler
mpkorstanje Aug 9, 2026
c0121e2
Add type and default value
mpkorstanje Aug 9, 2026
e4ec3df
Read type and default value from annotation
mpkorstanje Aug 9, 2026
70f6af3
Only support singular default values for now
mpkorstanje Aug 10, 2026
2493c67
Render defaults as json values where applicable
mpkorstanje Aug 10, 2026
5e6d62e
Annotate Jupiter Constants
mpkorstanje Aug 10, 2026
a235f3e
Claim ConfigurationParameter annotations
mpkorstanje Aug 10, 2026
6918e32
Extract ProcessingContext
mpkorstanje Aug 11, 2026
93c0e3a
Extract ConfigurationParameterAnnotatedField
mpkorstanje Aug 11, 2026
3a6ce7f
Replace preconditions with error message
mpkorstanje Aug 11, 2026
ae8b921
Nitpick
mpkorstanje Aug 11, 2026
dc9a43a
Documentation
mpkorstanje Aug 11, 2026
0244147
Add integration test with Maven
mpkorstanje Aug 11, 2026
98f0885
Annotate constant classes
mpkorstanje Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion documentation/documentation.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ dependencies {
javadocClasspath(libs.picocli)
javadocClasspath(libs.fastcsv)
javadocClasspath(libs.openTestReporting.events)
javadocClasspath(libs.jakarta.json.api)
javadocClasspath(libs.kotlinx.coroutines.core)
javadocClasspath(kotlin("stdlib"))
javadocClasspath(kotlin("reflect"))
Expand Down Expand Up @@ -406,10 +407,11 @@ tasks {

args.addAll(
"--module", modularProjects.joinToString(",") { it.javaModuleName },
"--add-modules", "info.picocli,org.opentest4j.reporting.events,de.siegmar.fastcsv",
"--add-modules", "info.picocli,org.opentest4j.reporting.events,de.siegmar.fastcsv,jakarta.json",
"--add-reads", "org.junit.platform.console=info.picocli",
"--add-reads", "org.junit.platform.reporting=org.opentest4j.reporting.events",
"--add-reads", "org.junit.jupiter.params=de.siegmar.fastcsv",
"--add-reads", "org.junit.platform.configuration.processor=jakarta.json",
)

outputDirectory = layout.buildDirectory.dir("docs/javadoc")
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ hamcrest = { module = "org.hamcrest:hamcrest", version = "3.0" }
jackson-databind = { module = "tools.jackson.core:jackson-databind", version.ref = "jackson" }
jackson-dataformat-yaml = { module = "tools.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jackson" }
jackson-module-kotlin = { module = "tools.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
jakarta-json-api = { module = "jakarta.json:jakarta.json-api", version = "2.1.3" }
jakarta-json-implementation = { module = "org.eclipse.parsson:parsson", version = "1.1.9" }
jaxb-api = { module = "jakarta.xml.bind:jakarta.xml.bind-api", version = "4.0.5" }
jaxb-runtime = { module = "org.glassfish.jaxb:jaxb-runtime", version = "4.0.9" }
jfrunit = { module = "org.moditect.jfrunit:jfrunit-core", version = "1.0.0.Alpha2" }
Expand Down
1 change: 1 addition & 0 deletions gradle/plugins/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies {
implementation("junitbuild.base:build-parameters")
implementation(projects.backwardCompatibility)
implementation(projects.javadoc)
implementation(libs.jackson.databind)
implementation(libs.plugins.kotlin.markerCoordinates)
implementation(libs.plugins.bnd.markerCoordinates)
implementation(libs.plugins.develocity.markerCoordinates)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package junitbuild.shadow

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.ResourceTransformer
import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext
import org.apache.tools.zip.ZipEntry
import org.apache.tools.zip.ZipOutputStream
import org.gradle.api.file.FileTreeElement
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import tools.jackson.databind.json.JsonMapper
import tools.jackson.databind.node.ArrayNode
import tools.jackson.databind.node.ObjectNode
import javax.inject.Inject

/**
* Merges JUnit/Spring configuration metadata files by concatenating the array
* values of their top-level fields (`groups`, `properties`, and `hints`).
*
* @see <a href="https://docs.spring.io/spring-boot/specification/configuration-metadata/format.html">Configuration Metadata format</a>
*/
abstract class ConfigurationMetadataMergingTransformer @Inject constructor(
override val objectFactory: ObjectFactory
) : ResourceTransformer {

@get:Input
abstract val resource: Property<String>

private var mergedTree: ObjectNode? = null

override fun canTransformResource(element: FileTreeElement): Boolean {
return resource.get().equals(element.path, ignoreCase = true)
}

override fun transform(context: TransformerContext) {
val tree = JsonMapper().readTree(context.inputStream) as ObjectNode
val merged = mergedTree
if (merged == null) {
mergedTree = tree
} else {
tree.properties().forEach { (name, value) ->
value as ArrayNode
val existing = merged.get(name)
if (existing == null) {
merged.set(name, value)
Comment thread
mpkorstanje marked this conversation as resolved.
} else {
existing as ArrayNode
existing.addAll(value)
}
}
}
}

override fun hasTransformedResource(): Boolean = mergedTree != null

override fun modifyOutputStream(os: ZipOutputStream, preserveFileTimestamps: Boolean) {
val entry = ZipEntry(resource.get())
entry.time = ShadowJar.CONSTANT_TIME_FOR_ZIP_ENTRIES
os.putNextEntry(entry)
os.write(JsonMapper().writeValueAsBytes(mergedTree))
os.closeEntry()
mergedTree = null
}

}
5 changes: 4 additions & 1 deletion junit-jupiter-api/junit-jupiter-api.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ plugins {
description = "JUnit Jupiter API"

dependencies {
annotationProcessor(projects.junitPlatformConfigurationProcessor)

api(platform(projects.junitBom))
api(libs.opentest4j)
api(projects.junitPlatformCommons)
Expand All @@ -17,6 +19,7 @@ dependencies {
compileOnlyApi(libs.jspecify)

compileOnly(kotlin("stdlib"))
compileOnly(projects.junitPlatformConfigurationApi)

testFixturesImplementation(libs.assertj)
testFixturesImplementation(testFixtures(projects.junitPlatformCommons))
Expand All @@ -35,7 +38,7 @@ eclipseConventions {

tasks {
compileJava {
options.compilerArgs.add("-Xlint:-module") // due to qualified exports
options.compilerArgs.add("-Xlint:-module,-processing") // -module: due to qualified exports, -processing: not all annotations need to be processed
Comment thread
marcphilipp marked this conversation as resolved.
}
jar {
bundle {
Expand Down
1 change: 1 addition & 0 deletions junit-jupiter-api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
requires transitive org.junit.platform.commons;
requires transitive org.opentest4j;

requires static org.junit.platform.configuration.api;
requires static kotlin.stdlib;

exports org.junit.jupiter.api;
Expand Down
Loading
Loading