Skip to content
Permalink
Browse files

[Build] Readded support for Android

  • Loading branch information
xen2 committed Nov 13, 2018
1 parent d16b2d2 commit 52728eb895d08bb05015e487dbc40f2c7cfbecbf
@@ -14,6 +14,7 @@
<XenkoIsExecutable Condition=" '$(OutputType)' == 'Exe'">true</XenkoIsExecutable>
<XenkoIsExecutable Condition=" '$(OutputType)' == 'WinExe'">true</XenkoIsExecutable>
<XenkoIsExecutable Condition=" '$(OutputType)' == 'AppContainerExe'">true</XenkoIsExecutable>
<XenkoIsExecutable Condition=" '$(AndroidApplication)' == 'true'">true</XenkoIsExecutable>

<!--asset BuildPath for all platforms (same as package)-->
<XenkoCompileAssetBuildPath Condition="'$(XenkoCompileAssetBuildPath)' == ''">$(MSBuildProjectDirectory)\..\Cache\data</XenkoCompileAssetBuildPath>
@@ -87,4 +88,12 @@
</Content>
</ItemGroup>
</Target>

<!-- Android -->
<Target Name="_XenkoDeployAssetsAndroid" BeforeTargets="XenkoCompileAsset" Condition="'$(XenkoPlatform)' == 'Android'">
<!-- Add .bundle to list of uncompressed extensions -->
<PropertyGroup>
<AndroidStoreUncompressedFileExtensions>$(AndroidStoreUncompressedFileExtensions);.bundle</AndroidStoreUncompressedFileExtensions>
</PropertyGroup>
</Target>
</Project>
@@ -107,6 +107,7 @@ private async Task PreLoadPackageDependencies(ILogger log, SolutionProject proje
var outputType = msProject.GetPropertyValue("OutputType");
project.Type = outputType.ToLowerInvariant() == "winexe" || outputType.ToLowerInvariant() == "exe"
|| outputType.ToLowerInvariant() == "appcontainerexe" // UWP
|| msProject.GetPropertyValue("AndroidApplication").ToLowerInvariant() == "true" // Android
? ProjectType.Executable
: ProjectType.Library;

@@ -86,6 +86,8 @@
<_XenkoDepsFile Include="@(ReferenceDependencyPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_XenkoDepsFile Include="@(RuntimeCopyLocalItems->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_XenkoDepsFile Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<!-- Android -->
<_XenkoDepsFile Include="@(_ReferencesFromNuGetPackages->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<None Include="@(_XenkoDepsFile)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>
@@ -149,4 +151,10 @@
</Content>
</ItemGroup>
</Target>
<Target Name="_XenkoSetupNativeLibrariesAndroid" DependsOnTargets="_XenkoBuildDependencies" AfterTargets="ResolveAssemblyReferences" Condition="'$(XenkoPlatform)' == 'Android'">
<ItemGroup>
<AndroidNativeLibrary Include="@(_XenkoDependencyNativeLib)"/>
</ItemGroup>
</Target>

</Project>
@@ -42,7 +42,7 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(XenkoRuntime)' == 'true' ">
<XenkoRuntimeTargetFrameworks Condition="'$(XenkoRuntimeTargetFrameworks)' == ''">net45;uap10.0</XenkoRuntimeTargetFrameworks>
<XenkoRuntimeTargetFrameworks Condition="'$(XenkoRuntimeTargetFrameworks)' == ''">net45;uap10.0;monoandroid50</XenkoRuntimeTargetFrameworks>
<TargetFrameworks>$(XenkoRuntimeTargetFrameworks)</TargetFrameworks>
<!-- UpToDate check doesn't work with multi-TFM projects! https://github.com/dotnet/project-system/issues/2487 -->
<DisableFastUpToDateCheck Condition="$(TargetFrameworks.Contains(';'))">true</DisableFastUpToDateCheck>

0 comments on commit 52728eb

Please sign in to comment.
You can’t perform that action at this time.