Skip to content

Gradle using wrong encoding #36

Description

@Leguan16

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions