Skip to content
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

Fix CurseForge JavaVersion for Java 1.8 #168

Merged

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Feb 5, 2024

Using JavaVersion.toString() returns "1.8" for JAVA_1_8, however modpublisher expects "Java 8".

We can instead use JavaVersion.getMajorVersion().

I've tested this using following gradle snippet:

JavaVersion.values().each {
  logger.warn "Java ${it} - ${it.getMajorVersion()}"
}

Which outputs the following logs:

Log

Java 1.1 - 1
Java 1.2 - 2
Java 1.3 - 3
Java 1.4 - 4
Java 1.5 - 5
Java 1.6 - 6
Java 1.7 - 7
Java 1.8 - 8
Java 9 - 9
Java 10 - 10
Java 11 - 11
Java 12 - 12
Java 13 - 13
Java 14 - 14
Java 15 - 15
Java 16 - 16
Java 17 - 17
Java 18 - 18
Java 19 - 19
Java 20 - 20
Java 21 - 21
Java 22 - 22
Java 23 - 23
Java 24 - 24
Java 25 - 25
Java 26 - 26

@MattSturgeon MattSturgeon added bug Something isn't working dev Only affects developers labels Feb 5, 2024
@MattSturgeon MattSturgeon self-assigned this Feb 5, 2024
@hashalite hashalite merged commit f6811e6 into MinecraftFreecam:main Feb 5, 2024
@MattSturgeon MattSturgeon deleted the build/curseforge-java-version branch February 5, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev Only affects developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants