Skip to content
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

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Aug 27, 2018

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

@dellis1972
Copy link
Contributor

So the file in DebugNet45 is that a full framework net 4.5 dll or is it building against the MonoAndroid?
I might be reading this wrong, but I thought the plan was to keep PCL for the Build.Tasks but ship a MonoAndroid built Java.Interop.dll in the v1.0 dir?

@jonathanpeppers
Copy link
Member Author

keep PCL for the Build.Tasks but ship a MonoAndroid built Java.Interop.dll in the v1.0 dir

@dellis1972 yeah this PR should be doing this. I hope I didn't miss something?

This PR:

  • Leaves lib\xamarin.android\xbuild\Xamarin\Android\Java.Interop.dll as-is, Xamarin.Android.Build.Tasks uses this one, so should be unchanged
  • Changes lib\xamarin.android\xbuild-frameworks\MonoAndroid\v1.0\Java.Interop.dll to net45, and also passes $(XAInstallPrefix)

So the v1.0 Java.Interop that apps use, should be using the references here: https://github.com/xamarin/java.interop/blob/8d1c0f6271295a80e7162d7dd0a4e746f787bbb2/src/Java.Interop/Java.Interop.Net45.props#L8-L21

@jonathanpeppers
Copy link
Member Author

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")]

@dellis1972
Copy link
Contributor

dellis1972 commented Aug 27, 2018 via email

@jonathanpeppers
Copy link
Member Author

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 Java.Interop.dll.

@jonathanpeppers jonathanpeppers added the do-not-merge PR should not be merged. label Aug 28, 2018
jonathanpeppers added a commit to jonathanpeppers/java.interop that referenced this pull request Aug 28, 2018
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`.
@jonathanpeppers
Copy link
Member Author

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

@dellis1972
Copy link
Contributor

dellis1972 commented Aug 28, 2018 via email

jonpryor pushed a commit to dotnet/java-interop that referenced this pull request Aug 29, 2018
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.
@jonpryor
Copy link
Member

dotnet/java-interop#364 has been merged.

Please update this PR to include an external/Java.Interop bump.

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
@jonathanpeppers jonathanpeppers removed the do-not-merge PR should not be merged. label Aug 29, 2018
@jonpryor jonpryor merged commit d967436 into dotnet:master Aug 29, 2018
@jonathanpeppers jonathanpeppers deleted the java.interop-not-pcl branch August 29, 2018 19:22
jonathanpeppers added a commit to dotnet/java-interop that referenced this pull request Sep 5, 2018
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.
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Sep 5, 2018
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`.
jonpryor pushed a commit that referenced this pull request Sep 7, 2018
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`.
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Sep 7, 2018
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`.
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Sep 10, 2018
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`.
jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Sep 11, 2018
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`.
jonpryor pushed a commit that referenced this pull request Sep 12, 2018
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`.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants