Skip to content

Commit

Permalink
Remove "Compression Method" support
Browse files Browse the repository at this point in the history
"Separate base APK Assets" was producing broken app bundles if the Compression Method was not set to "Default".

PiperOrigin-RevId: 410134883
  • Loading branch information
Google Play Team authored and jamcohen committed Nov 18, 2021
1 parent 0e0f951 commit 6aab001
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 147 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- Fixed issue #127: crash with IL2CPP and "Separate base APK asset" enabled
- Fixed issue #143: handle AssetBundle files that have file extensions
- Fixed issue #145: AAB upload to Play Console fails due to BundleConfig.pb file size
- Fixed issue #154: App Bundle build doesn't compress the app
- Fixed issue when installing Android APIs using the plugin
### Other
- Update minimum Target SDK version to 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Google.Android.AppBundle.Editor.Internal;
using Google.Android.AppBundle.Editor.Internal.Config;
using UnityEditor;
using UnityEngine;

namespace Google.Android.AppBundle.Editor
{
Expand All @@ -28,7 +26,7 @@ namespace Google.Android.AppBundle.Editor
public static class AndroidBuildHelper
{
// Allowed characters for splitting PlayerSettings.GetScriptingDefineSymbolsForGroup().
private static readonly char[] ScriptingDefineSymbolsSplitChars = { ';', ',', ' ' };
private static readonly char[] ScriptingDefineSymbolsSplitChars = {';', ',', ' '};

/// <summary>
/// Returns an array of enabled scenes from the "Scenes In Build" section of Unity's Build Settings window.
Expand All @@ -51,27 +49,11 @@ public static string[] GetEditorBuildEnabledScenes()
/// <returns>A new <see cref="BuildPlayerOptions"/> object.</returns>
public static BuildPlayerOptions CreateBuildPlayerOptions(string locationPathName)
{
var buildOptions = EditorUserBuildSettings.development ? BuildOptions.Development : BuildOptions.None;

try
{
var compressionBuildOption = UnityBuildSettingsHelper.GetCompressionBuildOption();
if (compressionBuildOption.HasValue)
{
buildOptions |= compressionBuildOption.Value;
}
}
catch (UnityBuildSettingsHelper.ReflectionException)
{
Debug.LogWarning(
"Failed to detect the compression method specified in the editor Build Settings window. Using Default.");
}

return new BuildPlayerOptions
{
assetBundleManifestPath = AndroidBuildConfiguration.AssetBundleManifestPath,
locationPathName = locationPathName,
options = buildOptions,
options = EditorUserBuildSettings.development ? BuildOptions.Development : BuildOptions.None,
scenes = GetEditorBuildEnabledScenes(),
target = BuildTarget.Android,
targetGroup = BuildTargetGroup.Android
Expand All @@ -86,7 +68,7 @@ public static void AddScriptingDefineSymbol(string symbol)
var scriptingDefineSymbols = GetScriptingDefineSymbols();
if (!IsScriptingSymbolDefined(scriptingDefineSymbols, symbol))
{
SetScriptingDefineSymbols(scriptingDefineSymbols.Concat(new[] { symbol }));
SetScriptingDefineSymbols(scriptingDefineSymbols.Concat(new[] {symbol}));
}
}

Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 6aab001

Please sign in to comment.