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

Gradle using wrong encoding #36

Open
Leguan16 opened this issue May 4, 2024 · 0 comments
Open

Gradle using wrong encoding #36

Leguan16 opened this issue May 4, 2024 · 0 comments

Comments

@Leguan16
Copy link

Leguan16 commented May 4, 2024

When I try to build the version it prints a weird error message:

> Task :versions:v1_20_6:compileJava
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\ChatFormatting.java:40: error: unclosed character literal
    public static final char PREFIX_CODE = '§';
                                           ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\ChatFormatting.java:40: error: illegal character: '\u00a7'
    public static final char PREFIX_CODE = '§';
                                             ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\ChatFormatting.java:40: error: unclosed character literal
    public static final char PREFIX_CODE = '§';
                                              ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: unclosed character literal
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                              ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: illegal character: '\u00a7'
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                                ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: unclosed character literal
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                                 ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: not a statement
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                                                          ^
7 errors

FAILURE: Build failed with an exception.

This is due to incorrect encoding settings.

Setting this property in gradle.properties fixes the issue.

org.gradle.jvmargs='-Dfile.encoding=UTF-8'
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

No branches or pull requests

1 participant