Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c332b74
[Xamarin.Android.Build.Tasks] Generate JNI marshal methods
radekdoulik Sep 6, 2018
fb19053
Use --types option when generating marshal methods for Mono.Android
radekdoulik Sep 13, 2018
995247a
Added documentation for AndroidMonoAndroidJniMarshalTypes property
radekdoulik Sep 14, 2018
e006138
Revert "Added documentation for AndroidMonoAndroidJniMarshalTypes pro…
radekdoulik Sep 17, 2018
c2beb80
Revert "Use --types option when generating marshal methods for Mono.A…
radekdoulik Sep 17, 2018
33e49a9
Add more framework assemblies we want to process
radekdoulik Sep 17, 2018
8459475
[Mono.Android] Do not throw in JniValueManager
radekdoulik Oct 4, 2018
ffc42de
Bump Java.Interop and enable new JNI marshal methods in XF test
radekdoulik Oct 9, 2018
348ec67
Use --debug option when running jnimarshalmethod-gen.exe
radekdoulik Oct 11, 2018
8d2b906
Bump Java.Interop to get ReflectionTypeLoadException fix
radekdoulik Oct 12, 2018
d85923a
Disable _GenerateJniMarshalMethods target on Windows
radekdoulik Oct 12, 2018
df7ba0c
Bump Java.Interop again to get the 2nd type loading fix
radekdoulik Oct 12, 2018
0b0dfb2
Add linker input directory to MONO_PATH
radekdoulik Oct 12, 2018
f166d06
[tests] Run apk tests before JI tests
radekdoulik Oct 15, 2018
82c8d0c
Bump JI
radekdoulik Oct 23, 2018
e349d60
Fix indentation
radekdoulik Oct 24, 2018
4fee750
Add AndroidGenerateJniMarshalMethodsAdditionalArguments
radekdoulik Oct 25, 2018
0b8e786
[Mono.Android] Add Android.Graphics.Color value marshaler
radekdoulik Oct 25, 2018
f924ac2
[Mono.Android] Add IJavaObject custom marshaler
radekdoulik Oct 26, 2018
dcf6421
Bump Java.Interop to make use of IJavaObject custom marshaler
radekdoulik Oct 26, 2018
f5ff71c
Make sure the Java.Interop dll configs are OK
radekdoulik Oct 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions build-tools/scripts/JavaInteropDllConfigs.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.ReplaceFileContents" />
<Target Name="_CreateJavaInteropDllConfigs"
Inputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll;$(JavaInteropSourceDirectory)\src\Java.Runtime.Environment\Java.Runtime.Environment.dll.config"
Outputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll.config;$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Runtime.Environment.dll.config">
<ReadLinesFromFile
File="$(MSBuildThisFileDirectory)java-interop.dllmap">
<Output TaskParameter="Lines" ItemName="_JavaInteropDllMapContent" />
</ReadLinesFromFile>
<WriteLinesToFile
File="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll.config"
Lines="&lt;configuration&gt;;@(_JavaInteropDllMapContent);&lt;/configuration&gt;"
Overwrite="True"
/>
<PropertyGroup>
<_DllMaps>@(_JavaInteropDllMapContent->'%(Identity)', '%0a ')</_DllMaps>
</PropertyGroup>
<ReplaceFileContents
Condition="Exists('$(JavaInteropSourceDirectory)\src\Java.Runtime.Environment\Java.Runtime.Environment.dll.config')"
SourceFile="$(JavaInteropSourceDirectory)\src\Java.Runtime.Environment\Java.Runtime.Environment.dll.config"
DestinationFile="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Runtime.Environment.dll.config"
Replacements="&lt;configuration&gt;=&lt;configuration&gt;%0a $(_DllMaps)"
/>
</Target>
</Project>
2 changes: 1 addition & 1 deletion build-tools/scripts/RunTests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@
</Target>
<ItemGroup>
<_RunParallelTestTarget Include="RunNUnitTests" />
<_RunParallelTestTarget Include="RunJavaInteropTests" />
<_RunParallelTestTarget Include="RunApkTests" />
</ItemGroup>
<ItemGroup>
<_RunTestTarget Include="RunJavaInteropTests" />
<_RunTestTarget Include="RunPerformanceTests" />
</ItemGroup>
<Target Name="RunAllTests">
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
52 changes: 52 additions & 0 deletions src/Mono.Android/Android.Graphics/Color.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;

using Android.Runtime;

using Java.Interop;
using Java.Interop.Expressions;

