1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #100351 from raulsntos/dotnet/android-gradle-fix

[.NET] Fix gradle builds for multiple ABIs
This commit is contained in:
Rémi Verschelde
2024-12-17 22:59:58 +01:00
3 changed files with 13 additions and 6 deletions

View File

@@ -323,7 +323,17 @@ namespace GodotTools.Export
{ {
if (platform == OS.Platforms.Android) if (platform == OS.Platforms.Android)
{ {
if (IsSharedObject(Path.GetFileName(path))) string fileName = Path.GetFileName(path);
if (fileName.EndsWith(".jar"))
{
// We exclude jar files from the export since they should
// already be included in the Godot templates, adding them
// again would cause conflicts.
return;
}
if (IsSharedObject(fileName))
{ {
AddSharedObject(path, tags: new string[] { arch }, AddSharedObject(path, tags: new string[] { arch },
Path.Join(projectDataDirName, Path.Join(projectDataDirName,
@@ -336,7 +346,7 @@ namespace GodotTools.Export
static bool IsSharedObject(string fileName) static bool IsSharedObject(string fileName)
{ {
if (fileName.EndsWith(".so") || fileName.EndsWith(".a") if (fileName.EndsWith(".so") || fileName.EndsWith(".a")
|| fileName.EndsWith(".jar") || fileName.EndsWith(".dex")) || fileName.EndsWith(".dex"))
{ {
return true; return true;
} }

View File

@@ -70,10 +70,7 @@ dependencies {
} }
// .NET dependencies // .NET dependencies
String jar = '../../../../modules/mono/thirdparty/libSystem.Security.Cryptography.Native.Android.jar' monoImplementation fileTree(dir: 'monoLibs', include: ['*.jar'])
if (file(jar).exists()) {
monoImplementation files(jar)
}
} }
android { android {