-
Notifications
You must be signed in to change notification settings - Fork 533
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 #2105
Conversation
So the file in |
@dellis1972 yeah this PR should be doing this. I hope I didn't miss something? This PR:
So the |
I checked the artifacts from the PR build.
[assembly: TargetFramework(".NETFramework,Version=v4.5")]
[assembly: TargetFramework(".NETPortable,Version=v4.5,Profile=Profile111")] |
I think I was expecting the MonoAndroid Java.Interip.dll to have
[assembly: TargetFramework ("MonoAndroid,Version=v1.0",
FrameworkDisplayName = "Xamarin.Android Base Class Libraries")]
…On 27 August 2018 at 23:06, Jonathan Peppers ***@***.***> wrote:
I checked the artifacts from the PR build.
MonoAndroid\v1.0\Java.Interop.dll in ILSpy:
[assembly: TargetFramework(".NETFramework,Version=v4.5")]
Xamarin\Android\Java.Interop.dll in ILSpy:
[assembly: TargetFramework(".NETPortable,Version=v4.5,Profile=Profile111")]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2105 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxeeYKEXHMx34iZpINAoZTbcTm2cTnVks5uVG1mgaJpZM4WOJmN>
.
|
Ok, I see how to do this now: <PropertyGroup>
<TargetFrameworkIdentifier>MonoAndroid</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<TargetFrameworkRootPath>$(XAInstallPrefix)xbuild-frameworks</TargetFrameworkRootPath>
</PropertyGroup> I need to add a way to set these properties for |
Context: dotnet/android#2105 (comment) To build `Java.Interop.csproj` as `MonoAndroid,v1.0`, we need to set the following properties: <PropertyGroup> <TargetFrameworkIdentifier>MonoAndroid</TargetFrameworkIdentifier> <TargetFrameworkVersion>v1.0</TargetFrameworkVersion> <TargetFrameworkRootPath>$(XAInstallPrefix)xbuild-frameworks</TargetFrameworkRootPath> </PropertyGroup> Currently it looks like `$(TargetFrameworkVersion)` is the only one we can't modify downstream in `xamarin-android`.
I got it to work: // bin\Debug\lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\Java.Interop.dll
// Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
[assembly: TargetFramework("MonoAndroid,Version=v1.0")] I'll need this in Java.Interop, though: dotnet/java-interop#364 |
ok, cool. Will merge that PR once it green.
…On 28 August 2018 at 14:40, Jonathan Peppers ***@***.***> wrote:
I got it to work:
// bin\Debug\lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\Java.Interop.dll// Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
[assembly: TargetFramework("MonoAndroid,Version=v1.0")]
I'll need this in Java.Interop, though: dotnet/java-interop#364
<dotnet/java-interop#364>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2105 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxeeRIjLLGJwoc0lJ9_dfs0Jz1zbGd9ks5uVUhkgaJpZM4WOJmN>
.
|
Context: http://work.devdiv.io/667174 Context: dotnet/android#2105 Context: 893562c Turns Out™ that resolving PCL assemblies within Xamarin.Android is not as fast as resolving `MonoAndroid`-profile assemblies; see commit 893562c, wherein we see that non-PCL use is 30-50% faster than PCL assembly use -- shaving off ~4 seconds -- for unknown reasons. Run with it: allow `Java.Interop.dll` to be built as a `MonoAndroid,v1.0`-profile assembly in addition to a PCL. To do this we need to allow `$(TargetFrameworkVersion)` to be overridden "elsewhere" -- specifically in `Mono.Android.targets` within the xamarin-android repo -- otherwise `Java.Interop.dll` will be built for the *wrong* framework profile.
dotnet/java-interop#364 has been merged. Please update this PR to include an |
Fixes: http://work.devdiv.io/667174 Context: dotnet/java-interop#360 Building `Java.Interop` in a similar fashion as `Mono.Android.dll`: <PropertyGroup> <NoStdLib>true</NoStdLib> <TargetFrameworkIdentifier>MonoAndroid</TargetFrameworkIdentifier> <TargetFrameworkVersion>v1.0</TargetFrameworkVersion> <TargetFrameworkRootPath>$(XAInstallPrefix)xbuild-framework</TargetFrameworkRootPath> </PropertyGroup> <ItemGroup> <Reference Include="mscorlib"> <HintPath>$(XAInstallPrefix)xbuild-frameworks\MonoAndroid\v1.0\mscorlib.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="System"> <HintPath>$(XAInstallPrefix)xbuild-frameworks\MonoAndroid\v1.0\System.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="System.Core"> <HintPath>$(XAInstallPrefix)xbuild-frameworks\MonoAndroid\v1.0\System.Core.dll</HintPath> <Private>False</Private> </Reference> </ItemGroup> Decreases the assemblies referenced in a "Hello World" Xamarin.Android project dramatically: 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... 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... And the savings in build times for "Hello World", this is the `Rebuild` target: - `Debug` + PCL - 8.424s - `Release` + PCL - 13.651s - `Debug` + *not* PCL - 4.258s - `Release` + *not* PCL - 9.487s *NOTE: this was a master/Debug build of Xamarin.Android* The `Java.Interop.dll` in `lib\xamarin.android\xbuild\Xamarin\Android\` remains unchanged, as referenced by `Xamarin.Android.Build.Tasks`. The modified `Java.Interop.dll` in `lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\` will look something like: // bin\Debug\lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\Java.Interop.dll // Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065 [assembly: TargetFramework("MonoAndroid,Version=v1.0")] Changes: - `$(MSBuildThisFile)` should be an input of `_BuildJavaInterop` - Set `$(JavaInteropProfile)` and various other properties so a non-PCL version of `Java.Interop.dll` is built - Make sure to copy `Java.Interop.dll` from the `DebugNet45` directory - Bump to java.interop/master/659711c dotnet/java-interop@893562c...659711c
57fd29d
to
42fcd79
Compare
Context: http://work.devdiv.io/667174 Context: dotnet/android#2105 Context: 893562c Turns Out™ that resolving PCL assemblies within Xamarin.Android is not as fast as resolving `MonoAndroid`-profile assemblies; see commit 893562c, wherein we see that non-PCL use is 30-50% faster than PCL assembly use -- shaving off ~4 seconds -- for unknown reasons. Run with it: allow `Java.Interop.dll` to be built as a `MonoAndroid,v1.0`-profile assembly in addition to a PCL. To do this we need to allow `$(TargetFrameworkVersion)` to be overridden "elsewhere" -- specifically in `Mono.Android.targets` within the xamarin-android repo -- otherwise `Java.Interop.dll` will be built for the *wrong* framework profile.
Fixes: http://work.devdiv.io/667174 Context: dotnet/java-interop@893562c Context: dotnet/java-interop@659711c Context: dotnet/java-interop@b873e81...a09932d Bumped to java.interop/d15-9/a09932d 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`.
Fixes: http://work.devdiv.io/667174 Context: dotnet/java-interop@893562c Context: dotnet/java-interop@659711c Context: dotnet/java-interop@b873e81...a09932d Bumped to java.interop/d15-9/a09932d 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`.
Fixes: http://work.devdiv.io/667174 Context: dotnet/java-interop@893562c Context: dotnet/java-interop@659711c Context: dotnet/java-interop@b873e81...a09932d Bumped to java.interop/d15-9/a09932d 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`.
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`.
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`.
Fixes: http://work.devdiv.io/667174 Context: dotnet/java-interop@893562c Context: dotnet/java-interop@659711c Context: dotnet/java-interop@b873e81...9b390bc Bumps to xamarin/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`.
Fixes: http://work.devdiv.io/667174
Context: dotnet/java-interop#360
Building
Java.Interop
in a similar fashion asMono.Android.dll
:Decreases the assemblies referenced in a "Hello World" Xamarin.Android
project dramatically:
Becomes:
And the savings in build times for "Hello World", this is the
Rebuild
target:Debug
+ PCL - 8.424sRelease
+ PCL - 13.651sDebug
+ not PCL - 4.258sRelease
+ not PCL - 9.487sNOTE: this was a master/Debug build of Xamarin.Android
The
Java.Interop.dll
inlib\xamarin.android\xbuild\Xamarin\Android\
remains unchanged, asreferenced by
Xamarin.Android.Build.Tasks
.The modified
Java.Interop.dll
inlib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\
will looksomething like:
Changes:
$(MSBuildThisFile)
should be an input of_BuildJavaInterop
$(JavaInteropProfile)
and various other properties so anon-PCL version of
Java.Interop.dll
is builtJava.Interop.dll
from theDebugNet45
directorydotnet/java-interop@893562c...659711c