namespace Android.Graphics
{
[JniValueMarshaler (typeof (ColorValueMarshaler))]
public struct Color
{
private int color;
Expand Down Expand Up @@ -386,4 +392,50 @@ public static void RGBToHSV (int red, int green, int blue, float[] hsv)
public static Color YellowGreen { get { return new Color (0xFF9ACD32); } }
#endregion
}

public class ColorValueMarshaler : JniValueMarshaler<Color>
{
public override Type MarshalType {
get { return typeof (int); }
}

public override Color CreateGenericValue (ref JniObjectReference reference, JniObjectReferenceOptions options, Type targetType)
{
throw new NotImplementedException ();
}

public override JniValueMarshalerState CreateGenericObjectReferenceArgumentState (Color value, ParameterAttributes synchronize)
{
throw new NotImplementedException ();
}

public override void DestroyGenericArgumentState (Color value, ref JniValueMarshalerState state, ParameterAttributes synchronize)
{
throw new NotImplementedException ();
}

public override Expression CreateParameterToManagedExpression (JniValueMarshalerContext context, ParameterExpression sourceValue, ParameterAttributes synchronize, Type targetType)
{
var c = typeof (Color).GetConstructor (new[]{typeof (int)});
var v = Expression.Variable (typeof (Color), sourceValue.Name + "_val");
context.LocalVariables.Add (v);
context.CreationStatements.Add (Expression.Assign (v, Expression.New (c, sourceValue)));

return v;
}

public override Expression CreateParameterFromManagedExpression (JniValueMarshalerContext context, ParameterExpression sourceValue, ParameterAttributes synchronize)
{
var r = Expression.Variable (MarshalType, sourceValue.Name + "_p");
context.LocalVariables.Add (r);
context.CreationStatements.Add (Expression.Assign (r, Expression.Field (sourceValue, "color")));

return r;
}

public override Expression CreateReturnValueFromManagedExpression (JniValueMarshalerContext context, ParameterExpression sourceValue)
{
return CreateParameterFromManagedExpression (context, sourceValue, 0);
}
}
}
6 changes: 1 addition & 5 deletions src/Mono.Android/Android.Runtime/AndroidRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,10 @@ public override void WaitForGCBridgeProcessing ()

public override void AddPeer (IJavaPeerable value)
{
throw new NotImplementedException ();
}

public override void RemovePeer (IJavaPeerable value)
{
throw new NotImplementedException ();
}

public override IJavaPeerable PeekPeer (JniObjectReference reference)
Expand All @@ -378,17 +376,15 @@ public override IJavaPeerable PeekPeer (JniObjectReference reference)

public override void CollectPeers ()
{
throw new NotImplementedException ();
}

public override void FinalizePeer (IJavaPeerable value)
{
throw new NotImplementedException ();
}

public override List<JniSurfacedPeerInfo> GetSurfacedPeers ()
{
throw new NotImplementedException ();
return null;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Mono.Android/Android.Runtime/IJavaObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Android.Runtime {

[Java.Interop.JniValueMarshaler (typeof (IJavaObjectValueMarshaler))]
public interface IJavaObject : IDisposable {
IntPtr Handle { get; }
}
Expand Down
54 changes: 54 additions & 0 deletions src/Mono.Android/Android.Runtime/IJavaObjectValueMarshaler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;

using Java.Interop;
using Java.Interop.Expressions;

namespace Android.Runtime
{
sealed class IJavaObjectValueMarshaler : JniValueMarshaler<IJavaObject> {

internal static IJavaObjectValueMarshaler Instance = new IJavaObjectValueMarshaler ();

public override IJavaObject CreateGenericValue (ref JniObjectReference reference, JniObjectReferenceOptions options, Type targetType)
{
throw new NotImplementedException ();
}

public override JniValueMarshalerState CreateGenericObjectReferenceArgumentState (IJavaObject value, ParameterAttributes synchronize)
{
throw new NotImplementedException ();
}

public override void DestroyGenericArgumentState (IJavaObject value, ref JniValueMarshalerState state, ParameterAttributes synchronize)
{
throw new NotImplementedException ();
}

public override Expression CreateReturnValueFromManagedExpression (JniValueMarshalerContext context, ParameterExpression sourceValue)
{
return Expression.Call (
typeof (JNIEnv),
"ToLocalJniHandle",
null,
sourceValue);
}

public override Expression CreateParameterToManagedExpression (JniValueMarshalerContext context, ParameterExpression sourceValue, ParameterAttributes synchronize, Type targetType)
{
var r = Expression.Variable (targetType, sourceValue.Name + "_val");
context.LocalVariables.Add (r);
context.CreationStatements.Add (
Expression.Assign (r,
Expression.Call (
typeof (JavaConvert),
"FromJniHandle",
new[]{targetType},
sourceValue,
Expression.Field (null, typeof (JniHandleOwnership), "DoNotTransfer"))));
return r;
}
}
}
1 change: 1 addition & 0 deletions src/Mono.Android/Mono.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<Link>JavaNativeTypeManager.cs</Link>
</Compile>
<Compile Include="Android.Runtime\DynamicMethodNameCounter.cs" />
<Compile Include="Android.Runtime\IJavaObjectValueMarshaler.cs" />
</ItemGroup>
<Import Project="..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems')" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Expand Down
1 change: 1 addition & 0 deletions src/Mono.Android/Test/Mono.Android-Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AndroidLinkTool Condition=" '$(AndroidLinkTool)' == '' ">r8</AndroidLinkTool>
<AndroidGenerateJniMarshalMethods>True</AndroidGenerateJniMarshalMethods>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
5 changes: 5 additions & 0 deletions src/Mono.Android/Test/Mono.Android-Tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</ItemGroup>
<Import Project="Mono.Android-Tests.projitems" />
<Import Project="..\..\..\build-tools\scripts\TestApks.targets" />
<Import Project="..\..\..\build-tools\scripts\JavaInteropDllConfigs.targets" />
<Target Name="BuildNativeLibs"
BeforeTargets="Build"
DependsOnTargets="AndroidPrepareForBuild"
Expand All @@ -16,4 +17,8 @@
<Error Text="Could not locate Android NDK." Condition="!Exists ('$(NdkBuildPath)')" />
<Exec Command="&quot;$(NdkBuildPath)&quot;" />
</Target>
<Target Name="EnsureJavaInteropDllConfigs"
BeforeTargets="_GenerateJniMarshalMethods"
DependsOnTargets="_CreateJavaInteropDllConfigs">
</Target>
</Project>
30 changes: 30 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Tasks/ResolveSdksTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using Microsoft.Build.Utilities;
using System;
using System.IO;
using System.Linq;

namespace Xamarin.Android.Tasks
{
Expand All @@ -49,6 +50,9 @@ public class ResolveSdks : Task
[Output]
public string JavaSdkPath { get; set; }

[Output]
public string JdkJvmPath { get; set; }

[Output]
public string MonoAndroidToolsPath { get; set; }

Expand Down Expand Up @@ -92,12 +96,38 @@ public override bool Execute ()
return false;
}

try {
Log.LogDebugMessage ($"JavaSdkPath: {JavaSdkPath}");
Xamarin.Android.Tools.JdkInfo info = null;
try {
info = new Xamarin.Android.Tools.JdkInfo (JavaSdkPath);
} catch {
info = Xamarin.Android.Tools.JdkInfo.GetKnownSystemJdkInfos (this.CreateTaskLogger ()).FirstOrDefault ();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radekdoulik do you know if these calls to find java take a while?

ResolveSdks runs on every project, every build. I might have to add some caching logic to this task after we merge this, I think this task takes ~20ms before these changes on my machine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this should be cached in the AppDomain, as we cache other constructs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @radekdoulik you could do similar to what we have here, using the incoming JavaSdkPath as part of the key: https://github.com/xamarin/xamarin-android/blob/9e21b1d07aa6dc7b0caa2cf3ea6124d26e4cfd57/src/Xamarin.Android.Build.Tasks/Tasks/ValidateJavaVersion.cs#L102-L108

I will do this as part of finding the Android SDK, too; in a different PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I will try it. Now it takes about 123ms.

      370 ms  ResolveSdks                                3 calls


JdkJvmPath = info.JdkJvmPath;

if (string.IsNullOrEmpty (JdkJvmPath)) {
Log.LogCodedError ("XA5300", $"{nameof (JdkJvmPath)} is blank");
return false;
}

if (!File.Exists (JdkJvmPath)) {
Log.LogCodedError ("XA5300", $"JdkJvmPath not found at {JdkJvmPath}");
return false;
}
} catch (Exception e) {
Log.LogCodedError ("XA5300", $"Unable to find {nameof (JdkJvmPath)}{Environment.NewLine}{e}");
return false;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radekdoulik quick question about this task. There is a Visual Studio team very focused on the performance of "solution create", which is basically the initial design-time build from our targets.

Since looking up JdkJvmPath takes extra time, could it:

  • Not run on DesignTimeBuild=True?
  • Not run unless AndroidGenerateJniMarshalMethods=True?
  • It also might be worth splitting this out into another MSBuild task?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now only used by jnimarshalmethod-gen, so we can look it up only when AndroidGenerateJniMarshalMethods is true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, cool. I might look at making those changes ^^ I'll have you review.

Might not happen this week, though. 😃

MonoAndroidHelper.TargetFrameworkDirectories = ReferenceAssemblyPaths;

Log.LogDebugMessage ($"{nameof (ResolveSdks)} Outputs:");
Log.LogDebugMessage ($" {nameof (AndroidSdkPath)}: {AndroidSdkPath}");
Log.LogDebugMessage ($" {nameof (AndroidNdkPath)}: {AndroidNdkPath}");
Log.LogDebugMessage ($" {nameof (JavaSdkPath)}: {JavaSdkPath}");
Log.LogDebugMessage ($" {nameof (JdkJvmPath)}: {JdkJvmPath}");
Log.LogDebugMessage ($" {nameof (MonoAndroidBinPath)}: {MonoAndroidBinPath}");
Log.LogDebugMessage ($" {nameof (MonoAndroidToolsPath)}: {MonoAndroidToolsPath}");

Expand Down
25 changes: 24 additions & 1 deletion src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<Output TaskParameter="AndroidNdkPath" PropertyName="_AndroidNdkDirectory" />
<Output TaskParameter="AndroidSdkPath" PropertyName="_AndroidSdkDirectory" />
<Output TaskParameter="JavaSdkPath" PropertyName="_JavaSdkDirectory" />
<Output TaskParameter="JdkJvmPath" PropertyName="JdkJvmPath" Condition="'$(JdkJvmPath)' == ''" />
<Output TaskParameter="MonoAndroidToolsPath" PropertyName="MonoAndroidToolsDirectory" />
<Output TaskParameter="MonoAndroidBinPath" PropertyName="MonoAndroidBinDirectory" />
</ResolveSdks>
Expand Down Expand Up @@ -1172,6 +1173,7 @@ because xbuild doesn't support framework reference assemblies.
<_AndroidResgenFlagFile>$(IntermediateOutputPath)R.cs.flag</_AndroidResgenFlagFile>
<_AndroidResFlagFile>$(IntermediateOutputPath)res.flag</_AndroidResFlagFile>
<_AndroidComponentResgenFlagFile>$(IntermediateOutputPath)Component.R.cs.flag</_AndroidComponentResgenFlagFile>
<_AndroidJniMarshalMethodsFlag>$(IntermediateOutputPath)jnimarshalmethods.flag</_AndroidJniMarshalMethodsFlag>
<_AndroidLinkFlag>$(IntermediateOutputPath)link.flag</_AndroidLinkFlag>
<_AndroidApkPerAbiFlagFile>$(IntermediateOutputPath)android\bin\apk_per_abi.flag</_AndroidApkPerAbiFlagFile>
<_AndroidDebugKeyStoreFlag>$(IntermediateOutputPath)android_debug_keystore.flag</_AndroidDebugKeyStoreFlag>
Expand Down Expand Up @@ -2107,7 +2109,28 @@ because xbuild doesn't support framework reference assemblies.
</Target>

<Target Name="_LinkAssemblies"
DependsOnTargets="_ResolveAssemblies;_CreatePackageWorkspace;_LinkAssembliesNoShrink;_LinkAssembliesShrink" />
DependsOnTargets="_ResolveAssemblies;_CreatePackageWorkspace;_GenerateJniMarshalMethods;_LinkAssembliesNoShrink;_LinkAssembliesShrink" />

<Target Name="_GenerateJniMarshalMethods"
Condition="'$(AndroidGenerateJniMarshalMethods)' == 'True' And '$(AndroidLinkMode)' != 'None' And '$(OS)' != 'Windows_NT'"
DependsOnTargets="_GetReferenceAssemblyPaths;_SetLatestTargetFrameworkVersion"
Inputs="@(ResolvedUserAssemblies->'$(MonoAndroidLinkerInputDir)%(Filename)%(Extension)')"
Outputs="$(_AndroidJniMarshalMethodsFlag)">
<ItemGroup>
<_JniFrameworkAssembly Include="Mono.Android.dll" />
<_JniFrameworkAssembly Include="OpenTK-1.0.dll" />
<_JniFrameworkAssembly Include="OpenTK.dll" />
<_JniFrameworkAssembly Include="Xamarin.Android.NUnitLite.dll" />
</ItemGroup>
<ItemGroup>
<_AssembliesToProcess Include="@(ResolvedUserAssemblies)" />
<_AssembliesToProcess Include="@(ResolvedAssemblies)" Condition=" '%(Filename)' != '' And '@(_JniFrameworkAssembly)' != '' " />
</ItemGroup>
<Exec
Command="MONO_PATH=&quot;$(_XATargetFrameworkDirectories):$(MonoAndroidLinkerInputDir)&quot; &quot;$(MonoAndroidBinDirectory)\mono&quot; --debug &quot;$(MonoAndroidToolsDirectory)\jnimarshalmethod-gen.exe&quot; --jvm=&quot;$(JdkJvmPath)&quot; $(AndroidGenerateJniMarshalMethodsAdditionalArguments) @(_AssembliesToProcess->'&quot;$(MonoAndroidLinkerInputDir)%(Filename)%(Extension)&quot;', ' ')"
/>
<Touch Files="$(_AndroidJniMarshalMethodsFlag)" AlwaysCreate="True" />
</Target>

<Target Name="_LinkAssembliesNoShrink"
Condition="'$(AndroidLinkMode)' == 'None'"
Expand Down
24 changes: 1 addition & 23 deletions src/monodroid/monodroid.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Import Project="monodroid.props" />
<Import Project="monodroid.projitems" />
<Import Project="..\..\build-tools\scripts\RequiredPrograms.targets" />
<Import Project="..\..\build-tools\scripts\JavaInteropDllConfigs.targets" />
<Import Project="sources.projitems" Condition="Exists ('sources.projitems')" />
<UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.GenerateMonoDroidIncludes" />
<UsingTask AssemblyFile="..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.ReplaceFileContents" />
Expand Down Expand Up @@ -131,29 +132,6 @@
</ItemGroup>
</Target>

<Target Name="_CreateJavaInteropDllConfigs"
Inputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll;$(JavaInteropSourceDirectory)\src\Java.Runtime.Environment\Java.Runtime.Environment.dll.config"
Outputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll.config;$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Runtime.Environment.dll.config">
<ReadLinesFromFile
File="../../build-tools/scripts/java-interop.dllmap">
<Output TaskParameter="Lines" ItemName="_JavaInteropDllMapContent" />
</ReadLinesFromFile>
<WriteLinesToFile
File="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll.config"
Lines="&lt;configuration&gt;;@(_JavaInteropDllMapContent);&lt;/configuration&gt;"
Overwrite="True"
/>
<PropertyGroup>
<_DllMaps>@(_JavaInteropDllMapContent->'%(Identity)', '%0a ')</_DllMaps>
</PropertyGroup>
<ReplaceFileContents
Condition="Exists('$(JavaInteropSourceDirectory)\src\Java.Runtime.Environment\Java.Runtime.Environment.dll.config')"
SourceFile="$(JavaInteropSourceDirectory)\src\Java.Runtime.Environment\Java.Runtime.Environment.dll.config"
DestinationFile="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Runtime.Environment.dll.config"
Replacements="&lt;configuration&gt;=&lt;configuration&gt;%0a $(_DllMaps)"
/>
</Target>

<Target Name="_CreateMacMxeCmakeToolchainFiles"
Inputs="mxe-32.cmake.in;mxe-64.cmake.in"
Outputs="$(IntermediateOutputPath)\mxe-32.cmake;$(IntermediateOutputPath)\mxe-64.cmake">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis>
<AndroidLinkTool Condition=" '$(AndroidLinkTool)' == '' ">r8</AndroidLinkTool>
<AndroidGenerateJniMarshalMethods>True</AndroidGenerateJniMarshalMethods>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -154,6 +155,7 @@
<AndroidResource Include="Resources\values\styles.xml" />
</ItemGroup>
<Import Project="..\Xamarin.Forms.Performance.Integration.projitems" Label="Shared" Condition="Exists('..\Xamarin.Forms.Performance.Integration.projitems')" />
<Import Project="Xamarin.Forms.Performance.Integration.Droid.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\..\..\packages\Xamarin.Android.Support.Annotations.27.0.2.1\build\MonoAndroid81\Xamarin.Android.Support.Annotations.targets" Condition="Exists('..\..\..\packages\Xamarin.Android.Support.Annotations.27.0.2.1\build\MonoAndroid81\Xamarin.Android.Support.Annotations.targets')" />
<Import Project="..\..\..\packages\Xamarin.Android.Arch.Core.Common.1.0.0.1\build\MonoAndroid80\Xamarin.Android.Arch.Core.Common.targets" Condition="Exists('..\..\..\packages\Xamarin.Android.Arch.Core.Common.1.0.0.1\build\MonoAndroid80\Xamarin.Android.Arch.Core.Common.targets')" />
Expand Down
Loading