You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[.NET] Require net9.0 for Android exports
To ensure Android exports are compatible with the new Play Store requirement that all `.so` libraries included are aligned to 16k, we now require C# projects to target `net9.0` which uses the correct alignment (as opposed to the current one of 4k). The thirdparty jar library has also been updated to the one from the 9.0.4 runtime package so it's compatible with non-gradle builds targeting `net9.0`. Non-android projects are not affect, the minimum TFM is still `net8.0`.
This commit is contained in:
@@ -2739,6 +2739,7 @@ bool _validate_dotnet_tfm(const String &required_tfm, String &r_error) {
|
||||
List<String> args;
|
||||
args.push_back("build");
|
||||
args.push_back(project_path);
|
||||
args.push_back("/p:GodotTargetPlatform=android");
|
||||
args.push_back("--getProperty:TargetFramework");
|
||||
|
||||
int exitcode;
|
||||
@@ -2778,9 +2779,9 @@ bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref<Edito
|
||||
err += TTR("Exporting to Android when using C#/.NET is experimental.") + "\n";
|
||||
|
||||
if (!gradle_build_enabled) {
|
||||
// For template exports we only support .NET 8 because the template
|
||||
// includes .jar dependencies that may only be compatible with .NET 8.
|
||||
if (!_validate_dotnet_tfm("net8.0", err)) {
|
||||
// For template exports we only support .NET 9 because the template
|
||||
// includes .jar dependencies that may only be compatible with .NET 9.
|
||||
if (!_validate_dotnet_tfm("net9.0", err)) {
|
||||
r_error = err;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user