// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using System; using System.Collections.Generic; namespace Google.Android.AppBundle.Editor.Internal.BuildTools { /// /// Provides a C# mirror of /// BundletoolConfig /// for use with JsonUtility. /// Inner class fields are camelCase to match json style. /// public static class BundletoolConfig { // Options for installTimeAssetModuleDefaultCompression public const string Unspecified = "UNSPECIFIED"; public const string Compressed = "COMPRESSED"; public const string Abi = "ABI"; public const string Language = "LANGUAGE"; public const string ScreenDensity = "SCREEN_DENSITY"; public const string TextureCompressionFormat = "TEXTURE_COMPRESSION_FORMAT"; public const string DeviceTier = "DEVICE_TIER"; // Options for BundleType public const string Regular = "REGULAR"; public const string AssetOnly = "ASSET_ONLY"; [Serializable] public class Config { public Optimizations optimizations = new Optimizations(); public Compression compression = new Compression(); public string type = Regular; public AssetModulesConfig asset_modules_config = new AssetModulesConfig(); } [Serializable] public class Optimizations { public SplitsConfig splitsConfig = new SplitsConfig(); public UncompressNativeLibraries uncompressNativeLibraries = new UncompressNativeLibraries(); public UncompressDexFiles uncompressDexFiles = new UncompressDexFiles(); public StandaloneConfig standaloneConfig = new StandaloneConfig(); } [Serializable] public class SplitsConfig { public List splitDimension = new List(); } [Serializable] public class StandaloneConfig { public List splitDimension = new List(); public bool strip64BitLibraries; } [Serializable] public class SplitDimension { public string value; public bool negate; public SuffixStripping suffixStripping = new SuffixStripping(); } [Serializable] public class Compression { public List uncompressedGlob = new List(); public string installTimeAssetModuleDefaultCompression = Unspecified; } [Serializable] public class UncompressNativeLibraries { public bool enabled; } [Serializable] public class UncompressDexFiles { public bool enabled; } [Serializable] public class SuffixStripping { public bool enabled; public string defaultSuffix; } [Serializable] public class AssetModulesConfig { public List app_version = new List(); public string asset_version_tag; } } }