Skip to content

Commit

Permalink
Come up with an alternate way for java-interop.jar path detection
Browse files Browse the repository at this point in the history
Context: https://xamarinhq.slack.com/archives/C03CEGRUW/p1568076852178100

Using `$(MSBuildExtensionsPath)` didn't work, as it just took the
"first" path, which isn't valid, resulting in attempts to use:

	/Library/Frameworks/Mono.framework/Versions/6.0.0/lib/mono/xbuild/Xamarin/Android/java-interop.jar

which does not exist.
  • Loading branch information
jonpryor committed Sep 10, 2019
1 parent f2e716e commit 98f08c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build-tools/scripts/Jar.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</Target>
<Target Name="BuildTestJarFile"
DependsOnTargets="_GetJavacVersions"
DependsOnTargets="_GetJavacVersions;_CollectRuntimeJarFilenames"
Inputs="@(TestJarEntry)"
Outputs="%(TestJarEntry.OutputFile)">
<ItemGroup>
Expand All @@ -27,7 +28,7 @@
<_DestDir>$(IntermediateOutputPath)__CreateTestJarFile-bin</_DestDir>
<_AndroidJar>-bootclasspath "$(AndroidSdkDirectory)\platforms\android-$(_AndroidApiLevelName)\android.jar"</_AndroidJar>
<_JIJar_InTree>$([System.IO.Path]::GetFullPath ('$(XAInstallPrefix)'))\xbuild\Xamarin\Android\java-interop.jar</_JIJar_InTree>
<_JIJar_System>$(MSBuildExtensionsPath)\Xamarin\Android\java-interop.jar</_JIJar_System>
<_JIJar_System>$([System.IO.Path]::GetDirectoryName ($(_RuntimeDex)))\java-interop.jar</_JIJar_System>
<_JIJar Condition=" Exists ($(_JIJar_InTree)) ">$(_JIJar_InTree)</_JIJar>
<_JIJar Condition=" '$(_JIJar)' == '' ">$(_JIJar_System)</_JIJar>
<_CP>-cp "$(_JIJar)"</_CP>
Expand Down

0 comments on commit 98f08c1

Please sign in to comment.