// Copyright Epic Games, Inc. All Rights Reserved. using System.Collections.Generic; using EpicGames.Core; using Microsoft.Extensions.Logging; namespace UnrealBuildTool { /// /// Interface to allow exposing public methods from the toolchain to other assemblies /// public interface IAndroidToolChain { /// /// Returns the Android NDK Level /// /// The NDK Level int GetNdkApiLevelInt(int MinNDK); /// /// Returns the Current NDK Version /// /// The NDK Version ulong GetNdkVersionInt(); } /// /// Interface to allow exposing public methods from the Android deployment context to other assemblies /// public interface IAndroidDeploy { /// /// /// /// bool GetPackageDataInsideApk(); /// /// /// /// /// void SetAndroidPluginData(UnrealArchitectures Architectures, List inPluginExtraData); /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// bool PrepForUATPackageOrDeploy(FileReference ProjectFile, string ProjectName, DirectoryReference ProjectDirectory, string ExecutablePath, string EngineDirectory, bool bForDistribution, string CookFlavor, UnrealTargetConfiguration Configuration, bool bIsDataDeploy, bool bSkipGradleBuild, bool bIsArchive); /// /// /// /// /// /// /// bool SavePackageInfo(string ProjectName, string ProjectDirectoryFullName, TargetType Type, bool bIsEmbedded); } /// /// Public Android functions exposed to UAT /// public static class AndroidExports { /// /// /// /// /// /// public static IAndroidDeploy CreateDeploymentHandler(FileReference ProjectFile, bool InForcePackageData) { return new UEDeployAndroid(ProjectFile, InForcePackageData, Log.Logger); } /// /// /// /// public static bool ShouldMakeSeparateApks() { return UEDeployAndroid.ShouldMakeSeparateApks(); } /// /// /// /// /// public static UnrealArch GetUnrealArch(string NDKArch) { return UEDeployAndroid.GetUnrealArch(NDKArch); } /// /// /// /// /// /// Logger for output public static void StripSymbols(FileReference SourceFile, FileReference TargetFile, ILogger Logger) { AndroidToolChain ToolChain = new AndroidToolChain(null, Logger); ToolChain.StripSymbols(SourceFile, TargetFile, Logger); } /// /// /// /// /// /// /// /// /// /// public static bool GetDontBundleLibrariesInAPK(FileReference? ProjectFile, bool? bForceDontBundleLibrariesInAPK, UnrealTargetConfiguration Configuration, bool bIsArchive, bool bFromMSBuild, bool bIsFromUAT, ILogger? Logger) { return UEDeployAndroid.GetDontBundleLibrariesInAPK(ProjectFile, bForceDontBundleLibrariesInAPK, Configuration, bIsArchive, bFromMSBuild, bIsFromUAT, Logger); } /// /// /// /// /// public static string GetAFSExecutable(UnrealTargetPlatform Target, ILogger Logger) { return UEDeployAndroid.GetAFSExecutable(Target, Logger); } } }