Charset.defaultCharset() sadly cannot be used to write files that are always read using the Platforms native encoding, since a user can override it. Use the new native.encoding property instead, which cannot be overridden and contains the actual system encoding used for program arguments, etc.
Also update DevLaunch to always use UTF-8 to make it 1) reliable and 2) bring it in line with FML JUnit which parses the same argument file using UTF-8 already.
PR Publishing
### The artifacts published by this PR:
- :package: [`net.neoforged:moddev-gradle:0.1.124-pr-80-real-charset-fix`](https://github.com/neoforged/ModDevGradle/packages/2195526)
- :package: [`net.neoforged.moddev:net.neoforged.moddev.gradle.plugin:0.1.124-pr-80-real-charset-fix`](https://github.com/neoforged/ModDevGradle/packages/2195529)
- :package: [`net.neoforged.moddev.repositories:net.neoforged.moddev.repositories.gradle.plugin:0.1.124-pr-80-real-charset-fix`](https://github.com/neoforged/ModDevGradle/packages/2195530)
### Repository Declaration
In order to use the artifacts published by the PR, add the following repository to your buildscript:
```gradle
repositories {
maven {
name 'Maven for PR #80' // https://github.com/neoforged/ModDevGradle/pull/80
url 'https://prmaven.neoforged.net/ModDevGradle/pr80'
content {
includeModule('net.neoforged', 'moddev-gradle')
includeModule('net.neoforged.moddev', 'net.neoforged.moddev.gradle.plugin')
includeModule('net.neoforged.moddev.repositories', 'net.neoforged.moddev.repositories.gradle.plugin')
}
}
}
```
Charset.defaultCharset() sadly cannot be used to write files that are always read using the Platforms native encoding, since a user can override it. Use the new
native.encoding
property instead, which cannot be overridden and contains the actual system encoding used for program arguments, etc.Also update DevLaunch to always use UTF-8 to make it 1) reliable and 2) bring it in line with FML JUnit which parses the same argument file using UTF-8 already.