Skip to content

Commit

Permalink
Remove .mk prebuilt file and .mk file generation from codegen (#35540)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #35540

We now don't need to generate .mk files anymore, therefore I'm removing
this logic from the codegen. In RN 0.72 users should be fully migrated
to CMake.

Changelog:
[Android] [Removed] - Remove .mk prebuilt file and .mk file generation from codegen

Reviewed By: rshest

Differential Revision: D41654122

fbshipit-source-id: 3a3c01fa8ab4d48460338e1a9ce2ecbd6df25f47
  • Loading branch information
cortinico authored and facebook-github-bot committed Dec 5, 2022
1 parent 322a796 commit 7933dd7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 479 deletions.
211 changes: 0 additions & 211 deletions ReactAndroid/Android-prebuilt.mk

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -62,52 +62,6 @@ std::shared_ptr<TurboModule> ${libraryName}_ModuleProvider(const std::string &mo
`;
};

// Note: this Android.mk template includes dependencies for both NativeModule and components.
const AndroidMkTemplate = ({libraryName}: $ReadOnly<{libraryName: string}>) => {
return `# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := react_codegen_${libraryName}
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/${libraryName}/*.cpp)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/${libraryName}
LOCAL_SHARED_LIBRARIES := libfbjni \
libfolly_runtime \
libglog \
libjsi \
libreact_codegen_rncore \
libreact_debug \
libreact_nativemodule_core \
libreact_render_core \
libreact_render_debug \
libreact_render_graphics \
libreact_render_imagemanager \
libreact_render_mapbuffer \
librrc_image \
librrc_view \
libturbomodulejsijni \
libyoga
LOCAL_CFLAGS := \\
-DLOG_TAG=\\"ReactNative\\"
LOCAL_CFLAGS += -fexceptions -frtti -std=c++17 -Wall
include $(BUILD_SHARED_LIBRARY)
`;
};

// Note: this CMakeLists.txt template includes dependencies for both NativeModule and components.
const CMakeListsTemplate = ({
libraryName,
Expand Down Expand Up @@ -188,12 +142,6 @@ module.exports = {
});
return new Map([
[`jni/${fileName}`, replacedTemplate],
[
'jni/Android.mk',
AndroidMkTemplate({
libraryName: libraryName,
}),
],
['jni/CMakeLists.txt', CMakeListsTemplate({libraryName: libraryName})],
]);
},
Expand Down
Loading

0 comments on commit 7933dd7

Please sign in to comment.