Uh oh!
There was an error while loading. Please reload this page.
Conditionally call ManagedPeer.Init() - #761
Merged
jonpryor merged 6 commits intoJan 11, 2021
Merged
Conversation
Driven by `XA_JI_EXCLUDE`, which will be defined in Xamarin.Android.props, when building for XA.
They are not used anymore
jonpryor
commented
Dec 18, 2020
Contributor
Who is setting |
radekdoulik added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Dec 18, 2020
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
radekdoulik
marked this pull request as ready for review
December 18, 2020 16:28
radekdoulik
commented
Dec 18, 2020
MemberAuthor
I updated the PR description with that information. |
jonpryor
reviewed
Jan 7, 2021
Uh oh!
There was an error while loading. Please reload this page.
jonpryor
reviewed
Jan 7, 2021
Uh oh!
There was an error while loading. Please reload this page.
...to a place whete `$(Configuration) is already set
radekdoulik added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Jan 12, 2021
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
radekdoulik added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Jan 12, 2021
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
radekdoulik added a commit
to radekdoulik/xamarin-android
that referenced
this pull request
Jan 15, 2021
Context: dotnet#5400 Context: dotnet/java-interop#761 Generate `XAConfig.props` file in Java.Interop to define `XA_JI_EXCLUDE` compilation constant. The generated file contains properties set for Java.Interop by XA. So far it is only setting one property, and thus doesn't necessarily be generated. I still wanted to be written by `xaprep`, plus it might be handy in future for other configuration. The currently set `JavaInteropDefineConstants` property is going to be used to disable `ManagedPeer` initialization. We don't really use `ManagedPeer` today and it is duplicating functionality of `ConstructorBuilder` class. The unwanted effect of having it in JI is that it is pulling in System.Linq.Expressions, which greatly increase assemblies size after linking. The size reduction for simple XA app is cca 135kbytes of compressed size. Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 27 assemblies/Mono.Android.dll - 30 assemblies/System.Collections.Concurrent.dll - 989 assemblies/System.Linq.dll - 2,930 assemblies/Java.Interop.dll - 4,514 assemblies/System.Collections.dll *1 - 4,874 assemblies/System.ObjectModel.dll *1 - 7,987 assemblies/System.Private.CoreLib.dll - 115,284 assemblies/System.Linq.Expressions.dll *1 Summary: - 136,635 Assemblies -14.87% (of 918,689) - 139,506 Package size difference -1.79% (of 7,780,819)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context: dotnet/android#5400
Context: dotnet/android#5444
Driven by
XA_JI_EXCLUDE, which will be definedin
XAConfig.propsin$(JavaInteropDefineConstants), whenbuilding for XA. The file is generated by XA's
xaprepin
bin/Build$(Configuration).Also clean old
XA_INTEGRATION#if's, they are not used anymore.