Skip to content

Upgrade to Gradle 8.14.6 with Java 11–24 support - #8

Open
rcombs wants to merge 6 commits into
codex/subkt-build-cleanupfrom
codex/subkt-gradle-8
Open

rcombs wants to merge 6 commits into
codex/subkt-build-cleanupfrom
codex/subkt-gradle-8

Conversation

@rcombs

@rcombs rcombs commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Upgrade the wrapper to Gradle 8.14.6 and the Kotlin/Dokka build plugins so this stage supports Java 11 through 24. Target Java 11 bytecode, use the host Gradle Kotlin runtime, and preserve Markdown API documentation generation.

Stock wrapper files, functional build changes, case-conversion cleanup, functional tests, CI, and documentation remain separate commits. This stage is independently usable without the later automatic wrapper selection.

Validation

Build and compatibility checks passed on Java 11, 14, 15, and 24.

🤖 Codex

@rcombs
rcombs added this pull request to stack #10 October 18, 2026 04:57
@rcombs
rcombs marked this pull request as ready for review October 18, 2026 05:17
@rcombs
rcombs force-pushed the codex/subkt-gradle-8 branch from 645167f to ad3ab24 Compare October 20, 2026 22:15
Copy the generated Gradle 8.14.6 launchers and wrapper JARs. Keep this
mechanical refresh separate from selecting the new distribution and
updating the build configuration.
Select checksum-verified Gradle 8.14.6 and update Kotlin and Dokka to
versions that support it. Target Java 11 bytecode and Kotlin 2.0
metadata, align Kotlin dependencies with the host Gradle, and retain
Markdown API generation under build/dokka/gfm. This stage supports Java
11 through 24; runtime source migrations are separate commits.
Use lowercase after the Kotlin upgrade makes it available, retaining
explicit Locale.ROOT where it was already specified. Keep runtime source
edits separate from the toolchain version change.
Exercise subtitle processing, chapter and torrent generation, HTTP
requests, and Automation subprocess execution through TestKit. Pin
consumers to the tested JDK and check incremental behavior.
Build the plugin and samples, run functional tests, generate
documentation, and load the local-checkout template through the
checked-in wrappers at both ends of the supported Java range.
Describe the independently usable Gradle 8 stage, including shared
projects across supported JDKs, migration from old releases, source and
sample builds, documentation generation, and compatibility checks.
@rcombs
rcombs force-pushed the codex/subkt-gradle-8 branch from ad3ab24 to 32c6b93 Compare October 20, 2026 23:25

@astiob astiob left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it might make more sense to have “Refresh stock wrapper files for Gradle 8.14.6” in the same commit as gradle-wrapper.properties updates. Or perhaps have them swapped, based on this fragment of Gradle docs:

Note that running the wrapper task once will update gradle-wrapper.properties only, but leave the Wrapper itself in gradle-wrapper.jar untouched.

This is usually fine as new versions of Gradle can be run even with older Wrapper files.

If you want all the Wrapper files to be completely up-to-date, you will need to run the wrapper task a second time.

which suggests that having an older JAR with a newer version in the properties file is normal but says nothing about the opposite.

Comment thread build.gradle.kts
samples = listOf("src/samples/kotlin/tasks.kt")
dependencies {
add("dokkaGfmPlugin", "org.jetbrains.dokka:gfm-plugin:2.2.0")
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit, but I’d rather have one of the following:

  1. Move the plugin declaration all the way up to immediately after the plugins block, and move the dependency line inside the existing dependencies block. This avoids having two blocks of dependencies.

  2. It seems this isn’t how the legacy Dokka format plugins are supposed to be registered at all. The way I see officially documented at https://github.com/Kotlin/dokka/blob/v2.2.0/dokka-subprojects/plugin-gfm/README.md is this monstrosity:

    // Dokka v2 ships HTML/Javadoc formats; retain the existing Markdown output too.
    @OptIn(InternalDokkaGradlePluginApi::class)
    abstract class DokkaGfmPlugin : DokkaFormatPlugin("gfm") {
        override fun DokkaFormatPlugin.DokkaFormatPluginContext.configure() {
            project.dependencies {
                dokkaPlugin(dokka("gfm-plugin"))
            }
        }
    }
    apply<DokkaGfmPlugin>()

    with an additional import org.jetbrains.dokka.gradle.internal.InternalDokkaGradlePluginApi

    (and with the add("dokkaGfmPlugin", "org.jetbrains.dokka:gfm-plugin:2.2.0") invocation removed).

    This avoids relying on knowledge of Dokka’s internal configuration and artifact naming (and removes an opportunity for an accidental version conflict), but then this explicitly taps into an “internal API”, so I’m guessing it’s gonna be potentially fragile either way. But at least this is suggested in the official readme, so maybe this will be more reliable or at least easier to adapt in the future if they do change the API? It might be a good idea to add a link to the readme from where this is sourced, too, so that any future changes can be more easily copied from the same source.

    For reference, it appears to me that this does something extra compared to the add("dokkaGfmPlugin"...) line, but I can’t tell if the extra actually matters at all.

Comment thread build.gradle.kts
suffix = "#L"
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl.set(URI("https://github.com/Myaamori/SubKt/blob/$version/src/main/kotlin"))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You may wanna update this URL to point to TypesettingTools/SubKt instead of Myaamori/SubKt while you’re at it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

By the way: all new build.gradle.kts code in your entire PR stack seems to use .set(...). If I understand correctly, simple assignment = works equally well. Simple assignment is visually simpler and more consistent with other code that remains in build.gradle.kts, so I’d prefer that to be used if it works.

Comment thread build.gradle.kts
implementation("commons-codec:commons-codec:1.14")

"samplesImplementation"(sourceSets["main"].output)
testImplementation(gradleTestKit())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be nice to add a blank line before the testImplementation dependencies to separate the different kinds of dependencies.

Comment thread README.md

Download the [project template](https://github.com/Myaamori/SubKt/releases/download/0.1.19/subkt-template-0.1.19.zip) and place the files in the directory where you keep your project files.
Use the files in the [`template`](template) directory for new projects. Older release archives contain an obsolete Gradle wrapper and do not include this JDK upgrade.
Until this upgrade is released, use a local SubKt checkout as described below, passing `--include-build /absolute/path/to/SubKt` when running the template's wrapper.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note to maintainers: README will need to be updated (in several places) upon release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants