From a3d16c0178d3794991f1cb2f656b66078efa2a26 Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Fri, 18 Dec 2015 11:33:32 +0000 Subject: [PATCH] Fix gitignore build/ is too generic, ignores valid paths. Test plan: - Built Android UI explorer, ReactAndroid, iOS UIExplorer, iOS React - Git still ignores build output files correctly --- .gitignore | 6 +++-- .../react/common/build/ReactBuildConfig.java | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.java diff --git a/.gitignore b/.gitignore index c4b7a9b47..d6b303279 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,10 @@ DerivedData *.xcuserstate project.xcworkspace -# Xcode, Gradle -build/ +# Gradle +/build/ +/Examples/**/android/app/build/ +/ReactAndroid/build # Android .idea diff --git a/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.java b/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.java new file mode 100644 index 000000000..6fcec141f --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +package com.facebook.react.common.build; + +import com.facebook.react.BuildConfig; + +/** + * Convenience class for accessing auto-generated BuildConfig so that a) other modules can just + * depend on this module instead of having to manually depend on generating their own build config + * and b) we don't have to deal with IntelliJ getting confused about the autogenerated BuildConfig + * class all over the place. + */ +public class ReactBuildConfig { + + public static final boolean DEBUG = BuildConfig.DEBUG; + public static final boolean IS_INTERNAL_BUILD = BuildConfig.IS_INTERNAL_BUILD; +}