junit5 icon indicating copy to clipboard operation
junit5 copied to clipboard

Add -since for javadoc

Open arukiidou opened this issue 1 month ago • 4 comments

Deliverables

Add a new tab to the Javadoc.

example

Image

how to

This fix was easy.

https://github.com/junit-team/junit-framework/blob/240d8df9c1c5386afaac7e76030b9d9567886064/documentation/documentation.gradle.kts#L425

			addStringsOption("-since", ",").value = listOf(
				"6.1",
				"6.0",
				"5.14",
				"5.13",
				"5.12",
				"5.11",
				"5.10",
				"5.9",
				"5.8",
				"5.7",
				"5.6",
				"5.5",
				"5.4",
				"5.3",
				"5.2",
				"5.1",
				"5.0",
			)

arukiidou avatar Nov 20 '25 16:11 arukiidou

Thanks for bringing this to my attention! Personally, I was not aware this feature existed. If we decide to do it, I think we should populate the list from all r* Git tags (excluding milestones and RCs) and the current version (after removing the (.0)?-SNAPSHOT suffix).

marcphilipp avatar Nov 20 '25 18:11 marcphilipp

r*Gitタグ

the -since option ignores git tags. It only considers the @since tag in Java comment.

example: https://github.com/junit-team/junit-framework/blob/7d483c7cddf0f0c259fa1cf5862c3c844a00b864/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrderer.java#L117

Also, it seems that string wildcards were not allowed.

https://docs.oracle.com/en/java/javase/21/docs/specs/man/javadoc.html

--since release(,release)* Generates documentation for APIs that were added or newly deprecated in the specified releases.

If the @since tag in the javadoc comment of an element in the documented source code matches a release passed as option argument, information about the element and the release it was added in is included in a "New API" page.

If the "Deprecated API" page is generated and the since element of the java.lang.Deprecated annotation of a documented element matches a release in the option arguments, information about the release the element was deprecated in is added to the "Deprecated API" page.

Releases are compared using case-sensitive string comparison.

arukiidou avatar Nov 20 '25 23:11 arukiidou

Hi @marcphilipp , I am a first time contributor and I'd like to take this up if the discussion has concluded.

Vishalup29 avatar Nov 24 '25 08:11 Vishalup29

@Vishalup29 Thank you for offering! However, we think it will be more efficient if someone from the core team takes care of this specific issue as it's resolution will be quite involved regarding the Gradle build.

marcphilipp avatar Nov 27 '25 08:11 marcphilipp

Hi @marcphilipp I want to work on this issue.

chjyothsna25-svg avatar Dec 15 '25 05:12 chjyothsna25-svg