Skip to content

Remove old deprecated APIs #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 13, 2025
Merged

Remove old deprecated APIs #65

merged 2 commits into from
Apr 13, 2025

Conversation

osipxd
Copy link
Member

@osipxd osipxd commented Apr 13, 2025

These API were deprecated four years ago, so I think it should be safe to remove them now. Even though it is not 1.0 release.

@osipxd osipxd added this to the Next milestone Apr 13, 2025
@osipxd osipxd self-assigned this Apr 13, 2025
Copy link

coderabbitai bot commented Apr 13, 2025

Walkthrough

The pull request removes deprecated API elements and updates configuration syntax across several files. The CHANGELOG.md now records the removal of old APIs along with updates to the JVM and Gradle versions. Deprecated fields, methods, and logger extensions have been removed from core Kotlin files, while test files have been updated to use Kotlin DSL syntax and revised configuration blocks. No new public API declarations were added.

Changes

File(s) Change Summary
CHANGELOG.md Added an entry for removal of deprecated APIs; updated target JVM version from 1.8 to 17 and Gradle from 7.2 to 8.13.
src/.../BukkitExtension.kt, src/.../extensions/Logger.kt, src/.../plugin/extension/PluginConfigurationImpl.kt Removed deprecated logger, properties, and methods (including run, setVersion, and several setter methods) to streamline the API.
src/test/groovy/ru/endlesscode/bukkitgradle/PluginSpecification.groovy Updated file references and syntax to Kotlin DSL, modifying plugin ID, version, and group declarations.
src/test/groovy/ru/endlesscode/bukkitgradle/plugin/task/MergePluginYamlSpec.groovy Modified plugin property syntax by switching from single quotes to double quotes, updated the URL, list syntax, and renamed a test method for clarity.
src/test/groovy/ru/endlesscode/bukkitgradle/server/task/PrepareServerSpec.groovy Changed the configuration block from run to server for setting the online mode.

Sequence Diagram(s)

sequenceDiagram
    participant Test as PrepareServerSpec
    participant Plugin as Plugin Config
    Test->>Plugin: Invoke configuration block: server { onlineMode = false }
    Plugin-->>Test: Apply online mode setting
Loading
sequenceDiagram
    participant Test as MergePluginYamlSpec
    participant YAMLMerger as Plugin YAML Merger
    Test->>YAMLMerger: Merge plugin.yaml with updated properties
    YAMLMerger-->>Test: Write updated plugin.yaml file
Loading

Poem

Oh, what a joyful day in code,
Deprecated bits hopped away in a mode.
New syntax shines where old methods sleep,
JVM and Gradle updates run deep.
I twitch my ears in rhythmic delight,
Celebrating clean code from morning to night!
🐇✨

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 776be44 and f45fbd3.

📒 Files selected for processing (7)
  • CHANGELOG.md (1 hunks)
  • src/main/kotlin/BukkitExtension.kt (0 hunks)
  • src/main/kotlin/extensions/Logger.kt (0 hunks)
  • src/main/kotlin/plugin/extension/PluginConfigurationImpl.kt (0 hunks)
  • src/test/groovy/ru/endlesscode/bukkitgradle/PluginSpecification.groovy (1 hunks)
  • src/test/groovy/ru/endlesscode/bukkitgradle/plugin/task/MergePluginYamlSpec.groovy (3 hunks)
  • src/test/groovy/ru/endlesscode/bukkitgradle/server/task/PrepareServerSpec.groovy (1 hunks)
💤 Files with no reviewable changes (3)
  • src/main/kotlin/BukkitExtension.kt
  • src/main/kotlin/extensions/Logger.kt
  • src/main/kotlin/plugin/extension/PluginConfigurationImpl.kt
🔇 Additional comments (12)
CHANGELOG.md (1)

35-35: Documentation update looks good

The addition of "Remove old deprecated APIs" to the changelog accurately reflects the changes in this PR, aligning with the PR objective.

src/test/groovy/ru/endlesscode/bukkitgradle/server/task/PrepareServerSpec.groovy (1)

36-36: Correctly updated to use non-deprecated API

The configuration has been updated from the deprecated run property to the recommended server property, which aligns with the modernization of the API.

src/test/groovy/ru/endlesscode/bukkitgradle/PluginSpecification.groovy (3)

25-26: File extension update to Kotlin DSL is appropriate

The change from .gradle to .gradle.kts extensions correctly reflects the transition to Kotlin DSL for build files.


28-28: Language specification update is correct

Updated language comment from Groovy to Kotlin to match the new DSL.


31-31: Syntax updated correctly for Kotlin DSL

The change from single quotes to double quotes for string literals and the use of Kotlin syntax for plugin ID declaration are appropriate for Kotlin DSL.

Also applies to: 34-35

src/test/groovy/ru/endlesscode/bukkitgradle/plugin/task/MergePluginYamlSpec.groovy (7)

124-125: Language specification update is correct

Updated language comment from Groovy to Kotlin to match the new DSL.


128-135: Property setting syntax correctly updated for Kotlin DSL

The property setting syntax has been properly updated to use double quotes for string literals and Kotlin's listOf() function for collections, which is appropriate for Kotlin DSL.


150-150: Security improvement by using HTTPS

Updated URL from HTTP to HTTPS, which is a good security practice.


154-154: Method name change improves clarity

The test method name has been updated to more accurately describe what's being tested - the change from "old way" to "with assignment" better reflects the actual test scenario.


156-157: Language specification update is correct

Updated language comment from Groovy to Kotlin to match the new DSL.


160-166: Property assignment syntax correctly updated for Kotlin DSL

The direct property assignment syntax has been properly updated to use double quotes for string literals and Kotlin's listOf() function for collections, which is appropriate for Kotlin DSL.


181-181: Security improvement by using HTTPS

Updated URL from HTTP to HTTPS, which is a good security practice.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@osipxd osipxd merged commit f45fbd3 into develop Apr 13, 2025
3 checks passed
@osipxd osipxd deleted the remove-deprecations branch April 13, 2025 23:05
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.

1 participant