Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
972 stars 544 forks source link

Remove Unirest and replace with Java's native HttpClient #4068

Closed WalshyDev closed 8 months ago

WalshyDev commented 10 months ago

Description

When we first implemented Unirest, the goal was always to remove it once we moved to Java 11 minimum. It's been a while since this happened so let's do this.

This reduces the jar size from 4.7 MB (4782834 bytes) to 2.4 MB (2480486 bytes) so we remove ~2.3 MB.

Proposed changes

Removes Unirest with Java's native HttpClient (introduced in Java 11)

Related Issues (if applicable)

N/A

Checklist

github-actions[bot] commented 10 months ago

Your Pull Request was automatically labelled as: "🧹 Chores" Thank you for contributing to this project! ❤️

github-actions[bot] commented 10 months ago

Slimefun preview build

A Slimefun preview build is available for testing! Commit: 296ce2b7

https://preview-builds.walshy.dev/download/Slimefun/4068/296ce2b7

Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!

WalshyDev commented 10 months ago

This code cannot be unit tested, it's all private or ran as part of a task. Making it public doesn't make sense here

sonarcloud[bot] commented 9 months ago

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

7 New issues
0 Security Hotspots
1.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud