Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions Xamarin.Android.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{864062D3
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jcw-gen", "external\Java.Interop\tools\jcw-gen\jcw-gen.csproj", "{52C7D9B6-E8C8-47D0-9471-652D278D7D77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jnimarshalmethod-gen", "external\Java.Interop\tools\jnimarshalmethod-gen\Xamarin.Android.Tools.JniMarshalMethodGenerator.csproj", "{D1295A8F-4F42-461D-A046-564476C10002}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Tools.JavaCallableWrappers", "external\Java.Interop\src\Java.Interop.Tools.JavaCallableWrappers\Java.Interop.Tools.JavaCallableWrappers.csproj", "{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.Tools.ApiXmlAdjuster", "external\Java.Interop\src\Xamarin.Android.Tools.ApiXmlAdjuster\Xamarin.Android.Tools.ApiXmlAdjuster.csproj", "{1268EADF-8344-431C-81F6-FCB7CBC99F49}"
Expand Down Expand Up @@ -186,6 +188,10 @@ Global
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.Build.0 = Release|Any CPU
{D1295A8F-4F42-461D-A046-564476C10002}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{D1295A8F-4F42-461D-A046-564476C10002}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{D1295A8F-4F42-461D-A046-564476C10002}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{D1295A8F-4F42-461D-A046-564476C10002}.Release|AnyCPU.Build.0 = Release|Any CPU
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -367,6 +373,7 @@ Global
{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{B17475BC-45A2-47A3-B8FC-62F3A0959EE0} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{52C7D9B6-E8C8-47D0-9471-652D278D7D77} = {864062D3-A415-4A6F-9324-5820237BA058}
{D1295A8F-4F42-461D-A046-564476C10002} = {864062D3-A415-4A6F-9324-5820237BA058}
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A} = {864062D3-A415-4A6F-9324-5820237BA058}
{1268EADF-8344-431C-81F6-FCB7CBC99F49} = {864062D3-A415-4A6F-9324-5820237BA058}
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A} = {864062D3-A415-4A6F-9324-5820237BA058}
Expand Down
4 changes: 4 additions & 0 deletions build-tools/scripts/java-interop.dllmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<dllmap dll="java-interop" os="osx" target="lib/host-Darwin/libmono-android.debug.dylib" />
<dllmap dll="java-interop" os="linux" target="lib/host-Linux/libmono-android.debug.so" />
<dllmap dll="java-interop" os="windows" wordsize="64" target="lib/host-mxe-Win64/libmono-android.debug.dll" />
<dllmap dll="java-interop" os="windows" wordsize="32" target="lib/host-mxe-Win32/libmono-android.debug.dll" />
14 changes: 14 additions & 0 deletions src/monodroid/monodroid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@
<Name>dependencies</Name>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<!--
`jnimarshalmethod-gen.exe` needs to be built first because our
`_CreateJavaInteropDllConfigs` target replaces
`Java.Runtime.Environment.dll.config`, which will be created as
part of the `jnimarshalmethod-gen.exe` build.

We don't want our updated version to be replaced by the
`jnimarshalmethod-gen.exe` build.
-->
<ProjectReference Include="..\..\external\Java.Interop\tools\jnimarshalmethod-gen\Xamarin.Android.Tools.JniMarshalMethodGenerator.csproj">
<Project>{D1295A8F-4F42-461D-A046-564476C10002}</Project>
<Name>jnimarshalmethod-gen</Name>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\src\mono-runtimes\mono-runtimes.csproj">
<Project>{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}</Project>
<Name>mono-runtimes</Name>
Expand Down
32 changes: 20 additions & 12 deletions src/monodroid/monodroid.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Import Project="monodroid.projitems" />
<Import Project="..\..\build-tools\scripts\RequiredPrograms.targets" />
<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" />
<PropertyGroup>
<_Conf>$(Configuration.ToLowerInvariant())</_Conf>
</PropertyGroup>
Expand Down Expand Up @@ -116,7 +117,7 @@
</ItemGroup>
</Target>
<Target Name="_BuildHostRuntimes"
DependsOnTargets="_GetBuildHostRuntimes;_CreateJavaInteropDllConfig"
DependsOnTargets="_GetBuildHostRuntimes;_CreateJavaInteropDllConfigs"
Inputs="@(_CFile);@(_UnixCFile)"
Outputs="@(_HostRuntime->'$(OutputPath)%(OutputDirectory)\libmono-android.debug.%(NativeLibraryExtension)')">
<Message Text="Building host runtime %(_HostRuntime.Identity) in $(OutputPath)%(_HostRuntime.OutputDirectory)"/>
Expand All @@ -143,20 +144,27 @@
Command="%(_HostRuntime.Strip) %(_HostRuntime.StripFlags) &quot;$(OutputPath)%(_HostRuntime.OutputDirectory)\libmono-android.release.%(_HostRuntime.NativeLibraryExtension)&quot;"
/>
</Target>
<Target Name="_CreateJavaInteropDllConfig"
Inputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll"
Outputs="$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll.config">
<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;
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;osx&quot; target=&quot;lib/host-Darwin/libmono-android.debug.dylib&quot; /&gt;
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;linux&quot; target=&quot;lib/host-Linux/libmono-android.debug.so&quot; /&gt;
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;windows&quot; wordsize=&quot;64&quot; target=&quot;lib/host-mxe-Win64/libmono-android.debug.dll&quot; /&gt;
&lt;dllmap dll=&quot;java-interop&quot; os=&quot;windows&quot; wordsize=&quot;32&quot; target=&quot;lib/host-mxe-Win32/libmono-android.debug.dll&quot; /&gt;
&lt;/configuration&gt;"
Lines="&lt;configuration&gt;;@(_JavaInteropDllMapContent);&lt;/configuration&gt;"
Overwrite="True"
/>
</Target>
/>
<PropertyGroup>
<_DllMaps>@(_JavaInteropDllMapContent->'%(Identity)', '%0a ')</_DllMaps>
</PropertyGroup>
<ReplaceFileContents
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="CoreCompile"
DependsOnTargets="Build">
</Target>
Expand Down