Skip to content

Add gradle task to verify bytecode version of compiled classes#2954

Merged
MinnDevelopment merged 1 commit into
masterfrom
feature/verify-bytecode-version
Nov 2, 2025
Merged

Add gradle task to verify bytecode version of compiled classes#2954
MinnDevelopment merged 1 commit into
masterfrom
feature/verify-bytecode-version

Conversation

@MinnDevelopment

Copy link
Copy Markdown
Member

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: Build verification

Closes Issue: NaN

Description

This is just a small sanity check task to ensure we don't accidentally break our compatibility with build script changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds bytecode version verification to ensure all compiled Java classes use the correct bytecode version (Java 8/version 52). This helps enforce compatibility requirements by detecting classes that may have been compiled with an incorrect Java version.

  • Introduced a new Gradle task VerifyBytecodeVersion to validate compiled class files
  • Configured the task to run automatically after Java compilation
  • Modified the compileJava task declaration to use a typed reference

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
buildSrc/src/main/kotlin/net/dv8tion/jda/tasks/VerifyBytecodeVersion.kt New Gradle task that reads and verifies bytecode major version from compiled class files
build.gradle.kts Registers and configures the verification task to run after compileJava, checking for bytecode version 52 (Java 8)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MinnDevelopment MinnDevelopment added this pull request to the merge queue Nov 2, 2025
Merged via the queue into master with commit 6756cba Nov 2, 2025
7 checks passed
@MinnDevelopment MinnDevelopment deleted the feature/verify-bytecode-version branch November 2, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants