1// Copyright 2015 The Chromium Authors 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.build; 6 7#define Q(x) #x 8#define QUOTE(x) Q(x) 9 10/** 11 * Build configuration. Generated on a per-target basis. 12 */ 13public class BuildConfig { 14 15#if defined(_ENABLE_ASSERTS) 16 public static boolean ENABLE_ASSERTS = true; 17#else 18 public static boolean ENABLE_ASSERTS; 19#endif 20 21#if defined(_IS_UBSAN) 22 public static boolean IS_UBSAN = true; 23#else 24 public static boolean IS_UBSAN; 25#endif 26 27#if defined(_IS_CHROME_BRANDED) 28 public static boolean IS_CHROME_BRANDED = true; 29#else 30 public static boolean IS_CHROME_BRANDED; 31#endif 32 33 // The ID of the android string resource that stores the product version. 34 // This layer of indirection is necessary to make the resource dependency 35 // optional for android_apk targets/base_java (ex. for cronet). 36#if defined(_RESOURCES_VERSION_VARIABLE) 37 public static int R_STRING_PRODUCT_VERSION = _RESOURCES_VERSION_VARIABLE; 38#else 39 public static int R_STRING_PRODUCT_VERSION; 40#endif 41 42 // Minimum SDK Version supported by this apk. 43 // Be cautious when using this value, as it can happen that older apks get 44 // installed on newer Android version (e.g. when a device goes through a 45 // system upgrade). It is also convenient for developing to have all 46 // features available through a single APK. 47 // However, it's pretty safe to assument that a feature specific to KitKat 48 // will never be needed in an APK with MIN_SDK_VERSION = Oreo. 49#if defined(_MIN_SDK_VERSION) 50 public static int MIN_SDK_VERSION = _MIN_SDK_VERSION; 51#else 52 public static int MIN_SDK_VERSION = 1; 53#endif 54 55 // Value of android:versionCode. 56#if defined(_VERSION_CODE) 57 public static long VERSION_CODE = _VERSION_CODE; 58#else 59 public static long VERSION_CODE = 1; 60#endif 61 62#if defined(_IS_BUNDLE) 63 public static boolean IS_BUNDLE = true; 64#else 65 public static boolean IS_BUNDLE; 66#endif 67 68#if defined(_IS_INCREMENTAL_INSTALL) 69 public static boolean IS_INCREMENTAL_INSTALL = true; 70#else 71 public static boolean IS_INCREMENTAL_INSTALL; 72#endif 73 74#if defined(_IS_FOR_TEST) 75 public static boolean IS_FOR_TEST = true; 76#else 77 public static boolean IS_FOR_TEST; 78#endif 79 80#if defined(_IS_CRONET_BUILD) 81 public static boolean IS_CRONET_BUILD = true; 82#else 83 public static boolean IS_CRONET_BUILD; 84#endif 85 86#if defined(_WRITE_CLANG_PROFILING_DATA) 87 public static boolean WRITE_CLANG_PROFILING_DATA = true; 88#else 89 public static boolean WRITE_CLANG_PROFILING_DATA; 90#endif 91 92#if defined(_DISABLE_DEBUG_LOGS) 93 public static boolean ENABLE_DEBUG_LOGS; 94#else 95 public static boolean ENABLE_DEBUG_LOGS = true; 96#endif 97 98#if defined(_APK_ASSETS_SUFFIXED_LIST) 99 public static String[] APK_ASSETS_SUFFIXED_LIST = {_APK_ASSETS_SUFFIXED_LIST}; 100 public static String APK_ASSETS_SUFFIX = QUOTE(_APK_ASSETS_SUFFIX); 101#else 102 public static String[] APK_ASSETS_SUFFIXED_LIST = {}; 103 public static String APK_ASSETS_SUFFIX = null; 104#endif 105 106 // Enable features that are more typically available on desktop. 107#if defined(_IS_DESKTOP_ANDROID) 108 public static boolean IS_DESKTOP_ANDROID = true; 109#else 110 public static boolean IS_DESKTOP_ANDROID; 111#endif 112 113 // Controls whether or not StrictModeContext is a no-op. 114#if defined(_DISABLE_STRICT_MODE_CONTEXT) 115 public static boolean DISABLE_STRICT_MODE_CONTEXT = true; 116#else 117 public static boolean DISABLE_STRICT_MODE_CONTEXT; 118#endif 119 120 public static final String LOGTAG_PREFIX = QUOTE(_LOGTAG_PREFIX); 121} 122