Repository navigation
Conversation
645167f to
ad3ab24
Compare
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.
ad3ab24 to
32c6b93
Compare
astiob
left a comment
There was a problem hiding this comment.
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
wrappertask once will updategradle-wrapper.propertiesonly, but leave the Wrapper itself ingradle-wrapper.jaruntouched.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.
| samples = listOf("src/samples/kotlin/tasks.kt") | ||
| dependencies { | ||
| add("dokkaGfmPlugin", "org.jetbrains.dokka:gfm-plugin:2.2.0") | ||
| } |
There was a problem hiding this comment.
Nit, but I’d rather have one of the following:
-
Move the plugin declaration all the way up to immediately after the
pluginsblock, and move the dependency line inside the existingdependenciesblock. This avoids having two blocks ofdependencies. -
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.
| suffix = "#L" | ||
| sourceLink { | ||
| localDirectory.set(file("src/main/kotlin")) | ||
| remoteUrl.set(URI("https://github.com/Myaamori/SubKt/blob/$version/src/main/kotlin")) |
There was a problem hiding this comment.
You may wanna update this URL to point to TypesettingTools/SubKt instead of Myaamori/SubKt while you’re at it.
There was a problem hiding this comment.
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.
| implementation("commons-codec:commons-codec:1.14") | ||
|
|
||
| "samplesImplementation"(sourceSets["main"].output) | ||
| testImplementation(gradleTestKit()) |
There was a problem hiding this comment.
It would be nice to add a blank line before the testImplementation dependencies to separate the different kinds of dependencies.
|
|
||
| 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. |
There was a problem hiding this comment.
Note to maintainers: README will need to be updated (in several places) upon release.
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