mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65e4d98a71 | ||
|
|
66b82aec55 | ||
|
|
2cd3173991 | ||
|
|
61f0d1a7d1 | ||
|
|
57cc524e93 | ||
|
|
bca4cf023a | ||
|
|
f5d371a2f9 | ||
|
|
b1c30f8f8a | ||
|
|
54f5c8c26c | ||
|
|
48f9733867 | ||
|
|
43d67cd1ec | ||
|
|
805afe4847 | ||
|
|
0924a28b19 | ||
|
|
1b2b2198e1 | ||
|
|
319e4df458 | ||
|
|
71548ffd69 | ||
|
|
58eb8b13a0 | ||
|
|
5ba5ff6eba | ||
|
|
a2a7032477 | ||
|
|
f06df0ef2b | ||
|
|
0fd6ade862 |
+9
-14
@@ -569,20 +569,18 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- run_yarn
|
||||
- attach_workspace:
|
||||
at: .
|
||||
|
||||
- run:
|
||||
name: Setup the Android Template
|
||||
name: Create Android template project
|
||||
command: |
|
||||
REPO_ROOT=$(pwd)
|
||||
PACKAGE=$(cat build/react-native-package-version)
|
||||
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE"
|
||||
cd template
|
||||
# We replace the "react-native" dependency version with file:.. so we use it from source.
|
||||
sed -i 's/\"react-native\"\:.*/\"react-native\"\: \"file\:\.\.\"/g' package.json
|
||||
npm add $PATH_TO_PACKAGE
|
||||
npm install
|
||||
# react-native-community/cli is needed as the Android template is referencing a .gradle file inside it.
|
||||
npm i @react-native-community/cli
|
||||
|
||||
- run:
|
||||
name: Bundle the latest version of ReactAndroid
|
||||
command: ./gradlew :ReactAndroid:publishReleasePublicationToNpmRepository
|
||||
|
||||
- run:
|
||||
name: Build the template application
|
||||
@@ -866,11 +864,6 @@ workflows:
|
||||
- build_npm_package:
|
||||
# Build a release package on every untagged commit, but do not publish to npm.
|
||||
publish_npm_args: --dry-run
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- /^pull\/.*$/
|
||||
- test_js:
|
||||
run_disabled_tests: false
|
||||
filters:
|
||||
@@ -882,6 +875,8 @@ workflows:
|
||||
branches:
|
||||
ignore: gh-pages
|
||||
- test_android_template:
|
||||
requires:
|
||||
- build_npm_package
|
||||
filters:
|
||||
branches:
|
||||
ignore: gh-pages
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/LoadingView.js
|
||||
|
||||
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/LoadingView.js
|
||||
|
||||
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
|
||||
+9
-9
@@ -1,9 +1,9 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.4)
|
||||
CFPropertyList (3.0.5)
|
||||
rexml
|
||||
activesupport (6.1.4.1)
|
||||
activesupport (6.1.4.6)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
@@ -15,7 +15,7 @@ GEM
|
||||
httpclient (~> 2.8, >= 2.8.3)
|
||||
json (>= 1.5.1)
|
||||
atomos (0.1.3)
|
||||
claide (1.0.3)
|
||||
claide (1.1.0)
|
||||
cocoapods (1.11.2)
|
||||
addressable (~> 2.8)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
@@ -58,15 +58,15 @@ GEM
|
||||
escape (0.0.4)
|
||||
ethon (0.15.0)
|
||||
ffi (>= 1.15.0)
|
||||
ffi (1.15.4)
|
||||
ffi (1.15.5)
|
||||
fourflusher (2.3.1)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.1.3)
|
||||
httpclient (2.8.3)
|
||||
i18n (1.8.10)
|
||||
i18n (1.10.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (2.6.0)
|
||||
minitest (5.14.4)
|
||||
json (2.6.1)
|
||||
minitest (5.15.0)
|
||||
molinillo (0.8.0)
|
||||
nanaimo (0.3.0)
|
||||
nap (1.1.0)
|
||||
@@ -85,7 +85,7 @@ GEM
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.3.0)
|
||||
rexml (~> 3.2.4)
|
||||
zeitwerk (2.5.1)
|
||||
zeitwerk (2.5.4)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -97,4 +97,4 @@ RUBY VERSION
|
||||
ruby 2.7.4p191
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.29
|
||||
2.2.27
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/**
|
||||
* @generated by scripts/set-rn-version.js
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @format
|
||||
* @generated by scripts/set-rn-version.js
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
exports.version = {
|
||||
major: 0,
|
||||
minor: 0,
|
||||
minor: 68,
|
||||
patch: 0,
|
||||
prerelease: null,
|
||||
prerelease: 'rc.2',
|
||||
};
|
||||
|
||||
@@ -147,21 +147,7 @@ static UIColor *defaultPlaceholderColor()
|
||||
|
||||
- (void)setAttributedText:(NSAttributedString *)attributedText
|
||||
{
|
||||
// Using `setAttributedString:` while user is typing breaks some internal mechanics
|
||||
// when entering complex input languages such as Chinese, Korean or Japanese.
|
||||
// see: https://github.com/facebook/react-native/issues/19339
|
||||
|
||||
// We try to avoid calling this method as much as we can.
|
||||
// If the text has changed, there is nothing we can do.
|
||||
if (![super.attributedText.string isEqualToString:attributedText.string]) {
|
||||
[super setAttributedText:attributedText];
|
||||
} else {
|
||||
// But if the text is preserved, we just copying the attributes from the source string.
|
||||
if (![super.attributedText isEqualToAttributedString:attributedText]) {
|
||||
[self copyTextAttributesFrom:attributedText];
|
||||
}
|
||||
}
|
||||
|
||||
[super setAttributedText:attributedText];
|
||||
[self textDidChange];
|
||||
}
|
||||
|
||||
@@ -311,18 +297,4 @@ static UIColor *defaultPlaceholderColor()
|
||||
|
||||
#pragma mark - Utility Methods
|
||||
|
||||
- (void)copyTextAttributesFrom:(NSAttributedString *)sourceString
|
||||
{
|
||||
[self.textStorage beginEditing];
|
||||
|
||||
NSTextStorage *textStorage = self.textStorage;
|
||||
[sourceString enumerateAttributesInRange:NSMakeRange(0, sourceString.length)
|
||||
options:NSAttributedStringEnumerationReverse
|
||||
usingBlock:^(NSDictionary<NSAttributedStringKey,id> * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) {
|
||||
[textStorage setAttributes:attrs range:range];
|
||||
}];
|
||||
|
||||
[self.textStorage endEditing];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -104,6 +104,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
||||
// Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
|
||||
// text that we should disregard. See https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc
|
||||
// for more info.
|
||||
// Also, updating the attributed text while inputting Korean language will break input mechanism.
|
||||
// If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in NSOriginalFont.
|
||||
// Lastly, when entering a password, etc., there will be additional styling on the field as the native text view
|
||||
// handles showing the last character for a split second.
|
||||
@@ -116,6 +117,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
||||
|
||||
BOOL shouldFallbackToBareTextComparison =
|
||||
[self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] ||
|
||||
[self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] ||
|
||||
self.backedTextInputView.markedTextRange ||
|
||||
self.backedTextInputView.isSecureTextEntry ||
|
||||
fontHasBeenUpdatedBySystem;
|
||||
|
||||
@@ -21,11 +21,11 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^(void){
|
||||
__rnVersion = @{
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(0),
|
||||
RCTVersionPatch: @(0),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(68),
|
||||
RCTVersionPatch: @(0),
|
||||
RCTVersionPrerelease: @"rc.2",
|
||||
};
|
||||
});
|
||||
return __rnVersion;
|
||||
}
|
||||
|
||||
@@ -617,8 +617,9 @@ using namespace facebook::react;
|
||||
// the settings on a dictation.
|
||||
// Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
|
||||
// text that we should disregard. See
|
||||
// https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info. If
|
||||
// the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
|
||||
// https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info.
|
||||
// Also, updating the attributed text while inputting Korean language will break input mechanism.
|
||||
// If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
|
||||
// NSOriginalFont. Lastly, when entering a password, etc., there will be additional styling on the field as the native
|
||||
// text view handles showing the last character for a split second.
|
||||
__block BOOL fontHasBeenUpdatedBySystem = false;
|
||||
@@ -633,6 +634,7 @@ using namespace facebook::react;
|
||||
|
||||
BOOL shouldFallbackToBareTextComparison =
|
||||
[_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] ||
|
||||
[_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] ||
|
||||
_backedTextInputView.markedTextRange || _backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem;
|
||||
|
||||
if (shouldFallbackToBareTextComparison) {
|
||||
|
||||
@@ -351,6 +351,12 @@ android {
|
||||
packagingOptions {
|
||||
exclude("META-INF/NOTICE")
|
||||
exclude("META-INF/LICENSE")
|
||||
// We intentionally don't want to bundle any JS Runtime inside the Android AAR
|
||||
// we produce. The reason behind this is that we want to allow users to pick the
|
||||
// JS engine by specifying a dependency on either `hermes-engine` or `android-jsc`
|
||||
// that will include the necessary .so files to load.
|
||||
exclude("**/libhermes.so")
|
||||
exclude("**/libjsc.so")
|
||||
}
|
||||
|
||||
configurations {
|
||||
@@ -400,7 +406,7 @@ react {
|
||||
// This should be changed to a more generic name, e.g. `ReactCoreSpec`.
|
||||
libraryName = "rncore"
|
||||
jsRootDir = file("../Libraries")
|
||||
reactRoot = file("$projectDir/..")
|
||||
reactNativeDir = file("$projectDir/..")
|
||||
useJavaGenerator = System.getenv("USE_CODEGEN_JAVAPOET")?.toBoolean() ?: false
|
||||
// We search for the codegen in either one of the `node_modules` folder or in the
|
||||
// root packages folder (that's for when we build from source without calling `yarn install`).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0-main
|
||||
VERSION_NAME=0.68.0-rc.2
|
||||
GROUP=com.facebook.react
|
||||
|
||||
POM_NAME=ReactNative
|
||||
|
||||
Vendored
+4
-6
@@ -24,17 +24,15 @@
|
||||
# See http://sourceforge.net/p/proguard/bugs/466/
|
||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
|
||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
|
||||
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
|
||||
-keep,allowobfuscation @interface com.facebook.jni.annotations.DoNotStrip
|
||||
|
||||
# Do not strip any method/class that is annotated with @DoNotStrip
|
||||
-keep @com.facebook.proguard.annotations.DoNotStrip class *
|
||||
-keep @com.facebook.common.internal.DoNotStrip class *
|
||||
-keep @com.facebook.jni.annotations.DoNotStrip class *
|
||||
-keepclassmembers class * {
|
||||
@com.facebook.proguard.annotations.DoNotStrip *;
|
||||
@com.facebook.common.internal.DoNotStrip *;
|
||||
@com.facebook.jni.annotations.DoNotStrip *;
|
||||
}
|
||||
|
||||
-keep @com.facebook.proguard.annotations.DoNotStripAny class * {
|
||||
*;
|
||||
}
|
||||
|
||||
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
|
||||
|
||||
@@ -27,6 +27,7 @@ import android.view.Surface;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -826,9 +827,12 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
||||
getRootView().getWindowVisibleDisplayFrame(mVisibleViewArea);
|
||||
int notchHeight = 0;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
DisplayCutout displayCutout = getRootView().getRootWindowInsets().getDisplayCutout();
|
||||
if (displayCutout != null) {
|
||||
notchHeight = displayCutout.getSafeInsetTop();
|
||||
WindowInsets insets = getRootView().getRootWindowInsets();
|
||||
if (insets != null) {
|
||||
DisplayCutout displayCutout = insets.getDisplayCutout();
|
||||
if (displayCutout != null) {
|
||||
notchHeight = displayCutout.getSafeInsetTop();
|
||||
}
|
||||
}
|
||||
}
|
||||
final int heightDiff =
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
public class ReactNativeVersion {
|
||||
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
||||
"major", 0,
|
||||
"minor", 0,
|
||||
"minor", 68,
|
||||
"patch", 0,
|
||||
"prerelease", null);
|
||||
"prerelease", "rc.2");
|
||||
}
|
||||
|
||||
@@ -343,11 +343,6 @@ public class ReactTextShadowNode extends ReactBaseTextShadowNode {
|
||||
mJustificationMode);
|
||||
uiViewOperationQueue.enqueueUpdateExtraData(getReactTag(), reactTextUpdate);
|
||||
}
|
||||
|
||||
if (mAdjustsFontSizeToFit) {
|
||||
// Nodes with `adjustsFontSizeToFit` enabled need to be remeasured on every relayout.
|
||||
markUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
@ReactProp(name = "onTextLayout")
|
||||
|
||||
@@ -16,9 +16,9 @@ namespace facebook::react {
|
||||
|
||||
constexpr struct {
|
||||
int32_t Major = 0;
|
||||
int32_t Minor = 0;
|
||||
int32_t Minor = 68;
|
||||
int32_t Patch = 0;
|
||||
std::string_view Prerelease = "";
|
||||
std::string_view Prerelease = "rc.2";
|
||||
} ReactNativeVersion;
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
@@ -33,11 +33,11 @@ MapBuffer::MapBuffer(std::vector<uint8_t> data) : bytes_(std::move(data)) {
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t MapBuffer::getKeyBucket(Key key) const {
|
||||
uint32_t lo = 0;
|
||||
uint32_t hi = count_ - 1;
|
||||
int32_t MapBuffer::getKeyBucket(Key key) const {
|
||||
int32_t lo = 0;
|
||||
int32_t hi = count_ - 1;
|
||||
while (lo <= hi) {
|
||||
uint32_t mid = (lo + hi) >> 1;
|
||||
int32_t mid = (lo + hi) >> 1;
|
||||
|
||||
Key midVal =
|
||||
*reinterpret_cast<Key const *>(bytes_.data() + bucketOffset(mid));
|
||||
@@ -112,7 +112,7 @@ MapBuffer MapBuffer::getMapBuffer(Key key) const {
|
||||
return MapBuffer(std::move(value));
|
||||
}
|
||||
|
||||
uint32_t MapBuffer::size() const {
|
||||
size_t MapBuffer::size() const {
|
||||
return bytes_.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ class MapBuffer {
|
||||
uint32_t bufferSize; // Amount of bytes used to store the map in memory
|
||||
};
|
||||
|
||||
struct __attribute__((__packed__)) Bucket {
|
||||
#pragma pack(push, 1)
|
||||
struct Bucket {
|
||||
Key key;
|
||||
uint16_t type;
|
||||
uint64_t data;
|
||||
@@ -88,6 +89,7 @@ class MapBuffer {
|
||||
Bucket(Key key, uint16_t type, uint64_t data)
|
||||
: key(key), type(type), data(data) {}
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
static_assert(sizeof(Header) == 8, "MapBuffer header size is incorrect.");
|
||||
static_assert(sizeof(Bucket) == 12, "MapBuffer bucket size is incorrect.");
|
||||
@@ -124,7 +126,7 @@ class MapBuffer {
|
||||
// TODO T83483191: review this declaration
|
||||
MapBuffer getMapBuffer(MapBuffer::Key key) const;
|
||||
|
||||
uint32_t size() const;
|
||||
size_t size() const;
|
||||
|
||||
uint8_t const *data() const;
|
||||
|
||||
@@ -140,7 +142,7 @@ class MapBuffer {
|
||||
// returns the relative offset of the first byte of dynamic data
|
||||
int32_t getDynamicDataOffset() const;
|
||||
|
||||
uint32_t getKeyBucket(MapBuffer::Key key) const;
|
||||
int32_t getKeyBucket(MapBuffer::Key key) const;
|
||||
|
||||
friend ReadableMapBuffer;
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace facebook {
|
||||
namespace react {
|
||||
|
||||
constexpr uint32_t INT_SIZE = sizeof(uint32_t);
|
||||
constexpr double DOUBLE_SIZE = sizeof(double);
|
||||
constexpr uint32_t DOUBLE_SIZE = sizeof(double);
|
||||
constexpr uint32_t MAX_BUCKET_VALUE_SIZE = sizeof(uint64_t);
|
||||
|
||||
MapBuffer MapBufferBuilder::EMPTY() {
|
||||
@@ -23,6 +23,8 @@ MapBuffer MapBufferBuilder::EMPTY() {
|
||||
|
||||
MapBufferBuilder::MapBufferBuilder(uint32_t initialSize) {
|
||||
buckets_.reserve(initialSize);
|
||||
header_.count = 0;
|
||||
header_.bufferSize = 0;
|
||||
}
|
||||
|
||||
void MapBufferBuilder::storeKeyValue(
|
||||
@@ -76,7 +78,7 @@ void MapBufferBuilder::putInt(MapBuffer::Key key, int32_t value) {
|
||||
}
|
||||
|
||||
void MapBufferBuilder::putString(MapBuffer::Key key, std::string const &value) {
|
||||
int32_t strSize = value.size();
|
||||
auto strSize = value.size();
|
||||
const char *strData = value.data();
|
||||
|
||||
// format [length of string (int)] + [Array of Characters in the string]
|
||||
@@ -94,7 +96,7 @@ void MapBufferBuilder::putString(MapBuffer::Key key, std::string const &value) {
|
||||
}
|
||||
|
||||
void MapBufferBuilder::putMapBuffer(MapBuffer::Key key, MapBuffer const &map) {
|
||||
int32_t mapBufferSize = map.size();
|
||||
auto mapBufferSize = map.size();
|
||||
|
||||
auto offset = dynamicData_.size();
|
||||
|
||||
@@ -122,9 +124,9 @@ MapBuffer MapBufferBuilder::build() {
|
||||
// Create buffer: [header] + [key, values] + [dynamic data]
|
||||
auto bucketSize = buckets_.size() * sizeof(MapBuffer::Bucket);
|
||||
auto headerSize = sizeof(MapBuffer::Header);
|
||||
uint32_t bufferSize = headerSize + bucketSize + dynamicData_.size();
|
||||
auto bufferSize = headerSize + bucketSize + dynamicData_.size();
|
||||
|
||||
header_.bufferSize = bufferSize;
|
||||
header_.bufferSize = static_cast<uint32_t>(bufferSize);
|
||||
|
||||
if (needsSort_) {
|
||||
std::sort(buckets_.begin(), buckets_.end(), compareBuckets);
|
||||
|
||||
@@ -38,7 +38,7 @@ class MapBufferBuilder {
|
||||
MapBuffer build();
|
||||
|
||||
private:
|
||||
MapBuffer::Header header_ = {.count = 0, .bufferSize = 0};
|
||||
MapBuffer::Header header_;
|
||||
|
||||
std::vector<MapBuffer::Bucket> buckets_{};
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# This is causing issue with dependencies task: https://github.com/gradle/gradle/issues/9645#issuecomment-530746758
|
||||
# org.gradle.configureondemand=true
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
|
||||
org.gradle.parallel=true
|
||||
|
||||
android.useAndroidX=true
|
||||
|
||||
+45
-12
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "react-native",
|
||||
"private": true,
|
||||
"version": "1000.0.0",
|
||||
"version": "0.68.0-rc.2",
|
||||
"bin": "./cli.js",
|
||||
"description": "A framework for building native apps using React",
|
||||
"license": "MIT",
|
||||
@@ -83,18 +82,14 @@
|
||||
"test-android-e2e": "yarn run docker-build-android && yarn run test-android-run-e2e",
|
||||
"test-ios": "./scripts/objc-test.sh test"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/!(eslint-config-react-native-community)",
|
||||
"repo-config"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"react": "17.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/create-cache-key-function": "^27.0.1",
|
||||
"@react-native-community/cli": "^6.0.0",
|
||||
"@react-native-community/cli-platform-android": "^6.0.0",
|
||||
"@react-native-community/cli-platform-ios": "^6.0.0",
|
||||
"@react-native-community/cli": "^7.0.3",
|
||||
"@react-native-community/cli-platform-android": "^7.0.1",
|
||||
"@react-native-community/cli-platform-ios": "^7.0.1",
|
||||
"@react-native/assets": "1.0.0",
|
||||
"@react-native/normalize-color": "2.0.0",
|
||||
"@react-native/polyfills": "2.0.0",
|
||||
@@ -113,6 +108,7 @@
|
||||
"pretty-format": "^26.5.2",
|
||||
"promise": "^8.0.3",
|
||||
"react-devtools-core": "^4.23.0",
|
||||
"react-native-gradle-plugin": "^0.0.5",
|
||||
"react-refresh": "^0.4.0",
|
||||
"react-shallow-renderer": "16.14.1",
|
||||
"regenerator-runtime": "^0.13.2",
|
||||
@@ -120,11 +116,48 @@
|
||||
"stacktrace-parser": "^0.1.3",
|
||||
"use-subscription": "^1.0.0",
|
||||
"whatwg-fetch": "^3.0.0",
|
||||
"ws": "^6.1.4"
|
||||
"ws": "^6.1.4",
|
||||
"react-native-codegen": "^0.0.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"flow-bin": "^0.170.0",
|
||||
"react": "17.0.2"
|
||||
"react": "17.0.2",
|
||||
"@babel/core": "^7.14.0",
|
||||
"@babel/generator": "^7.14.0",
|
||||
"@react-native-community/eslint-plugin": "*",
|
||||
"@react-native/eslint-plugin-specs": ">0.0.2",
|
||||
"@reactions/component": "^2.0.2",
|
||||
"async": "^2.4.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"clang-format": "^1.2.4",
|
||||
"connect": "^3.6.5",
|
||||
"coveralls": "^3.0.2",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-fb-strict": "^26.0.0",
|
||||
"eslint-config-fbjs": "^3.1.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-babel": "^5.3.1",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-flowtype": "^7.0.0",
|
||||
"eslint-plugin-jest": "^25.2.4",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-react": "^7.26.1",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"eslint-plugin-react-native": "^3.11.0",
|
||||
"eslint-plugin-relay": "^1.8.2",
|
||||
"inquirer": "^7.1.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest-junit": "^10.0.0",
|
||||
"jscodeshift": "^0.13.1",
|
||||
"metro-babel-register": "0.67.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"prettier": "^2.4.1",
|
||||
"react-test-renderer": "17.0.2",
|
||||
"shelljs": "^0.8.4",
|
||||
"signedsource": "^1.0.0",
|
||||
"ws": "^6.1.4",
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
"codegenConfig": {
|
||||
"libraries": [
|
||||
@@ -144,4 +177,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,8 +46,8 @@ dependencies {
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-gradle-plugin",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"description": "⚛️ Gradle Plugin for React Native",
|
||||
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-gradle-plugin",
|
||||
"repository": {
|
||||
|
||||
+45
-14
@@ -29,13 +29,13 @@ abstract class ReactExtension @Inject constructor(project: Project) {
|
||||
val applyAppPlugin: Property<Boolean> = objects.property(Boolean::class.java).convention(false)
|
||||
|
||||
/**
|
||||
* The path to the react root folder. This is the path to the root folder where the `node_modules`
|
||||
* folder is present. All the CLI commands will be invoked from this folder as working directory.
|
||||
* The path to the root of your project. This is the path to where the `package.json` lives. All
|
||||
* the CLI commands will be invoked from this folder as working directory.
|
||||
*
|
||||
* Default: $projectDir/../../
|
||||
* Default: ${rootProject.dir}/../
|
||||
*/
|
||||
val reactRoot: DirectoryProperty =
|
||||
objects.directoryProperty().convention(project.layout.projectDirectory.dir("../../"))
|
||||
val root: DirectoryProperty =
|
||||
objects.directoryProperty().convention(project.rootProject.layout.projectDirectory.dir("../"))
|
||||
|
||||
/**
|
||||
* The path to the JS entry file. If not specified, the plugin will try to resolve it using a list
|
||||
@@ -45,7 +45,7 @@ abstract class ReactExtension @Inject constructor(project: Project) {
|
||||
|
||||
/**
|
||||
* The path to the React Native CLI. If not specified, the plugin will try to resolve it looking
|
||||
* for `react-native` CLI inside `node_modules` in [reactRoot].
|
||||
* for `react-native` CLI inside `node_modules` in [root].
|
||||
*/
|
||||
val cliPath: Property<String> = objects.property(String::class.java)
|
||||
|
||||
@@ -56,9 +56,7 @@ abstract class ReactExtension @Inject constructor(project: Project) {
|
||||
val nodeExecutableAndArgs: ListProperty<String> =
|
||||
objects.listProperty(String::class.java).convention(listOf("node"))
|
||||
|
||||
/**
|
||||
* The command to use to invoke bundle. Default is `bundle` and will be invoked on [reactRoot].
|
||||
*/
|
||||
/** The command to use to invoke bundle. Default is `bundle` and will be invoked on [root]. */
|
||||
val bundleCommand: Property<String> = objects.property(String::class.java).convention("bundle")
|
||||
|
||||
/**
|
||||
@@ -190,19 +188,27 @@ abstract class ReactExtension @Inject constructor(project: Project) {
|
||||
/** Codegen Config */
|
||||
|
||||
/**
|
||||
* The path to the react-native-codegen folder.
|
||||
* The path to the react-native-codegen NPM package folder.
|
||||
*
|
||||
* Default: $projectDir/../../node_modules/react-native-codegen
|
||||
* Default: ${rootProject.dir}/../node_modules/react-native-codegen
|
||||
*/
|
||||
val codegenDir: DirectoryProperty =
|
||||
objects.directoryProperty().convention(reactRoot.dir("node_modules/react-native-codegen"))
|
||||
objects.directoryProperty().convention(root.dir("node_modules/react-native-codegen"))
|
||||
|
||||
/**
|
||||
* The path to the react-native NPM package folder.
|
||||
*
|
||||
* Default: ${rootProject.dir}/../node_modules/react-native-codegen
|
||||
*/
|
||||
val reactNativeDir: DirectoryProperty =
|
||||
objects.directoryProperty().convention(root.dir("node_modules/react-native"))
|
||||
|
||||
/**
|
||||
* The root directory for all JS files for the app.
|
||||
*
|
||||
* Default: $projectDir/../../
|
||||
* Default: [root] (i.e. ${rootProject.dir}/../)
|
||||
*/
|
||||
val jsRootDir: DirectoryProperty = objects.directoryProperty().convention(reactRoot.get())
|
||||
val jsRootDir: DirectoryProperty = objects.directoryProperty().convention(root.get())
|
||||
|
||||
/**
|
||||
* The library name that will be used for the codegen artifacts.
|
||||
@@ -222,4 +228,29 @@ abstract class ReactExtension @Inject constructor(project: Project) {
|
||||
|
||||
/** Whether the Java Generator (based on Javapoet) should be used or not. Default: false */
|
||||
val useJavaGenerator: Property<Boolean> = objects.property(Boolean::class.java).convention(false)
|
||||
|
||||
/**
|
||||
* The `reactRoot` property was confusing and should not be used.
|
||||
*
|
||||
* You should instead use either:
|
||||
* - [root] to point to your root project (where the package.json lives)
|
||||
* - [reactNativeDir] to point to the NPM package of react native.
|
||||
*
|
||||
* A valid configuration would look like:
|
||||
*
|
||||
* ```
|
||||
* react {
|
||||
* root = rootProject.file("..")
|
||||
* reactNativeDir = rootProject.file("../node_modules/react-native")
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Please also note that those are the default value and you most likely don't need those at all.
|
||||
*/
|
||||
@Deprecated(
|
||||
"reactRoot was confusing and has been replace with root" +
|
||||
"to point to your root project and reactNativeDir to point to " +
|
||||
"the folder of the react-native NPM package",
|
||||
replaceWith = ReplaceWith("reactNativeRoot"))
|
||||
val reactRoot: DirectoryProperty = objects.directoryProperty()
|
||||
}
|
||||
|
||||
+23
-1
@@ -15,17 +15,38 @@ import com.facebook.react.tasks.BuildCodegenCLITask
|
||||
import com.facebook.react.tasks.GenerateCodegenArtifactsTask
|
||||
import com.facebook.react.tasks.GenerateCodegenSchemaTask
|
||||
import java.io.File
|
||||
import kotlin.system.exitProcess
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.internal.jvm.Jvm
|
||||
|
||||
class ReactPlugin : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
checkJvmVersion(project)
|
||||
val extension = project.extensions.create("react", ReactExtension::class.java, project)
|
||||
applyAppPlugin(project, extension)
|
||||
applyCodegenPlugin(project, extension)
|
||||
}
|
||||
|
||||
private fun checkJvmVersion(project: Project) {
|
||||
val jvmVersion = Jvm.current()?.javaVersion?.majorVersion
|
||||
if ((jvmVersion?.toIntOrNull() ?: 0) <= 8) {
|
||||
project.logger.error(
|
||||
"""
|
||||
|
||||
********************************************************************************
|
||||
|
||||
ERROR: requires JDK11 or higher.
|
||||
Incompatible major version detected: '$jvmVersion'
|
||||
|
||||
********************************************************************************
|
||||
|
||||
""".trimIndent())
|
||||
exitProcess(1)
|
||||
}
|
||||
}
|
||||
|
||||
private fun applyAppPlugin(project: Project, config: ReactExtension) {
|
||||
project.afterEvaluate {
|
||||
if (config.applyAppPlugin.getOrElse(false)) {
|
||||
@@ -75,7 +96,8 @@ class ReactPlugin : Plugin<Project> {
|
||||
project.tasks.register(
|
||||
"generateCodegenArtifactsFromSchema", GenerateCodegenArtifactsTask::class.java) {
|
||||
it.dependsOn(generateCodegenSchemaTask)
|
||||
it.reactRoot.set(extension.reactRoot)
|
||||
it.reactNativeDir.set(extension.reactNativeDir)
|
||||
it.deprecatedReactRoot.set(extension.reactRoot)
|
||||
it.nodeExecutableAndArgs.set(extension.nodeExecutableAndArgs)
|
||||
it.codegenDir.set(extension.codegenDir)
|
||||
it.useJavaGenerator.set(extension.useJavaGenerator)
|
||||
|
||||
+3
-6
@@ -17,7 +17,6 @@ import com.facebook.react.utils.detectedCliPath
|
||||
import com.facebook.react.utils.detectedEntryFile
|
||||
import com.facebook.react.utils.detectedHermesCommand
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.tasks.Copy
|
||||
@@ -56,11 +55,9 @@ internal fun Project.configureReactTasks(variant: BaseVariant, config: ReactExte
|
||||
it.group = REACT_GROUP
|
||||
it.description = "create JS bundle and assets for $targetName."
|
||||
|
||||
it.reactRoot = config.reactRoot.get().asFile
|
||||
it.reactRoot = config.root.get().asFile
|
||||
it.sources =
|
||||
fileTree(config.reactRoot) { fileTree ->
|
||||
fileTree.setExcludes(config.inputExcludes.get())
|
||||
}
|
||||
fileTree(config.root) { fileTree -> fileTree.setExcludes(config.inputExcludes.get()) }
|
||||
it.execCommand = execCommand
|
||||
it.bundleCommand = config.bundleCommand.get()
|
||||
it.devEnabled = !config.disableDevForVariant(variant)
|
||||
@@ -98,7 +95,7 @@ internal fun Project.configureReactTasks(variant: BaseVariant, config: ReactExte
|
||||
it.group = REACT_GROUP
|
||||
it.description = "bundle hermes resources for $targetName"
|
||||
|
||||
it.reactRoot = config.reactRoot.get().asFile
|
||||
it.reactRoot = config.root.get().asFile
|
||||
it.hermesCommand = detectedHermesCommand(config)
|
||||
it.hermesFlags = config.hermesFlagsForVariant(variant)
|
||||
it.jsBundleFile = jsBundleFile
|
||||
|
||||
+30
-2
@@ -20,7 +20,7 @@ import org.gradle.api.tasks.*
|
||||
|
||||
abstract class GenerateCodegenArtifactsTask : Exec() {
|
||||
|
||||
@get:Internal abstract val reactRoot: DirectoryProperty
|
||||
@get:Internal abstract val reactNativeDir: DirectoryProperty
|
||||
|
||||
@get:Internal abstract val codegenDir: DirectoryProperty
|
||||
|
||||
@@ -34,6 +34,9 @@ abstract class GenerateCodegenArtifactsTask : Exec() {
|
||||
|
||||
@get:Input abstract val libraryName: Property<String>
|
||||
|
||||
// We're keeping this just to fire a warning at the user should they use the `reactRoot` property.
|
||||
@get:Internal abstract val deprecatedReactRoot: DirectoryProperty
|
||||
|
||||
@get:InputFile
|
||||
val combineJsToSchemaCli: Provider<RegularFile> =
|
||||
codegenDir.file("lib/cli/combine/combine-js-to-schema-cli.js")
|
||||
@@ -46,6 +49,7 @@ abstract class GenerateCodegenArtifactsTask : Exec() {
|
||||
@get:OutputDirectory val generatedJniFiles: Provider<Directory> = generatedSrcDir.dir("jni")
|
||||
|
||||
override fun exec() {
|
||||
checkForDeprecatedProperty()
|
||||
setupCommandLine()
|
||||
super.exec()
|
||||
if (useJavaGenerator.getOrElse(false)) {
|
||||
@@ -63,11 +67,35 @@ abstract class GenerateCodegenArtifactsTask : Exec() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkForDeprecatedProperty() {
|
||||
if (deprecatedReactRoot.isPresent) {
|
||||
project.logger.error(
|
||||
"""
|
||||
********************************************************************************
|
||||
The `reactRoot` property is deprecated and will be removed in
|
||||
future versions of React Native. The property is currently ignored.
|
||||
|
||||
You should instead use either:
|
||||
- [root] to point to your root project (where the package.json lives)
|
||||
- [reactNativeDir] to point to the NPM package of react native.
|
||||
|
||||
You should be fine by just removing the `reactRoot` line entirely from
|
||||
your build.gradle file. Otherwise a valid configuration would look like:
|
||||
|
||||
react {
|
||||
root = rootProject.file('..')
|
||||
reactNativeDir = rootProject.file('../node_modules/react-native')
|
||||
}
|
||||
********************************************************************************
|
||||
""".trimIndent())
|
||||
}
|
||||
}
|
||||
|
||||
internal fun setupCommandLine() {
|
||||
commandLine(
|
||||
windowsAwareYarn(
|
||||
*nodeExecutableAndArgs.get().toTypedArray(),
|
||||
reactRoot.file("scripts/generate-specs-cli.js").get().asFile.absolutePath,
|
||||
reactNativeDir.file("scripts/generate-specs-cli.js").get().asFile.absolutePath,
|
||||
"--platform",
|
||||
"android",
|
||||
"--schemaPath",
|
||||
|
||||
+2
-3
@@ -11,7 +11,6 @@ package com.facebook.react.utils
|
||||
|
||||
import com.facebook.react.ReactExtension
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
/**
|
||||
@@ -25,7 +24,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
|
||||
*/
|
||||
internal fun detectedEntryFile(config: ReactExtension): File =
|
||||
detectEntryFile(
|
||||
entryFile = config.entryFile.orNull?.asFile, reactRoot = config.reactRoot.get().asFile)
|
||||
entryFile = config.entryFile.orNull?.asFile, reactRoot = config.root.get().asFile)
|
||||
|
||||
/**
|
||||
* Computes the CLI location for React Native. The Algo follows this order:
|
||||
@@ -40,7 +39,7 @@ internal fun detectedCliPath(
|
||||
): String =
|
||||
detectCliPath(
|
||||
projectDir = projectDir,
|
||||
reactRoot = config.reactRoot.get().asFile,
|
||||
reactRoot = config.root.get().asFile,
|
||||
preconfiguredCliPath = config.cliPath.orNull)
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -79,13 +79,13 @@ class GenerateCodegenArtifactsTaskTest {
|
||||
@Test
|
||||
@WithOs(OS.UNIX)
|
||||
fun setupCommandLine_withoutJavaGenerator_willSetupCorrectly() {
|
||||
val reactRoot = tempFolder.newFolder("node_modules/react-native/")
|
||||
val reactNativeDir = tempFolder.newFolder("node_modules/react-native/")
|
||||
val codegenDir = tempFolder.newFolder("codegen")
|
||||
val outputDir = tempFolder.newFolder("output")
|
||||
|
||||
val task =
|
||||
createTestTask<GenerateCodegenArtifactsTask> {
|
||||
it.reactRoot.set(reactRoot)
|
||||
it.reactNativeDir.set(reactNativeDir)
|
||||
it.codegenDir.set(codegenDir)
|
||||
it.generatedSrcDir.set(outputDir)
|
||||
it.nodeExecutableAndArgs.set(listOf("--verbose"))
|
||||
@@ -99,7 +99,7 @@ class GenerateCodegenArtifactsTaskTest {
|
||||
listOf(
|
||||
"yarn",
|
||||
"--verbose",
|
||||
File(reactRoot, "scripts/generate-specs-cli.js").toString(),
|
||||
File(reactNativeDir, "scripts/generate-specs-cli.js").toString(),
|
||||
"--platform",
|
||||
"android",
|
||||
"--schemaPath",
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@ class PathUtilsTest {
|
||||
@Test
|
||||
fun detectedEntryFile_withAndroidEntryPoint() {
|
||||
val extension = TestReactExtension(ProjectBuilder.builder().build())
|
||||
extension.reactRoot.set(tempFolder.root)
|
||||
extension.root.set(tempFolder.root)
|
||||
tempFolder.newFile("index.android.js")
|
||||
|
||||
val actual = detectedEntryFile(extension)
|
||||
@@ -44,7 +44,7 @@ class PathUtilsTest {
|
||||
@Test
|
||||
fun detectedEntryFile_withDefaultEntryPoint() {
|
||||
val extension = TestReactExtension(ProjectBuilder.builder().build())
|
||||
extension.reactRoot.set(tempFolder.root)
|
||||
extension.root.set(tempFolder.root)
|
||||
|
||||
val actual = detectedEntryFile(extension)
|
||||
|
||||
@@ -80,7 +80,7 @@ class PathUtilsTest {
|
||||
fun detectedCliPath_withCliFromNodeModules() {
|
||||
val project = ProjectBuilder.builder().build()
|
||||
val extension = TestReactExtension(project)
|
||||
extension.reactRoot.set(tempFolder.root)
|
||||
extension.root.set(tempFolder.root)
|
||||
val expected =
|
||||
File(tempFolder.root, "node_modules/react-native/cli.js").apply {
|
||||
parentFile.mkdirs()
|
||||
|
||||
+528
-528
File diff suppressed because it is too large
Load Diff
@@ -80,7 +80,7 @@ react {
|
||||
cliPath = "../../../../cli.js"
|
||||
bundleAssetName = "RNTesterApp.android.bundle"
|
||||
entryFile = file("../../js/RNTesterApp.android.js")
|
||||
reactRoot = rootDir
|
||||
root = rootDir
|
||||
inputExcludes = ["android/**", "./**", ".gradle/**"]
|
||||
composeSourceMapsPath = "$rootDir/scripts/compose-source-maps.js"
|
||||
hermesCommand = "$rootDir/node_modules/hermes-engine/%OS-BIN%/hermesc"
|
||||
@@ -88,6 +88,7 @@ react {
|
||||
|
||||
// Codegen Configs
|
||||
jsRootDir = file("$rootDir/packages/rn-tester")
|
||||
reactNativeDir = rootDir
|
||||
libraryName = "rntester"
|
||||
useJavaGenerator = System.getenv("USE_CODEGEN_JAVAPOET")?.toBoolean() ?: false
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
import org.gradle.internal.jvm.Jvm
|
||||
|
||||
def config = project.hasProperty("react") ? project.react : [:];
|
||||
|
||||
@@ -129,6 +130,19 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
def jvmVersion = Jvm.current().javaVersion.majorVersion
|
||||
if (jvmVersion.toInteger() <= 8) {
|
||||
println "\n\n\n"
|
||||
println "**************************************************************************************************************"
|
||||
println "\n\n"
|
||||
println "ERROR: requires JDK11 or higher."
|
||||
println "Incompatible major version detected: '" + jvmVersion + "'"
|
||||
println "\n\n"
|
||||
println "**************************************************************************************************************"
|
||||
println "\n\n\n"
|
||||
System.exit(1)
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
def isAndroidLibrary = plugins.hasPlugin("com.android.library")
|
||||
def variants = isAndroidLibrary ? android.libraryVariants : android.applicationVariants
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.4)
|
||||
CFPropertyList (3.0.5)
|
||||
rexml
|
||||
activesupport (6.1.4.1)
|
||||
activesupport (6.1.4.6)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
@@ -15,7 +15,7 @@ GEM
|
||||
httpclient (~> 2.8, >= 2.8.3)
|
||||
json (>= 1.5.1)
|
||||
atomos (0.1.3)
|
||||
claide (1.0.3)
|
||||
claide (1.1.0)
|
||||
cocoapods (1.11.2)
|
||||
addressable (~> 2.8)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
@@ -58,15 +58,15 @@ GEM
|
||||
escape (0.0.4)
|
||||
ethon (0.15.0)
|
||||
ffi (>= 1.15.0)
|
||||
ffi (1.15.4)
|
||||
ffi (1.15.5)
|
||||
fourflusher (2.3.1)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.1.3)
|
||||
httpclient (2.8.3)
|
||||
i18n (1.8.10)
|
||||
i18n (1.10.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (2.6.0)
|
||||
minitest (5.14.4)
|
||||
json (2.6.1)
|
||||
minitest (5.15.0)
|
||||
molinillo (0.8.0)
|
||||
nanaimo (0.3.0)
|
||||
nap (1.1.0)
|
||||
@@ -85,7 +85,7 @@ GEM
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.3.0)
|
||||
rexml (~> 3.2.4)
|
||||
zeitwerk (2.5.1)
|
||||
zeitwerk (2.5.4)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -97,4 +97,4 @@ RUBY VERSION
|
||||
ruby 2.7.4p191
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.29
|
||||
2.2.27
|
||||
|
||||
@@ -11,6 +11,8 @@ node_modules/react-native/Libraries/polyfills/.*
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/LoadingView.js
|
||||
|
||||
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
|
||||
@@ -233,24 +233,13 @@ android {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
pickFirst '**/libhermes.so'
|
||||
pickFirst '**/libjsc.so'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
|
||||
// If new architecture is enabled, we let you build RN from source
|
||||
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
|
||||
if (isNewArchitectureEnabled()) {
|
||||
implementation project(":ReactAndroid")
|
||||
} else {
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
}
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
|
||||
@@ -276,6 +265,18 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
if (isNewArchitectureEnabled()) {
|
||||
// If new architecture is enabled, we let you build RN from source
|
||||
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
|
||||
// This will be applied to all the imported transtitive dependency.
|
||||
configurations.all {
|
||||
resolutionStrategy.dependencySubstitution {
|
||||
substitute(module("com.facebook.react:react-native"))
|
||||
.using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Run this once to be able to run the application with BUCK
|
||||
// puts all compile dependencies into folder libs for BUCK to use
|
||||
task copyDownloadableDepsToLibs(type: Copy) {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
|
||||
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "17.0.2",
|
||||
"react-native": "1000.0.0"
|
||||
"react-native": "0.68.0-rc.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.9",
|
||||
@@ -21,13 +21,9 @@
|
||||
"eslint": "^7.32.0",
|
||||
"jest": "^26.6.3",
|
||||
"metro-react-native-babel-preset": "^0.67.0",
|
||||
"react-native-gradle-plugin": "^0.0.4",
|
||||
"react-test-renderer": "17.0.2"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
},
|
||||
"codegenConfig": {
|
||||
"libraries": []
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user