make Grpc.Core nuget work for Xamarin.Forms

pull/16293/head
Jan Tattermusch 7 years ago
parent e916e79cb8
commit ddc7fd845b
  1. 10
      src/csharp/Grpc.Core/Grpc.Core.csproj
  2. 9
      src/csharp/Grpc.Core/build/MonoAndroid/Grpc.Core.targets
  3. 4
      src/csharp/Grpc.Core/build/Xamarin.iOS/Grpc.Core.targets

@ -47,23 +47,23 @@
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="..\nativelibs\csharp_ext_linux_android_armeabi-v7a\libgrpc_csharp_ext.so"> <Content Include="..\nativelibs\csharp_ext_linux_android_armeabi-v7a\libgrpc_csharp_ext.so">
<PackagePath>runtimes/monoandroid/armeabi-v7a/libgrpc_csharp_ext.so</PackagePath> <PackagePath>native/android/armeabi-v7a/libgrpc_csharp_ext.so</PackagePath>
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="..\nativelibs\csharp_ext_linux_android_arm64-v8a\libgrpc_csharp_ext.so"> <Content Include="..\nativelibs\csharp_ext_linux_android_arm64-v8a\libgrpc_csharp_ext.so">
<PackagePath>runtimes/monoandroid/arm64-v8a/libgrpc_csharp_ext.so</PackagePath> <PackagePath>native/android/arm64-v8a/libgrpc_csharp_ext.so</PackagePath>
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="..\nativelibs\csharp_ext_linux_android_x86\libgrpc_csharp_ext.so"> <Content Include="..\nativelibs\csharp_ext_linux_android_x86\libgrpc_csharp_ext.so">
<PackagePath>runtimes/monoandroid/x86/libgrpc_csharp_ext.so</PackagePath> <PackagePath>native/android/x86/libgrpc_csharp_ext.so</PackagePath>
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="..\nativelibs\csharp_ext_macos_ios\libgrpc_csharp_ext.a"> <Content Include="..\nativelibs\csharp_ext_macos_ios\libgrpc_csharp_ext.a">
<PackagePath>runtimes/ios/native/libgrpc_csharp_ext.a</PackagePath> <PackagePath>native/ios/universal/libgrpc_csharp_ext.a</PackagePath>
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="..\nativelibs\csharp_ext_macos_ios\libgrpc.a"> <Content Include="..\nativelibs\csharp_ext_macos_ios\libgrpc.a">
<PackagePath>runtimes/ios/native/libgrpc.a</PackagePath> <PackagePath>native/ios/universal/libgrpc.a</PackagePath>
<Pack>true</Pack> <Pack>true</Pack>
</Content> </Content>
<Content Include="build\net45\Grpc.Core.targets"> <Content Include="build\net45\Grpc.Core.targets">

@ -1,25 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_GrpcCoreNugetNativePath Condition="'$(_GrpcCoreNugetNativePath)' == ''">$(MSBuildThisFileDirectory)..\..\</_GrpcCoreNugetNativePath>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'"> <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'">
<AndroidNativeLibrary Include="$(_GrpcCoreNugetNativePath)runtimes\monoandroid\arm64-v8a\libgrpc_csharp_ext.so"> <AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\..\native\android\arm64-v8a\libgrpc_csharp_ext.so">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Abi>arm64-v8a</Abi> <Abi>arm64-v8a</Abi>
</AndroidNativeLibrary> </AndroidNativeLibrary>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'"> <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'">
<AndroidNativeLibrary Include="$(_GrpcCoreNugetNativePath)runtimes\monoandroid\armeabi-v7a\libgrpc_csharp_ext.so"> <AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\..\native\android\armeabi-v7a\libgrpc_csharp_ext.so">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Abi>armeabi-v7a</Abi> <Abi>armeabi-v7a</Abi>
</AndroidNativeLibrary> </AndroidNativeLibrary>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'"> <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'">
<AndroidNativeLibrary Include="$(_GrpcCoreNugetNativePath)runtimes\monoandroid\x86\libgrpc_csharp_ext.so"> <AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\..\native\android\x86\libgrpc_csharp_ext.so">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Abi>x86</Abi> <Abi>x86</Abi>
</AndroidNativeLibrary> </AndroidNativeLibrary>

@ -2,11 +2,11 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<NativeReference Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\libgrpc_csharp_ext.a"> <NativeReference Include="$(MSBuildThisFileDirectory)..\..\native\ios\universal\libgrpc_csharp_ext.a">
<Kind>Static</Kind> <Kind>Static</Kind>
<ForceLoad>True</ForceLoad> <ForceLoad>True</ForceLoad>
</NativeReference> </NativeReference>
<NativeReference Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\libgrpc.a"> <NativeReference Include="$(MSBuildThisFileDirectory)..\..\native\ios\universal\libgrpc.a">
<Kind>Static</Kind> <Kind>Static</Kind>
<ForceLoad>True</ForceLoad> <ForceLoad>True</ForceLoad>
</NativeReference> </NativeReference>

Loading…
Cancel
Save