-
Notifications
You must be signed in to change notification settings - Fork 564
[Mono.Android] build and reference non-PCL Java.Interop #2157
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
[Mono.Android] build and reference non-PCL Java.Interop #2157
Conversation
Context: dotnet/android#2157 We believe that we need commit 80b4f4e -- which removes the `XAIntegrationDebug` and `XAIntegrationRelease` configurations -- applied to xamarin/Java.Interop:d15-9 so that xamarin/xamarin-android:d15-9 will actually build.
3578d75 to
7d790c6
Compare
|
APK tests failed: But I'm not seeing that previous error where |
|
@jonathanpeppers: The file can't be found because the source file doesn't exist because the unit test process crashed: Ouch. Worse, there's no particular reason for the crash: I believe that this is in part why we have commit 7c51a91 / PR #2119, in the hopes that a newer emulator would at least provide more information about why things are crashing... |
|
Yeah, these XUnit tests worked fine for me locally... Here is the start of the test results from So I clicked |
|
Same thing happened with the rebuild: Oddly, this time I don't see any |
Context: #2157 Merge commit; cherry-picks the following commits from master: * d01e4ce (PR #2087): Revert "[mono-sdks] Use for android toolchain" * 7c51a91 (PR #2119): [tests] Update emulator to the latest version, switch to API 28 We're hoping that the emulator update will make unit test execution more reliable; see also PR #2157, which often has a crash when running some unit tests.
Fixes: http://work.devdiv.io/667174 Context: dotnet/java-interop@893562c Context: dotnet/java-interop@659711c Context: dotnet/java-interop@b873e81...9b390bc Bumped to java.interop/d15-9/9b390bc Build `lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\Java.Interop.dll` as a `MonoAndroid`-profile assembly instead of as a PCL assembly. This decreases the assemblies referenced in a "Hello World" Xamarin.Android project dramatically; this: Adding assembly reference for Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065, recursively... Adding assembly reference for System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.ComponentModel.Composition, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, recursively... Adding assembly reference for System.Diagnostics.Debug, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Threading, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Collections.Concurrent, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Linq.Expressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Reflection.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Dynamic.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.ObjectModel, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Linq, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Runtime.InteropServices, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Runtime.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for System.Reflection.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, recursively... Adding assembly reference for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065, recursively... now becomes: Adding assembly reference for Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065, recursively... Adding assembly reference for Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065, recursively... Because fewer assemblies need to be resolved, the `Rebuild` target times improve by 30%-50% for the "Hello World" app: - `Debug` + PCL: 8.424s - `Debug` + *not* PCL: 4.258s (~50% faster!) - `Release` + PCL: 13.651s - `Release` + *not* PCL: 9.487s (~30% faster!) The `lib\xamarin.android\xbuild\Xamarin\Android\Java.Interop.dll` copy used by `Xamarin.Android.Build.Tasks.dll` remains unchanged, as it is referenced by `Xamarin.Android.Build.Tasks.csproj`.
7d790c6 to
688f24e
Compare
Fixes: http://work.devdiv.io/667174
Context: dotnet/java-interop@893562c
Context: dotnet/java-interop@659711c
Context: dotnet/java-interop@b873e81...9b390bc
Bumped to java.interop/d15-9/9b390bc
Build
lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\Java.Interop.dllas a
MonoAndroid-profile assembly instead of as a PCL assembly.This decreases the assemblies referenced in a "Hello World"
Xamarin.Android project dramatically; this:
now becomes:
Because fewer assemblies need to be resolved, the
Rebuildtargettimes improve by 30%-50% for the "Hello World" app:
Debug+ PCL: 8.424sDebug+ not PCL: 4.258s (~50% faster!)Release+ PCL: 13.651sRelease+ not PCL: 9.487s (~30% faster!)The
lib\xamarin.android\xbuild\Xamarin\Android\Java.Interop.dllcopy used by
Xamarin.Android.Build.Tasks.dllremains unchanged, asit is referenced by
Xamarin.Android.Build.Tasks.csproj.