BuildConfig.template (3466B)
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 5 package 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 */ 13 public 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_INCREMENTAL_INSTALL) 63 public static boolean IS_INCREMENTAL_INSTALL = true; 64 #else 65 public static boolean IS_INCREMENTAL_INSTALL; 66 #endif 67 68 #if defined(_IS_FOR_TEST) 69 public static boolean IS_FOR_TEST = true; 70 #else 71 public static boolean IS_FOR_TEST; 72 #endif 73 74 #if defined(_IS_CRONET_BUILD) 75 public static boolean IS_CRONET_BUILD = true; 76 #else 77 public static boolean IS_CRONET_BUILD; 78 #endif 79 80 #if defined(_WRITE_CLANG_PROFILING_DATA) 81 public static boolean WRITE_CLANG_PROFILING_DATA = true; 82 #else 83 public static boolean WRITE_CLANG_PROFILING_DATA; 84 #endif 85 86 #if defined(_DISABLE_DEBUG_LOGS) 87 public static boolean ENABLE_DEBUG_LOGS; 88 #else 89 public static boolean ENABLE_DEBUG_LOGS = true; 90 #endif 91 92 #if defined(_APK_ASSETS_SUFFIXED_LIST) 93 public static String[] APK_ASSETS_SUFFIXED_LIST = {_APK_ASSETS_SUFFIXED_LIST}; 94 public static String APK_ASSETS_SUFFIX = QUOTE(_APK_ASSETS_SUFFIX); 95 #else 96 public static String[] APK_ASSETS_SUFFIXED_LIST = {}; 97 public static String APK_ASSETS_SUFFIX = null; 98 #endif 99 100 // Enable features that are more typically available on desktop. 101 #if defined(_IS_DESKTOP_ANDROID) 102 public static boolean IS_DESKTOP_ANDROID = true; 103 #else 104 public static boolean IS_DESKTOP_ANDROID; 105 #endif 106 107 // Controls whether or not StrictModeContext is a no-op. 108 #if defined(_DISABLE_STRICT_MODE_CONTEXT) 109 public static boolean DISABLE_STRICT_MODE_CONTEXT = true; 110 #else 111 public static boolean DISABLE_STRICT_MODE_CONTEXT; 112 #endif 113 114 public static final String LOGTAG_PREFIX = QUOTE(_LOGTAG_PREFIX); 115 }