@@ -101,8 +101,6 @@ public class BuildApk : AndroidTask
101
101
102
102
public string RuntimeConfigBinFilePath { get ; set ; }
103
103
104
- public bool UseAssemblyStore { get ; set ; }
105
-
106
104
public string ZipFlushFilesLimit { get ; set ; }
107
105
108
106
public string ZipFlushSizeLimit { get ; set ; }
@@ -423,24 +421,15 @@ void AddRuntimeConfigBlob (DSOWrapperGenerator.Config dsoWrapperConfig, ZipArchi
423
421
void AddAssemblies ( DSOWrapperGenerator . Config dsoWrapperConfig , ZipArchiveEx apk , bool debug , bool compress , IDictionary < AndroidTargetArch , Dictionary < string , CompressedAssemblyInfo > > compressedAssembliesInfo , string assemblyStoreApkName )
424
422
{
425
423
string sourcePath ;
426
- AssemblyCompression . AssemblyData compressedAssembly = null ;
427
424
string compressedOutputDir = Path . GetFullPath ( Path . Combine ( Path . GetDirectoryName ( ApkOutputPath ) , ".." , "lz4" ) ) ;
428
- AssemblyStoreBuilder ? storeBuilder = null ;
429
-
430
- if ( UseAssemblyStore ) {
431
- storeBuilder = new AssemblyStoreBuilder ( Log ) ;
432
- }
425
+ var storeBuilder = new AssemblyStoreBuilder ( Log ) ;
433
426
434
427
// Add user assemblies
435
428
AssemblyPackagingHelper . AddAssembliesFromCollection ( Log , SupportedAbis , ResolvedUserAssemblies , DoAddAssembliesFromArchCollection ) ;
436
429
437
430
// Add framework assemblies
438
431
AssemblyPackagingHelper . AddAssembliesFromCollection ( Log , SupportedAbis , ResolvedFrameworkAssemblies , DoAddAssembliesFromArchCollection ) ;
439
432
440
- if ( ! UseAssemblyStore ) {
441
- return ;
442
- }
443
-
444
433
Dictionary < AndroidTargetArch , string > assemblyStorePaths = storeBuilder . Generate ( AppSharedLibrariesDir ) ;
445
434
446
435
if ( assemblyStorePaths . Count == 0 ) {
@@ -467,46 +456,7 @@ void DoAddAssembliesFromArchCollection (TaskLoggingHelper log, AndroidTargetArch
467
456
// Thus, we no longer just store them in the apk but we call the `GetCompressionMethod` method to find out whether
468
457
// or not we're supposed to compress .so files.
469
458
sourcePath = CompressAssembly ( assembly ) ;
470
- if ( UseAssemblyStore ) {
471
- storeBuilder . AddAssembly ( sourcePath , assembly , includeDebugSymbols : debug ) ;
472
- return ;
473
- }
474
-
475
- // Add assembly
476
- ( string assemblyPath , string assemblyDirectory ) = GetInArchiveAssemblyPath ( assembly ) ;
477
- string wrappedSourcePath = DSOWrapperGenerator . WrapIt ( Log , dsoWrapperConfig , arch , sourcePath , Path . GetFileName ( assemblyPath ) ) ;
478
- AddFileToArchiveIfNewer ( apk , wrappedSourcePath , assemblyPath , compressionMethod : GetCompressionMethod ( assemblyPath ) ) ;
479
-
480
- // Try to add config if exists
481
- var config = Path . ChangeExtension ( assembly . ItemSpec , "dll.config" ) ;
482
- AddAssemblyConfigEntry ( dsoWrapperConfig , apk , arch , assemblyDirectory , config ) ;
483
-
484
- // Try to add symbols if Debug
485
- if ( ! debug ) {
486
- return ;
487
- }
488
-
489
- string symbols = Path . ChangeExtension ( assembly . ItemSpec , "pdb" ) ;
490
- if ( ! File . Exists ( symbols ) ) {
491
- return ;
492
- }
493
-
494
- string archiveSymbolsPath = assemblyDirectory + MonoAndroidHelper . MakeDiscreteAssembliesEntryName ( Path . GetFileName ( symbols ) ) ;
495
- string wrappedSymbolsPath = DSOWrapperGenerator . WrapIt ( Log , dsoWrapperConfig , arch , symbols , Path . GetFileName ( archiveSymbolsPath ) ) ;
496
- AddFileToArchiveIfNewer (
497
- apk ,
498
- wrappedSymbolsPath ,
499
- archiveSymbolsPath ,
500
- compressionMethod : GetCompressionMethod ( archiveSymbolsPath )
501
- ) ;
502
- }
503
-
504
- void EnsureCompressedAssemblyData ( string sourcePath , uint descriptorIndex )
505
- {
506
- if ( compressedAssembly == null )
507
- compressedAssembly = new AssemblyCompression . AssemblyData ( sourcePath , descriptorIndex ) ;
508
- else
509
- compressedAssembly . SetData ( sourcePath , descriptorIndex ) ;
459
+ storeBuilder . AddAssembly ( sourcePath , assembly , includeDebugSymbols : debug ) ;
510
460
}
511
461
512
462
string CompressAssembly ( ITaskItem assembly )
0 commit comments