1// Copyright 2015 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package org.chromium.base;
6
7#define Q(x) #x
8#define QUOTE(x) Q(x)
9
10#if defined(USE_FINAL)
11#define MAYBE_FINAL final
12#else
13#define MAYBE_FINAL
14#endif
15
16/**
17 *  Build configuration. Generated on a per-target basis.
18 */
19public class BuildConfig {
20
21#if defined(ENABLE_MULTIDEX)
22    public static MAYBE_FINAL boolean IS_MULTIDEX_ENABLED = true;
23#else
24    public static MAYBE_FINAL boolean IS_MULTIDEX_ENABLED = false;
25#endif
26
27#if defined(_FIREBASE_APP_ID)
28    public static MAYBE_FINAL String FIREBASE_APP_ID = QUOTE(_FIREBASE_APP_ID);
29#else
30    public static MAYBE_FINAL String FIREBASE_APP_ID = "";
31#endif
32
33#if defined(_DCHECK_IS_ON)
34    public static MAYBE_FINAL boolean DCHECK_IS_ON = true;
35#else
36    public static MAYBE_FINAL boolean DCHECK_IS_ON = false;
37#endif
38
39#if defined(_IS_UBSAN)
40    public static MAYBE_FINAL boolean IS_UBSAN = true;
41#else
42    public static MAYBE_FINAL boolean IS_UBSAN = false;
43#endif
44
45    // Sorted list of locales that have a compressed .pak within assets.
46    // Stored as an array because AssetManager.list() is slow.
47#if defined(COMPRESSED_LOCALE_LIST)
48    public static MAYBE_FINAL String[] COMPRESSED_LOCALES = COMPRESSED_LOCALE_LIST;
49#else
50    public static MAYBE_FINAL String[] COMPRESSED_LOCALES = {};
51#endif
52
53    // Sorted list of locales that have an uncompressed .pak within assets.
54    // Stored as an array because AssetManager.list() is slow.
55#if defined(UNCOMPRESSED_LOCALE_LIST)
56    public static MAYBE_FINAL String[] UNCOMPRESSED_LOCALES = UNCOMPRESSED_LOCALE_LIST;
57#else
58    public static MAYBE_FINAL String[] UNCOMPRESSED_LOCALES = {};
59#endif
60
61    // The ID of the android string resource that stores the product version.
62    // This layer of indirection is necessary to make the resource dependency
63    // optional for android_apk targets/base_java (ex. for cronet).
64#if defined(_RESOURCES_VERSION_VARIABLE)
65    public static MAYBE_FINAL int R_STRING_PRODUCT_VERSION = _RESOURCES_VERSION_VARIABLE;
66#else
67    // Default value, do not use.
68    public static MAYBE_FINAL int R_STRING_PRODUCT_VERSION = 0;
69#endif
70}
71