// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EpicGames.Core;
using Microsoft.Extensions.Logging;
namespace UnrealBuildTool
{
///
/// Interface to allow exposing public methods from the toolchain to other assemblies
///
public interface IAndroidToolChain
{
///
/// Finds the list of supported architectures
///
/// The targeted architectures
List GetAllArchitectures();
///
/// Returns the Android NDK Level
///
/// The NDK Level
int GetNdkApiLevelInt(int MinNDK);
///
/// Returns the Current NDK Version
///
/// The NDK Version
UInt64 GetNdkVersionInt();
}
///
/// Interface to allow exposing public methods from the Android deployment context to other assemblies
///
public interface IAndroidDeploy
{
///
///
///
///
bool GetPackageDataInsideApk();
///
///
///
///
///
void SetAndroidPluginData(List 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 SavePackageInfo(string ProjectName, string ProjectDirectoryFullName, TargetType Type, bool bIsEmbedded);
}
///
/// Public Android functions exposed to UAT
///
public static class AndroidExports
{
///
///
///
///
///
public static IAndroidToolChain CreateToolChain(FileReference ProjectFile)
{
return new AndroidToolChain(ProjectFile, false, null, null, Log.Logger);
}
///
///
///
///
public static IAndroidToolChain CreateTempToolChain()
{
return new AndroidToolChain(null, false, null, null, Log.Logger);
}
///
///
///
///
///
///
public static IAndroidDeploy CreateDeploymentHandler(FileReference ProjectFile, bool InForcePackageData)
{
return new UEDeployAndroid(ProjectFile, InForcePackageData, Log.Logger);
}
///
///
///
///
public static bool ShouldMakeSeparateApks()
{
return UEDeployAndroid.ShouldMakeSeparateApks();
}
///
///
///
///
///
public static string 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, false, null, null, Logger);
ToolChain.StripSymbols(SourceFile, TargetFile, Logger);
}
}
}