Skip to content

feat: accept either .java or .kt files in sources jar - #7956

Merged
mergify[bot] merged 2 commits into
mainfrom
truman/allow-kt-files-for-java-and-dev-files
Oct 21, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
truman/allow-kt-files-for-java-and-dev-files

Conversation

@tdgao

@tdgao tdgao commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Some people write their mod in kotlin so jar can contain just .kt files

@github-actions

Copy link
Copy Markdown
Contributor

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

@rahul05ranjan rahul05ranjan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward and correct — this is the only place enforcing the sources-jar rule (I checked for other .java guards), and the error message is updated to match, so a Kotlin developer uploading a sources jar stops getting a nonsense rejection telling them they need .java files.

Two small notes while you're in here:

  • The check is case-sensitive, so Foo.KT / Foo.Java would still be rejected. Unlikely in practice from Gradle's sourcesJar output, but if you're touching this line anyway, a lowercase extension list ([".java", ".kt"] compared against the lowercased name) would make it robust in one move.
  • If the intent is "this jar actually contains sources, not a repackaged binary", Groovy (.groovy) and Scala (.scala) projects are still in the same boat Kotlin was. Not this PR's job to fix, just flagging the next likely report.

Either way, this is a real papercut fix — no concerns with merging as is.

@tdgao

tdgao commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Merge Queue Status

This pull request spent 14 minutes 36 seconds in the queue, including 14 minutes 4 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Oct 21, 2026
@mergify mergify Bot mentioned this pull request Oct 21, 2026
6 of 10 tasks
@mergify
mergify Bot merged commit 20d8f24 into main Oct 21, 2026
10 checks passed
@mergify
mergify Bot deleted the truman/allow-kt-files-for-java-and-dev-files branch October 21, 2026 19:54
@mergify mergify Bot removed the queued label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants