TooLargeTool 1.2.0

dotnet add package TooLargeTool --version 1.2.0
                    
NuGet\Install-Package TooLargeTool -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TooLargeTool" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TooLargeTool" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="TooLargeTool" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TooLargeTool --version 1.2.0
                    
#r "nuget: TooLargeTool, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TooLargeTool@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TooLargeTool&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=TooLargeTool&version=1.2.0
                    
Install as a Cake Tool

TooLargeTool

Tool for logging android bundle size

This is unofficial clone of TooLargeTool for .NET 7

How to use

In your application class

public override void OnCreate()
{
    base.OnCreate();
    Tool.StartBundleLogging(this);
}

After that your can see in android logs records like this:

[TestFragment][OnSaveInstanceState] Total bundle size is 0.0 KB with 0 keys
[MainActivity][OnSaveInstanceState] Total bundle size is 1.3 KB with 3 keys
    android:viewHierarchyState - 0.8 KB
    android:lastAutofillId - 0.1 KB
    android:fragments - 0.4 KB

Starting from version 1.1.0 you can also log intent extras size by using extensions methods. Here the example:

var intent = new Intent(Context, typeof(SecondActivity));
intent.PutExtra("test_key", "test_data");
StartActivityWithLoggingExtras(intent);

In log you can see:

[MainActivity][StartActivity] Total bundle size is 0.1 KB with 1 keys
    test_key - 0.1 KB
Product Compatible and additional computed target framework versions.
.NET net7.0-android33.0 is compatible.  net8.0-android was computed.  net9.0-android was computed.  net10.0-android was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 208 6/26/2023
1.1.0 190 6/5/2023
1.0.1 175 6/3/2023
1.0.0 175 6/2/2023