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

Make all assemblies RID-specific #8478

Merged
merged 233 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 229 commits
Commits
Show all changes
233 commits
Select commit Hold shift + click to select a range
1aed8ca
3 times the charm...
grendello Oct 31, 2023
1a44132
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 2, 2023
3b251e1
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 2, 2023
daf3ed3
Moving forward
grendello Nov 2, 2023
4850b10
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 3, 2023
7be2b35
New assembly blob format implemented
grendello Nov 3, 2023
e073491
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 6, 2023
972c8dd
Runtime almost works, binary search fails. Fix tmrw.
grendello Nov 6, 2023
4f46c74
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 7, 2023
6dd5b92
Release+assembly stores works fine now
grendello Nov 7, 2023
41243e5
Fix handling of discrete dlls in Release builds
grendello Nov 7, 2023
e46460c
Prepare for experimental dlopen code
grendello Nov 7, 2023
852eb02
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 8, 2023
9c1b501
New dlopen code, fixes for handling of compressed assemblies
grendello Nov 8, 2023
a74c50e
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 9, 2023
eef6ece
Trying to make no-linking Release scenario work
grendello Nov 9, 2023
97a2b62
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 13, 2023
3fc39cb
Fix build and run without linking
grendello Nov 13, 2023
ec90aff
Moving on
grendello Nov 14, 2023
17ac554
Bump monodroid to fix (some) tests
grendello Nov 15, 2023
32b647b
Bump System.Reflection.Metadata to see if it fixes some tests
grendello Nov 15, 2023
be79df0
Bump the System.Collections.Immutable nuget, to see if it fixes some …
grendello Nov 15, 2023
e875b3e
Restore ILRepacker, to see if that's what broke some tests
grendello Nov 15, 2023
bb7fe3d
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 16, 2023
f3e83d3
Rely on `DestinationSubPath` metadata
grendello Nov 16, 2023
729eb76
Fix the `LinkAssembliesShrink` test
grendello Nov 16, 2023
0ef0996
[WIP] New assembly store reader
grendello Nov 16, 2023
4608ba2
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 16, 2023
a4747e8
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 17, 2023
5bb6684
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 17, 2023
7721aae
Continued work on new assembly store reader + tests
grendello Nov 17, 2023
6111487
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 20, 2023
29747b6
Fix a handful of tests
grendello Nov 20, 2023
446fbec
More test fixes + potential test perf improvement
grendello Nov 20, 2023
52e324f
Make sure assemblies have all the required RID metadata
grendello Nov 20, 2023
2aa2356
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 20, 2023
4363e0f
Fixes for a handful more tests
grendello Nov 21, 2023
4cab3b7
Another set of test fixes
grendello Nov 21, 2023
3d780b1
Fix another test
grendello Nov 21, 2023
17dfba3
More fixes
grendello Nov 21, 2023
7da09bd
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 22, 2023
15be134
More test fixes
grendello Nov 22, 2023
a0a28c1
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 23, 2023
ef6fa49
More test fixes
grendello Nov 23, 2023
5a5960b
Begin to fix typemaps, JCW and marshal methods generation
grendello Nov 23, 2023
41a3b51
And the struggle against GenerateJavaStubs continues
grendello Nov 24, 2023
5097e23
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 28, 2023
333f3a7
Might need to rethink it... tomorrow
grendello Nov 28, 2023
b8c35a6
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 28, 2023
a6eb63f
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 29, 2023
c3ae673
Bad direction, too complex...
grendello Nov 29, 2023
5bb9d5d
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 29, 2023
91aa1f8
New direction.
grendello Nov 30, 2023
91c5675
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Nov 30, 2023
9cdd0c4
This should be the right direction
grendello Dec 1, 2023
85f98d7
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 4, 2023
46a9f84
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 4, 2023
6c92354
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 4, 2023
ecfbee8
Bump LLVM version to 17.0.6
grendello Dec 4, 2023
38b0f64
Trudging on
grendello Dec 4, 2023
6465410
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 4, 2023
83a92cd
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 4, 2023
54a48eb
Marshal methods classification and rewriting done
grendello Dec 5, 2023
45d9a68
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 5, 2023
a763218
Typemap generation works
grendello Dec 5, 2023
2d9896a
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 6, 2023
0c42a46
All the code generation steps appear to work fine
grendello Dec 6, 2023
e592ce9
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 6, 2023
354ade9
Onto marshal method generation and GeneratePackageManagerJava
grendello Dec 6, 2023
5a78e46
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 7, 2023
fa6fe8b
Let's see which tests break now
grendello Dec 7, 2023
7f932f6
Scan less assemblies + some debug spam cleanup
grendello Dec 7, 2023
5f3598a
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 7, 2023
0f50a85
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 7, 2023
0233691
Move individual assemblies to lib/{ARCH}/ and fix a couple of tests
grendello Dec 8, 2023
4630e3c
Fix handling of satellite assemblies (can lead to build failures)
grendello Dec 8, 2023
ef715a4
Update apkdesc files
grendello Dec 8, 2023
b7ce0e6
Fix JCW generation
grendello Dec 8, 2023
697072e
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 11, 2023
1f0e208
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 11, 2023
99f86d9
Some test fixes
grendello Dec 11, 2023
776ab5f
Mangle assembly entry names in `lib/{ABI}/`
grendello Dec 12, 2023
2577394
Make mangled assembly names work at run time
grendello Dec 12, 2023
c4c65be
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Dec 12, 2023
80b9c64
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 8, 2024
5ceece9
Fix the `BuildTest.CheckAssemblyCounts` test
grendello Jan 9, 2024
52bfb96
Fix the `AotTests.BuildAotApplicationWithNdkAndBundleAndÜmläüts` test
grendello Jan 9, 2024
2aab14b
Fix name mangling of PDB files
grendello Jan 9, 2024
13dd0cc
Fix the `PackagingTest.CheckIncludedAssemblies` test...
grendello Jan 9, 2024
0982d2d
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 9, 2024
0c836e4
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 10, 2024
d2ca304
Fix the `AotTests.BuildAotApplicationAndÜmläüts` test
grendello Jan 10, 2024
9b8181d
Update apkdesc files
grendello Jan 10, 2024
8297613
Fix the `BuildTest.MicrosoftExtensionsHttp` test
grendello Jan 10, 2024
0afc041
Fix the `BuildAMassiveApp` test and hopefully don't break others...
grendello Jan 10, 2024
be460e0
Fix the `TransitiveDependencyProduceReferenceAssembly` test
grendello Jan 10, 2024
6e1dd73
Partial fix for the `AndroidAddKeepAlives` test
grendello Jan 10, 2024
ab09406
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 11, 2024
08408b9
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 11, 2024
c0f5b3b
Fix the `AndroidAddKeepAlives` test
grendello Jan 11, 2024
81a2162
Moo?
grendello Jan 11, 2024
2a0621e
Fix the `CheckPackageManagerAssemblyOrder` test
grendello Jan 11, 2024
6d5604d
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 12, 2024
ececd2d
Update apkdesc files
grendello Jan 12, 2024
6bc842c
Fix the `BuildAMassiveApp` test after a34988c
grendello Jan 12, 2024
eb84482
Fix the `DuplicateManagedNames` test again...
grendello Jan 12, 2024
dfa36e8
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 15, 2024
87e2067
Apply Android.Support changes
grendello Jan 15, 2024
dee8cf3
Fix the `BaseZip` test
grendello Jan 15, 2024
203e6a2
Attempt to fix the `ApplicationRunsWithoutDebugger` test
grendello Jan 15, 2024
20f4794
Fix a typo and update an apkdesc file
grendello Jan 15, 2024
c95d321
`-fstack-clash-protection` is a linker flag
grendello Jan 15, 2024
d98858c
Disable false negative warning for array bounds checking
grendello Jan 15, 2024
6a82a2d
Use `std::array<T,S>` for override_dirs
grendello Jan 15, 2024
85521b5
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 16, 2024
41ccfdb
Try to figure out why `ApplicationRunsWithDebuggerAndBreaks` fails
grendello Jan 16, 2024
de9a18d
Optimize startup a tiny bit
grendello Jan 16, 2024
fc5eff0
`std::string_view` all the way (even if it's fugly :P)
grendello Jan 16, 2024
f55b42a
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 17, 2024
1c9c698
Fix ServerCertificateCustomValidator on API 21-23 (#8637)
simonrozsival Jan 16, 2024
1025090
LEGO: Merge pull request 8642
csigs Jan 17, 2024
644d4a9
[Xamarin.Android.Build.Tasks] fix warning when missing `proguard-andr…
dellis1972 Jan 17, 2024
4b3d535
Override directory now contains the ABI
grendello Jan 17, 2024
65b7ba4
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 17, 2024
4612446
Try to fix the DTB tests
grendello Jan 17, 2024
d6efffe
Debug the `LocalizedAssemblies_ShouldBeFastDeployed` test
grendello Jan 17, 2024
a2a98f4
Hopefully fix the `AppBundle` test
grendello Jan 17, 2024
1176d3d
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 17, 2024
81c05a4
Fix finding assembly blob entries in the apk
grendello Jan 17, 2024
6e90924
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 17, 2024
5f9be55
nicer, a bit. Still a fugly hack
grendello Jan 17, 2024
f876742
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 18, 2024
4e712cc
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 18, 2024
a611d3a
Path separators are QUITE important, you know
grendello Jan 18, 2024
5923ee1
Details matter, fool
grendello Jan 18, 2024
3d22ecf
Fix assembly name synthesis for assembly blobs
grendello Jan 18, 2024
04c1d8d
Possibly fix fastdev for satellite assemblies
grendello Jan 18, 2024
b4a57c4
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 18, 2024
639c6fd
Update apkdesc after merge
grendello Jan 18, 2024
fb5124f
Prepare for merge
grendello Jan 19, 2024
e6ed1ed
Prepare for merge (2)
grendello Jan 19, 2024
01f03a3
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 19, 2024
2a3c8fe
Start support for on-filesystem blobs and assemblies
grendello Jan 19, 2024
05e34de
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 22, 2024
7776434
[WIP] carefully modify assembly/pdb/etc mapping code to share it
grendello Jan 22, 2024
3fe9d64
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 22, 2024
b76adeb
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 23, 2024
fa101bb
Trudging on
grendello Jan 23, 2024
8d1bb33
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 23, 2024
d6eee9a
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 24, 2024
4c026ff
Loading assemblies and assembly blobs from filesystem works now
grendello Jan 24, 2024
24519c0
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 24, 2024
6a45c63
Update apkdesc
grendello Jan 25, 2024
082da85
Tweak
grendello Jan 25, 2024
20a4023
Attempt to fix assembly image load for typemap
grendello Jan 25, 2024
d709b49
Remove some debug spam and increase logcat buffer size
grendello Jan 25, 2024
06329f8
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 25, 2024
8429091
Take 2 to fix assembly load for typemap lookup
grendello Jan 25, 2024
30e7420
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 25, 2024
0939db2
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 25, 2024
fb17eec
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 25, 2024
a4987ef
Migration from to continues
grendello Jan 25, 2024
baf8cc2
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 26, 2024
d98a069
Put FastDev typemaps in arch-specific subdirs
grendello Jan 26, 2024
383f887
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Jan 26, 2024
3ea6c6a
More std:string_view-ication
grendello Jan 26, 2024
8c4d5aa
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 29, 2024
a922440
Fix typemap generation for Debug builds with fastdev
grendello Jan 29, 2024
f788c1b
Take 3 to fix assembly load for typemap lookup
grendello Jan 29, 2024
5d8604c
Fix per-arch override path
grendello Jan 30, 2024
1b51b7b
[WIP] This commit will break a LOT of tests
grendello Jan 30, 2024
5a6d37f
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Jan 31, 2024
d706ffe
Soo.... Android, yes.
grendello Jan 31, 2024
2a67bee
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 5, 2024
d86dbe3
oops
grendello Feb 5, 2024
703f019
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 6, 2024
45e4994
Update apkdesc files
grendello Feb 6, 2024
7db8c52
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 7, 2024
9e95566
Fix a number of build tests
grendello Feb 7, 2024
66f3db0
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Feb 7, 2024
1216016
Remove all the WINDOWS, APPLE, desktop and !NET code
grendello Feb 7, 2024
154e70f
Merge branch 'main' into dev/grendel/cpp-tweaks
grendello Feb 7, 2024
06b9106
Bump monodroid
grendello Feb 8, 2024
8c8929c
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 8, 2024
3551a42
Fix some FastDev tests
grendello Feb 8, 2024
74457bb
Merge branch 'dev/grendel/cpp-tweaks' into dev/grendel/blobs-in-lib
grendello Feb 8, 2024
357cbaa
Fix paths, both in the apk and on the filesystem
grendello Feb 8, 2024
3cc8731
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 8, 2024
7468112
Fix an off-by-one issue
grendello Feb 8, 2024
9ec4ed3
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 9, 2024
f565006
Don't scan Java.Interop.dll for JLO types
grendello Feb 9, 2024
a459ada
Make sure `JniAddNativeMethodRegistrationAttributePresent` is set
grendello Feb 9, 2024
4c671f3
Fix location from which we load typemaps with fastdev
grendello Feb 9, 2024
f860251
Update apkdesc
grendello Feb 9, 2024
153253e
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 9, 2024
106703d
Fix one mutation of the `ApplicationRunsWithDebuggerAndBreaks` test
grendello Feb 12, 2024
879604c
Fix two variations of `ApplicationRunsWithDebuggerAndBreaks`
grendello Feb 12, 2024
f3c8cd0
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 13, 2024
4824318
Fix the `LoggingPropsShouldCreateOverrideDirForRelease` test
grendello Feb 13, 2024
21941a4
Remove unnecessary references
grendello Feb 14, 2024
288984b
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 15, 2024
6298902
Trying to figure out the Debug build HttpClientHandler test failures
grendello Feb 15, 2024
3c1da09
Add more logging to AndroidClientHandler
grendello Feb 15, 2024
b5b618c
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 16, 2024
0de64f8
Continue to try to figure out why HttpClient tests fail in Debug
grendello Feb 16, 2024
3b4089d
Fix AOT profile recording + more Mono.Android tests debug stuff
grendello Feb 16, 2024
2e40843
Fix the `BuildBasicApplicationAndAotProfileIt` test
grendello Feb 19, 2024
075ca5d
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 19, 2024
36b33e7
[xaprepare] Make 7zip work with "dangerous" symlinks in ZIPs
grendello Feb 19, 2024
b108461
CI doesn't like it, try in a different spot?
grendello Feb 19, 2024
f5cce9e
Increase logcat buffer size for tests
grendello Feb 19, 2024
164b211
More verbose logging for apk tests
grendello Feb 20, 2024
d0b4c25
Package runtime config blob in the apk when fastdev is used
grendello Feb 20, 2024
c135880
Check version before passing `-snld`
grendello Feb 20, 2024
6d39914
Merge branch 'dev/grendel/fix-xaprepare-7zip-symlinks' into dev/grend…
grendello Feb 20, 2024
40ddf67
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 21, 2024
b73a7d6
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 21, 2024
d40ed29
Undo some debug stuff, remove some noise
grendello Feb 21, 2024
9421587
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 22, 2024
15358a3
Update after `main` merge
grendello Feb 22, 2024
59b0474
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 22, 2024
ce1be18
Bump monodroid again, something went wrong it seems
grendello Feb 22, 2024
fe3ad02
no duplicates please
grendello Feb 22, 2024
5d6559a
Bump monodroid
grendello Feb 23, 2024
b3559e6
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Feb 23, 2024
46f08c8
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Mar 1, 2024
1e15b0d
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Mar 1, 2024
e439510
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Mar 1, 2024
b197520
Update apkdesc
grendello Mar 4, 2024
fb86fd0
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Mar 11, 2024
747da76
Merge branch 'main' into dev/grendel/blobs-in-lib
grendello Mar 12, 2024
d856c52
Address feedback
grendello Mar 12, 2024
3d1b475
Synchronize assembly store format descriptions
grendello Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<NuGetApiPackageVersion>5.4.0</NuGetApiPackageVersion>
<LZ4PackageVersion>1.1.11</LZ4PackageVersion>
<MonoOptionsVersion>6.12.0.148</MonoOptionsVersion>
<SystemCollectionsImmutableVersion>6.0.0</SystemCollectionsImmutableVersion>
<SystemCollectionsImmutableVersion>8.0.0</SystemCollectionsImmutableVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
<ELFSharpVersion>2.13.1</ELFSharpVersion>
<HumanizerVersion>2.14.1</HumanizerVersion>
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Android.sln
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "decompress-assemblies", "to
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tmt", "tools\tmt\tmt.csproj", "{1A273ED2-AE84-48E9-9C23-E978C2D0CB34}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "assembly-store-reader", "tools\assembly-store-reader\assembly-store-reader.csproj", "{DA50FC92-7FE7-48B5-BDB6-CDA57B37BB51}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "assembly-store-reader", "tools\assembly-store-reader-mk2\assembly-store-reader.csproj", "{DA50FC92-7FE7-48B5-BDB6-CDA57B37BB51}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.JavaTypeSystem", "external\Java.Interop\src\Java.Interop.Tools.JavaTypeSystem\Java.Interop.Tools.JavaTypeSystem.csproj", "{4EFCED6E-9A6B-453A-94E4-CE4B736EC684}"
EndProject
Expand Down
9 changes: 8 additions & 1 deletion build-tools/scripts/TestApks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@
Timeout="60000"
/>
<Xamarin.Android.Tools.BootstrapTasks.Adb
Arguments="$(_AdbTarget) logcat -G 4M"
Arguments="$(_AdbTarget) logcat -G 256M"
IgnoreExitCode="True"
ToolExe="$(AdbToolExe)"
ToolPath="$(AdbToolPath)"
Timeout="60000"
/>
<Xamarin.Android.Tools.BootstrapTasks.Adb
Arguments="$(_AdbTarget) logcat -c"
IgnoreExitCode="True"
ToolExe="$(AdbToolExe)"
ToolPath="$(AdbToolPath)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,14 @@ _ResolveAssemblies MSBuild target.
<_ResolvedSymbolFiles Include="@(ResolvedFileToPublish)" Condition=" '%(ResolvedFileToPublish.Extension)' == '.pdb' " />
<_ResolvedJavaLibraries Include="@(ResolvedFileToPublish)" Condition=" '%(ResolvedFileToPublish.Extension)' == '.jar' " />
</ItemGroup>

<!-- All assemblies must be per-RID, thus no `->Distinct()` on `InputAssemblies` or `ResolvedSymbols` items -->
<ProcessAssemblies
RuntimeIdentifiers="@(_RIDs)"
InputAssemblies="@(_ResolvedAssemblyFiles->Distinct())"
DesignTimeBuild="$(DesignTimeBuild)"
InputAssemblies="@(_ResolvedAssemblyFiles)"
InputJavaLibraries="@(_ResolvedJavaLibraries->Distinct())"
ResolvedSymbols="@(_ResolvedSymbolFiles->Distinct())"
ResolvedSymbols="@(_ResolvedSymbolFiles)"
AndroidIncludeDebugSymbols="$(AndroidIncludeDebugSymbols)"
PublishTrimmed="$(PublishTrimmed)">
<Output TaskParameter="OutputAssemblies" ItemName="_ProcessedAssemblies" />
Expand Down
287 changes: 178 additions & 109 deletions src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using Microsoft.Build.Framework;
using Microsoft.Android.Build.Tasks;

using Xamarin.Android.Tools;

namespace Xamarin.Android.Tasks
{
public class GenerateCompressedAssembliesNativeSourceFiles : AndroidTask
Expand Down Expand Up @@ -41,38 +43,54 @@ void GenerateCompressedAssemblySources ()
return;
}

var assemblies = new SortedDictionary<string, CompressedAssemblyInfo> (StringComparer.Ordinal);
foreach (ITaskItem assembly in ResolvedAssemblies) {
if (bool.TryParse (assembly.GetMetadata ("AndroidSkipAddToPackage"), out bool value) && value) {
continue;
}
Dictionary<AndroidTargetArch, Dictionary<string, ITaskItem>> perArchAssemblies = MonoAndroidHelper.GetPerArchAssemblies (
ResolvedAssemblies,
SupportedAbis,
validate: true,
shouldSkip: (ITaskItem asm) => bool.TryParse (asm.GetMetadata ("AndroidSkipAddToPackage"), out bool value) && value
);
var archAssemblies = new Dictionary<AndroidTargetArch, Dictionary<string, CompressedAssemblyInfo>> ();
var counters = new Dictionary<AndroidTargetArch, uint> ();

foreach (var kvpPerArch in perArchAssemblies) {
AndroidTargetArch arch = kvpPerArch.Key;
Dictionary<string, ITaskItem> resolvedArchAssemblies = kvpPerArch.Value;

foreach (var kvp in resolvedArchAssemblies) {
ITaskItem assembly = kvp.Value;

if (!archAssemblies.TryGetValue (arch, out Dictionary<string, CompressedAssemblyInfo> assemblies)) {
assemblies = new Dictionary<string, CompressedAssemblyInfo> (StringComparer.OrdinalIgnoreCase);
archAssemblies.Add (arch, assemblies);
}

var assemblyKey = CompressedAssemblyInfo.GetDictionaryKey (assembly);
if (assemblies.ContainsKey (assemblyKey)) {
Log.LogDebugMessage ($"Skipping duplicate assembly: {assembly.ItemSpec}");
continue;
}
var assemblyKey = CompressedAssemblyInfo.GetDictionaryKey (assembly);
if (assemblies.ContainsKey (assemblyKey)) {
Log.LogDebugMessage ($"Skipping duplicate assembly: {assembly.ItemSpec} (arch {MonoAndroidHelper.GetAssemblyAbi(assembly)})");
continue;
}

var fi = new FileInfo (assembly.ItemSpec);
if (!fi.Exists) {
Log.LogError ($"Assembly {assembly.ItemSpec} does not exist");
continue;
}
var fi = new FileInfo (assembly.ItemSpec);
if (!fi.Exists) {
Log.LogError ($"Assembly {assembly.ItemSpec} does not exist");
continue;
}

assemblies.Add (assemblyKey, new CompressedAssemblyInfo (checked((uint)fi.Length)));
}

uint index = 0;
foreach (var kvp in assemblies) {
kvp.Value.DescriptorIndex = index++;
if (!counters.TryGetValue (arch, out uint counter)) {
counter = 0;
}
assemblies.Add (assemblyKey, new CompressedAssemblyInfo (checked((uint)fi.Length), counter++, arch, Path.GetFileNameWithoutExtension (assembly.ItemSpec)));
counters[arch] = counter;
}
}

string key = CompressedAssemblyInfo.GetKey (ProjectFullPath);
Log.LogDebugMessage ($"Storing compression assemblies info with key '{key}'");
BuildEngine4.RegisterTaskObjectAssemblyLocal (key, assemblies, RegisteredTaskObjectLifetime.Build);
Generate (assemblies);
BuildEngine4.RegisterTaskObjectAssemblyLocal (key, archAssemblies, RegisteredTaskObjectLifetime.Build);
Generate (archAssemblies);

void Generate (IDictionary<string, CompressedAssemblyInfo> dict)
void Generate (Dictionary<AndroidTargetArch, Dictionary<string, CompressedAssemblyInfo>> dict)
{
var composer = new CompressedAssembliesNativeAssemblyGenerator (Log, dict);
LLVMIR.LlvmIrModule compressedAssemblies = composer.Construct ();
Expand Down
Loading