Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try xamarin/java.interop#1046 #7824

Merged
merged 3 commits into from
Feb 28, 2023
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
6 changes: 0 additions & 6 deletions build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,6 @@
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jcw-gen.pdb" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jit-times.exe" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jit-times.pdb" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jnimarshalmethod-gen.exe" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jnimarshalmethod-gen.pdb" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Interop.dll.config" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.dll" /> <!-- Required by jnimarshalmethod-gen.exe -->
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.pdb" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.dll.config" Condition=" '$(HostOS)' != 'Windows' " />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)logcat-parse.exe" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)logcat-parse.pdb" />
<_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Mono.CSharp.dll" /> <!-- Required by logcat-parse.exe -->
Expand Down
26 changes: 0 additions & 26 deletions build-tools/scripts/JavaInteropDllConfigs.targets

This file was deleted.

2 changes: 1 addition & 1 deletion external/Java.Interop
17 changes: 1 addition & 16 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1456,22 +1456,7 @@ because xbuild doesn't support framework reference assemblies.
DependsOnTargets="_GetReferenceAssemblyPaths;_SetLatestTargetFrameworkVersion"
Inputs="$(_AndroidBuildPropertiesCache);@(ResolvedUserAssemblies)"
Outputs="$(_AndroidStampDirectory)_GenerateJniMarshalMethods.stamp">
<ItemGroup>
<_JniFrameworkAssembly Include="Mono.Android.dll" />
<_JniFrameworkAssembly Include="OpenTK.dll" />
<_JniFrameworkAssembly Include="Xamarin.Android.NUnitLite.dll" />
<_AssembliesToProcess Include="@(ResolvedUserAssemblies)" />
<_AssembliesToProcess Include="@(ResolvedFrameworkAssemblies)" Condition=" '%(Filename)' == '@(_JniFrameworkAssembly->'%(Filename)')' " />
</ItemGroup>
<RemoveDirFixed Directories="$(_JniMarshalMethodsOutputDir)" />
<MakeDir Directories="$(_JniMarshalMethodsOutputDir)" />
<Exec
Command="DYLD_LIBRARY_PATH=&quot;$(MonoAndroidLibDirectory)&quot; MONO_CONFIG=&quot;$(MonoAndroidBinDirectory)mono.config&quot; MONO_PATH=&quot;$(MonoAndroidBinDirectory)\bcl&quot;:&quot;$(MonoAndroidBinDirectory)\bcl\Facades&quot;:&quot;$(_XATargetFrameworkDirectories)&quot; &quot;$(MonoAndroidBinDirectory)mono&quot; --debug &quot;$(MonoAndroidToolsDirectory)\jnimarshalmethod-gen.exe&quot; --jvm=&quot;$(JdkJvmPath)&quot; @(ResolvedAssemblies->'--r=&quot;%(Identity)&quot;', ' ') --o=&quot;$(_JniMarshalMethodsOutputDir)&quot; $(AndroidGenerateJniMarshalMethodsAdditionalArguments) @(_AssembliesToProcess->'&quot;%(Identity)&quot;', ' ')"
/>
<Touch Files="$(_AndroidStampDirectory)_GenerateJniMarshalMethods.stamp" AlwaysCreate="True" />
<ItemGroup>
<FileWrites Include="$(_AssembliesToProcess)" />
</ItemGroup>
<Error Text="%24(AndroidGenerateJniMarshalMethods)=True is not supported at this time." />
</Target>

<Target Name="_LinkAssembliesNoShrinkInputs">
Expand Down
10 changes: 0 additions & 10 deletions src/monodroid/monodroid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,5 @@

<ItemGroup>
<ProjectReference Include="..\java-runtime\java-runtime.csproj" ReferenceOutputAssembly="False" />
<!--
`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" ReferenceOutputAssembly="False" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions src/monodroid/monodroid.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<Import Project="..\..\external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props" Condition="Exists('..\..\external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props')"/>
<Import Project="..\..\bin\Build$(Configuration)\cmake-config.props" Condition="Exists('..\..\bin\Build$(Configuration)\cmake-config.props')" />
<Import Project="monodroid.projitems" />
<Import Project="..\..\build-tools\scripts\JavaInteropDllConfigs.targets" />
<UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.GenerateMonoDroidIncludes" />
<UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.RunParallelCmds" />
<UsingTask AssemblyFile="$(PrepTasksAssembly)" TaskName="Xamarin.Android.BuildTools.PrepTasks.ReplaceFileContents" />
Expand Down Expand Up @@ -207,7 +206,7 @@
</Target>

<Target Name="_BuildHostRuntimes"
DependsOnTargets="_CreateJavaInteropDllConfigs;_BuildHostRuntimesInputs"
DependsOnTargets="_BuildHostRuntimesInputs"
Inputs="@(_BuildHostRuntimesInputs)"
Outputs="@(_BuildHostRuntimesOutputs)">
<Message Text="Building host runtime %(_HostRuntime.Identity) in $(OutputPath)%(_HostRuntime.OutputDirectory)"/>
Expand Down
9 changes: 0 additions & 9 deletions tests/Mono.Android-Tests/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,4 @@
<Exec Command="&quot;$(NdkBuildPath)&quot;" WorkingDirectory="$(MSBuildThisFileDirectory)"/>
</Target>

<Import Project="$(MSBuildThisFileDirectory)..\..\build-tools\scripts\JavaInteropDllConfigs.targets" />

<!-- Not required when testing against a system installation of XA. -->
<Target Name="EnsureJavaInteropDllConfigs"
Condition="Exists ('$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll')"
BeforeTargets="_GenerateJniMarshalMethods"
DependsOnTargets="_CreateJavaInteropDllConfigs">
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Xamarin.Forms.Performance.Integration.Droid.projitems" />
<Import Project="$(XamarinAndroidSourcePath)build-tools\scripts\TestApks.targets" />
<Import Project="$(XamarinAndroidSourcePath)build-tools\scripts\JavaInteropDllConfigs.targets" />
<Target Name="EnsureJavaInteropDllConfigs"
Condition="Exists ('$(XAInstallPrefix)xbuild\Xamarin\Android\Java.Interop.dll')"
BeforeTargets="_GenerateJniMarshalMethods"
DependsOnTargets="_CreateJavaInteropDllConfigs">
</Target>
</Project>