Skip to content

Commit

Permalink
Fix: Add Java.Interop to all MonoAndroid projects (#2996)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson committed Nov 2, 2021
1 parent 7432100 commit b32de3e
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true

- name: Install .NET Core
uses: actions/setup-dotnet@v1.8.2
Expand Down
10 changes: 1 addition & 9 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,7 @@
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>


<ItemGroup Condition="$(IsTestProject)">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
3 changes: 3 additions & 0 deletions src/Java.Interop.dll
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
<PackageTags>mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;xamarin;android;forms;monodroid;monotouch;xamarin.android;net;</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.Animated.Vector.Drawable" Version="28.*" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.*" />
Expand Down
8 changes: 8 additions & 0 deletions src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
<PackageTags>mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;xamarin;android;forms;monodroid;monotouch;xamarin.android;net;</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.3" />
Expand Down
9 changes: 9 additions & 0 deletions src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Compile Remove="Resources\**" />
<EmbeddedResource Remove="Resources\**" />
Expand Down
8 changes: 8 additions & 0 deletions src/ReactiveUI.Fody.Helpers/ReactiveUI.Fody.Helpers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
<LangVersion>preview</LangVersion>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Fody" Version="6.6.0" PrivateAssets="None" />
<PackageReference Include="FodyPackaging" Version="6.6.0" PrivateAssets="All" />
Expand Down
8 changes: 8 additions & 0 deletions src/ReactiveUI.Testing/ReactiveUI.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
<PackageTags>mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;test;</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Reactive.Testing" Version="5.0.0" />
<ProjectReference Include="..\ReactiveUI\ReactiveUI.csproj" />
Expand Down
8 changes: 8 additions & 0 deletions src/ReactiveUI.Uno.WinUI/ReactiveUI.Uno.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<DefineConstants>$(DefineConstants);WASM</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Remove="Resources\**" />
<None Remove="Resources\**" />
Expand Down
8 changes: 8 additions & 0 deletions src/ReactiveUI.Uno/ReactiveUI.Uno.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
<DefineConstants>$(DefineConstants);WASM</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Remove="Resources\**" />
<None Remove="Resources\**" />
Expand Down
8 changes: 8 additions & 0 deletions src/ReactiveUI/ReactiveUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
<None Remove="Resources\**" />
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
<!-- Hack to get around invalid version of Java.Interop -->
<Reference Include="Java.Interop">
<!-- Path to a VS 2019 Java.Interop.dll -->
<HintPath>..\Java.Interop.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
<Compile Include="Platforms\netstandard2.0\**\*.cs" />
<Compile Include="Platforms\shared\**\*.cs" />
Expand Down

0 comments on commit b32de3e

Please sign in to comment.