Skip to content

Conversation

@moljac
Copy link
Contributor

@moljac moljac commented May 25, 2020

PR codename - Bleach Antidote

Support Libraries Version (eg: 23.3.0):

AndroidX

Does this change any of the generated binding API's?

Yes.
No. with type forwarding.

Describe your contribution

Naming convention in AndroidX created managed AndroidX.AppCompat.Resources.dll for the androidx.appcompat.appcpmpat-resources artifact.

This assembly is bundled if bundling assemblies is set to true, which some users use as obfuscation and size reduction tool, though this tool's intention is different.

The users have been warned not to use bundling assemblies for obfuscation and size reduction, but seems that bleach-for-virii movement is worldwide phenomena, so we are creating antidote that will be shipped with CIF and Domestos products. Thus the codename "Bleach antidote".

Steps done:

  1. renamed nuget/assembly name in config.json to AndroidX.AppCompat.AppCompatResources.dll for the old project androidx.appcomapt.appcompat-resources.csproj which contains bindings (metadata transforms and code)
  2. created new project androidx.appcompat.appcompat-resources-typeforwarders.csproj which generates old assembly AndroidX.AppCompat.Resources.dll with typeforwarders to new assembly AndroidX.AppCompat.AppCompatResources.dll
  3. new project androidx.appcompat.appcompat-resources-typeforwarders.csproj generating old assembly AndroidX.AppCompat.Resources.dll references old project androidx.appcomapt.appcompat-resources.csproj which generates assembly with new name AndroidX.AppCompat.AppCompatResources.dll
  4. migration unittests were fixed to match new assemblyname.

Issues fixed:

  1. System.IO.FileNotFoundException when <BundleAssemblies>True</BundleAssemblies>

    [Bug] [Android] System.IO.FileNotFoundException when <BundleAssemblies>True</BundleAssemblies> #64

Related issues:

  1. [Bug] Image Control doesn't work #9900

    Xamarin.Forms repo

    [Bug] Image Control doesn't work xamarin/Xamarin.Forms#9900

  2. [Bug] java.lang.ClassNotFoundException: androidx.appcompat.widget.FitWindowsFrameLayout Fix typo in MediaLibraryService method name: OnGetSeesionFromMediaLibraryService -> OnGetSessionFromMediaLibraryService #1198

    Xamarin.Essentials repo

    [Bug] java.lang.ClassNotFoundException: androidx.appcompat.widget.FitWindowsFrameLayout xamarin/Essentials#1198

@moljac moljac self-assigned this May 25, 2020
@moljac moljac added do-not-merge PR is still in progress and is not ready to be merged in-progress in progress in-test labels May 25, 2020
@moljac
Copy link
Contributor Author

moljac commented Jun 3, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moljac
Copy link
Contributor Author

moljac commented Jun 3, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@melimion
Copy link

melimion commented Jun 4, 2020

@moljac I've tried nugets from https://github.com/moljac/Samples.AndroidX/tree/master/nuget-local with X.F 4.6 and don't see any issues. Images are displayed, no FileNotFoundException.

Looks like fix works. I'll continue using your nugets and report here in case of any problems.

Thanks!

@moljac
Copy link
Contributor Author

moljac commented Jun 4, 2020

@melimion

No! Thank you! Really appreciated. I'm waiting feedback from Xamarin.Forms team and must publish nugets.

If you would be so kind and drop the note in the issue. Just short feedback that it works for you. For the record.

@Skirtek
Copy link

Skirtek commented Jun 17, 2020

Any hopes to merge this and include in release soon?

@moljac
Copy link
Contributor Author

moljac commented Jun 17, 2020

@Skirtek
Why do you think that merge will inculde it into release?
or
Why do you think that it was not already released?

Merge will not fix it, because packages with fix are already published.

The only problem is - Xamarin.Forms team must update their packages.

@moljac moljac merged commit 1c27844 into master Jun 26, 2020
@moljac moljac deleted the master_based_issue0064_BundleAssemblies branch June 26, 2020 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge PR is still in progress and is not ready to be merged in-progress in progress in-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [Android] System.IO.FileNotFoundException when <BundleAssemblies>True</BundleAssemblies>

4 participants