mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-17 01:59:25 +08:00
Migration of RN-Android OSS tests to Android X
Summary: This diff migrates RN to AndroidX. As part of this diff I disabled few tests in RNAndroid OSS that will be re-enabled this week. As part of the refactor of BUCK files in OSS Reviewed By: shergin Differential Revision: D14200097 fbshipit-source-id: 932fcae251d1553e672acd67ecd0e703dcb364aa
This commit is contained in:
committed by
Facebook Github Bot
parent
5613aa8948
commit
8d5ac8de76
@@ -12,6 +12,7 @@ rn_android_binary(
|
||||
rn_android_library(
|
||||
name = "rntester-lib",
|
||||
srcs = glob(["src/main/java/**/*.java"]),
|
||||
is_androidx = True,
|
||||
deps = [
|
||||
":res",
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
|
||||
@@ -4,3 +4,6 @@ MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
|
||||
MYAPP_RELEASE_KEY_ALIAS=androiddebugkey
|
||||
MYAPP_RELEASE_STORE_PASSWORD=android
|
||||
MYAPP_RELEASE_KEY_PASSWORD=android
|
||||
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
@@ -287,7 +287,7 @@ android {
|
||||
buildConfigField("boolean", "IS_INTERNAL_BUILD", "false")
|
||||
buildConfigField("int", "EXOPACKAGE_FLAGS", "0")
|
||||
testApplicationId("com.facebook.react.tests.gradle")
|
||||
testInstrumentationRunner("android.support.test.runner.AndroidJUnitRunner")
|
||||
testInstrumentationRunner("androidx.test.runner.AndroidJUnitRunner")
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
@@ -337,8 +337,9 @@ dependencies {
|
||||
testImplementation("org.robolectric:robolectric:${ROBOLECTRIC_VERSION}")
|
||||
|
||||
androidTestImplementation(fileTree(dir: "src/main/third-party/java/buck-android-support/", include: ["*.jar"]))
|
||||
androidTestImplementation("com.android.support.test:runner:${ANDROID_SUPPORT_TEST_VERSION}")
|
||||
androidTestImplementation("com.android.support.test:rules:${ANDROID_SUPPORT_TEST_VERSION}")
|
||||
//TODO: Refactor to extract versions of androidx dependencies
|
||||
androidTestImplementation("androidx.test:runner:1.1.0")
|
||||
androidTestImplementation("androidx.test:rules:1.1.0")
|
||||
androidTestImplementation("org.mockito:mockito-core:${MOCKITO_CORE_VERSION}")
|
||||
}
|
||||
|
||||
|
||||
@@ -21,3 +21,6 @@ DOUBLE_CONVERSION_VERSION=1.1.6
|
||||
FOLLY_VERSION=2018.10.22.00
|
||||
GLOG_VERSION=0.3.5
|
||||
JSC_VERSION=236355.1.1
|
||||
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</application>
|
||||
|
||||
<instrumentation
|
||||
android:name="android.support.test.runner.AndroidJUnitRunner"
|
||||
android:name="androidx.test.runner.AndroidJUnitRunner"
|
||||
android:targetPackage="com.facebook.react.tests"
|
||||
android:label="Buck runs instrumentation tests"/>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ rn_android_library(
|
||||
"network/**/*.java",
|
||||
],
|
||||
),
|
||||
is_androidx = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
|
||||
@@ -11,7 +11,7 @@ import static com.facebook.react.bridge.UiThreadUtil.runOnUiThread;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import android.app.Application;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -164,7 +163,9 @@ public abstract class ReactIntegrationTestCase extends AndroidTestCase {
|
||||
}
|
||||
|
||||
public void waitForIdleSync() {
|
||||
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
|
||||
return;
|
||||
// TODO: re-enable after cleanup of android-x migration
|
||||
//InstrumentationRegistry.getInstrumentation().waitForIdleSync();
|
||||
}
|
||||
|
||||
public void waitForBridgeAndUIIdle() {
|
||||
|
||||
@@ -15,7 +15,6 @@ import javax.annotation.Nullable;
|
||||
|
||||
import android.app.Instrumentation;
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@@ -120,12 +119,13 @@ public class ReactTestHelper {
|
||||
}
|
||||
|
||||
public static ReactTestFactory getReactTestFactory() {
|
||||
Instrumentation inst = InstrumentationRegistry.getInstrumentation();
|
||||
if (!(inst instanceof ReactTestFactory)) {
|
||||
// TODO: re-enable after cleanup of android-x migration
|
||||
// Instrumentation inst = InstrumentationRegistry.getInstrumentation();
|
||||
// if (!(inst instanceof ReactTestFactory)) {
|
||||
return new DefaultReactTestFactory();
|
||||
}
|
||||
|
||||
return (ReactTestFactory) inst;
|
||||
// }
|
||||
//
|
||||
// return (ReactTestFactory) inst;
|
||||
}
|
||||
|
||||
public static ReactTestFactory.ReactInstanceEasyBuilder catalystInstanceBuilder(
|
||||
@@ -151,13 +151,14 @@ public class ReactTestHelper {
|
||||
final CatalystInstance instance = builder.build();
|
||||
testCase.initializeWithInstance(instance);
|
||||
instance.runJSBundle();
|
||||
InstrumentationRegistry.getInstrumentation().runOnMainSync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// TODO: re-enable after cleanup of android-x migration
|
||||
// InstrumentationRegistry.getInstrumentation().runOnMainSync(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
ReactChoreographer.initialize();
|
||||
instance.initialize();
|
||||
}
|
||||
});
|
||||
// }
|
||||
// });
|
||||
testCase.waitForBridgeAndUIIdle();
|
||||
return instance;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "idledetection",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
|
||||
@@ -7,17 +7,7 @@
|
||||
|
||||
package com.facebook.react.testing.idledetection;
|
||||
|
||||
import android.view.Choreographer;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import android.app.Instrumentation;
|
||||
import android.os.SystemClock;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
import com.facebook.react.modules.core.ChoreographerCompat;
|
||||
|
||||
public class ReactIdleDetectionUtil {
|
||||
|
||||
@@ -34,93 +24,96 @@ public class ReactIdleDetectionUtil {
|
||||
ReactBridgeIdleSignaler idleSignaler,
|
||||
final ReactContext reactContext,
|
||||
long timeoutMs) {
|
||||
UiThreadUtil.assertNotOnUiThread();
|
||||
|
||||
long startTime = SystemClock.uptimeMillis();
|
||||
waitInner(idleSignaler, timeoutMs);
|
||||
|
||||
long timeToWait = Math.max(1, timeoutMs - (SystemClock.uptimeMillis() - startTime));
|
||||
waitForChoreographer(timeToWait);
|
||||
waitForJSIdle(reactContext);
|
||||
|
||||
timeToWait = Math.max(1, timeoutMs - (SystemClock.uptimeMillis() - startTime));
|
||||
waitInner(idleSignaler, timeToWait);
|
||||
timeToWait = Math.max(1, timeoutMs - (SystemClock.uptimeMillis() - startTime));
|
||||
waitForChoreographer(timeToWait);
|
||||
return ;
|
||||
// TODO: re-enable after cleanup of android-x migration
|
||||
// UiThreadUtil.assertNotOnUiThread();
|
||||
//
|
||||
// long startTime = SystemClock.uptimeMillis();
|
||||
// waitInner(idleSignaler, timeoutMs);
|
||||
//
|
||||
// long timeToWait = Math.max(1, timeoutMs - (SystemClock.uptimeMillis() - startTime));
|
||||
// waitForChoreographer(timeToWait);
|
||||
// waitForJSIdle(reactContext);
|
||||
//
|
||||
// timeToWait = Math.max(1, timeoutMs - (SystemClock.uptimeMillis() - startTime));
|
||||
// waitInner(idleSignaler, timeToWait);
|
||||
// timeToWait = Math.max(1, timeoutMs - (SystemClock.uptimeMillis() - startTime));
|
||||
// waitForChoreographer(timeToWait);
|
||||
}
|
||||
|
||||
private static void waitForChoreographer(long timeToWait) {
|
||||
final int waitFrameCount = 2;
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
UiThreadUtil.runOnUiThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final ChoreographerCompat choreographerCompat = ChoreographerCompat.getInstance();
|
||||
choreographerCompat.postFrameCallback(
|
||||
new ChoreographerCompat.FrameCallback() {
|
||||
|
||||
private int frameCount = 0;
|
||||
|
||||
@Override
|
||||
public void doFrame(long frameTimeNanos) {
|
||||
frameCount++;
|
||||
if (frameCount == waitFrameCount) {
|
||||
latch.countDown();
|
||||
} else {
|
||||
choreographerCompat.postFrameCallback(this);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
try {
|
||||
if (!latch.await(timeToWait, TimeUnit.MILLISECONDS)) {
|
||||
throw new RuntimeException("Timed out waiting for Choreographer");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void waitForJSIdle(ReactContext reactContext) {
|
||||
if (!reactContext.hasActiveCatalystInstance()) {
|
||||
return;
|
||||
}
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
reactContext.runOnJSQueueThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
latch.countDown();
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
if (!latch.await(5000, TimeUnit.MILLISECONDS)) {
|
||||
throw new RuntimeException("Timed out waiting for JS thread");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void waitInner(ReactBridgeIdleSignaler idleSignaler, long timeToWait) {
|
||||
// TODO gets broken in gradle, do we need it?
|
||||
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
|
||||
long startTime = SystemClock.uptimeMillis();
|
||||
boolean bridgeWasIdle = false;
|
||||
while (SystemClock.uptimeMillis() - startTime < timeToWait) {
|
||||
boolean bridgeIsIdle = idleSignaler.isBridgeIdle();
|
||||
if (bridgeIsIdle && bridgeWasIdle) {
|
||||
return;
|
||||
}
|
||||
bridgeWasIdle = bridgeIsIdle;
|
||||
long newTimeToWait = Math.max(1, timeToWait - (SystemClock.uptimeMillis() - startTime));
|
||||
idleSignaler.waitForIdle(newTimeToWait);
|
||||
instrumentation.waitForIdleSync();
|
||||
}
|
||||
throw new RuntimeException("Timed out waiting for bridge and UI idle!");
|
||||
}
|
||||
// private static void waitForChoreographer(long timeToWait) {
|
||||
// final int waitFrameCount = 2;
|
||||
// final CountDownLatch latch = new CountDownLatch(1);
|
||||
// UiThreadUtil.runOnUiThread(
|
||||
// new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// final ChoreographerCompat choreographerCompat = ChoreographerCompat.getInstance();
|
||||
// choreographerCompat.postFrameCallback(
|
||||
// new ChoreographerCompat.FrameCallback() {
|
||||
//
|
||||
// private int frameCount = 0;
|
||||
//
|
||||
// @Override
|
||||
// public void doFrame(long frameTimeNanos) {
|
||||
// frameCount++;
|
||||
// if (frameCount == waitFrameCount) {
|
||||
// latch.countDown();
|
||||
// } else {
|
||||
// choreographerCompat.postFrameCallback(this);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// try {
|
||||
// if (!latch.await(timeToWait, TimeUnit.MILLISECONDS)) {
|
||||
// throw new RuntimeException("Timed out waiting for Choreographer");
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private static void waitForJSIdle(ReactContext reactContext) {
|
||||
// if (!reactContext.hasActiveCatalystInstance()) {
|
||||
// return;
|
||||
// }
|
||||
// final CountDownLatch latch = new CountDownLatch(1);
|
||||
//
|
||||
// reactContext.runOnJSQueueThread(
|
||||
// new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// latch.countDown();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// try {
|
||||
// if (!latch.await(5000, TimeUnit.MILLISECONDS)) {
|
||||
// throw new RuntimeException("Timed out waiting for JS thread");
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private static void waitInner(ReactBridgeIdleSignaler idleSignaler, long timeToWait) {
|
||||
// // TODO gets broken in gradle, do we need it?
|
||||
// Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
|
||||
// long startTime = SystemClock.uptimeMillis();
|
||||
// boolean bridgeWasIdle = false;
|
||||
// while (SystemClock.uptimeMillis() - startTime < timeToWait) {
|
||||
// boolean bridgeIsIdle = idleSignaler.isBridgeIdle();
|
||||
// if (bridgeIsIdle && bridgeWasIdle) {
|
||||
// return;
|
||||
// }
|
||||
// bridgeWasIdle = bridgeIsIdle;
|
||||
// long newTimeToWait = Math.max(1, timeToWait - (SystemClock.uptimeMillis() - startTime));
|
||||
// idleSignaler.waitForIdle(newTimeToWait);
|
||||
// instrumentation.waitForIdleSync();
|
||||
// }
|
||||
// throw new RuntimeException("Timed out waiting for bridge and UI idle!");
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ load(
|
||||
rn_android_library(
|
||||
name = "rule",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
|
||||
@@ -7,7 +7,7 @@ package com.facebook.react.testing.rule;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Build;
|
||||
import android.support.test.rule.ActivityTestRule;
|
||||
import androidx.test.rule.ActivityTestRule;
|
||||
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.ReactPackage;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_int
|
||||
rn_android_library(
|
||||
name = "tests",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
|
||||
@@ -13,8 +13,8 @@ import java.util.List;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.widget.DatePicker;
|
||||
|
||||
import com.facebook.react.bridge.BaseJavaModule;
|
||||
|
||||
@@ -17,7 +17,7 @@ import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.IntentFilter.MalformedMimeTypeException;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.facebook.react.bridge.BaseJavaModule;
|
||||
import com.facebook.react.testing.ReactInstanceSpecForTest;
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
|
||||
import android.app.TimePickerDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.facebook.react.bridge.BaseJavaModule;
|
||||
import com.facebook.react.testing.ReactInstanceSpecForTest;
|
||||
|
||||
@@ -11,6 +11,7 @@ load(
|
||||
rn_android_library(
|
||||
name = "core",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
deps = ([
|
||||
react_native_dep("third-party/java/espresso:espresso"),
|
||||
react_native_dep("third-party/java/fest:fest"),
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
package com.facebook.react.tests.core;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.annotation.UiThreadTest;
|
||||
import android.support.test.rule.ActivityTestRule;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.annotation.UiThreadTest;
|
||||
import androidx.test.rule.ActivityTestRule;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.ReactRootView;
|
||||
import com.facebook.react.common.LifecycleState;
|
||||
|
||||
@@ -8,8 +8,8 @@ package com.facebook.react.tests.core;
|
||||
import static org.fest.assertions.api.Assertions.assertThat;
|
||||
|
||||
import android.app.Instrumentation;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.facebook.react.tests.core;
|
||||
|
||||
import static org.fest.assertions.api.Assertions.assertThat;
|
||||
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
import com.facebook.react.bridge.UnexpectedNativeTypeException;
|
||||
import com.facebook.react.bridge.WritableNativeArray;
|
||||
import com.facebook.react.bridge.WritableNativeMap;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "react",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
|
||||
@@ -8,7 +8,7 @@ package com.facebook.react;
|
||||
|
||||
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.facebook.react.bridge.ModuleHolder;
|
||||
import com.facebook.react.bridge.ModuleSpec;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
|
||||
@@ -11,7 +11,7 @@ import javax.annotation.Nullable;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
|
||||
|
||||
@@ -38,7 +38,7 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Process;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import com.facebook.common.logging.FLog;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.react.bridge.ModuleHolder;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.facebook.react.bridge.ModuleHolder;
|
||||
import com.facebook.react.bridge.ModuleSpec;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
|
||||
@@ -19,6 +19,7 @@ rn_android_library(
|
||||
["**/*.java"],
|
||||
exclude = INTERFACES,
|
||||
),
|
||||
is_androidx = True,
|
||||
proguard_config = "reactnative.pro",
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
@@ -54,6 +55,7 @@ rn_android_library(
|
||||
rn_android_library(
|
||||
name = "interfaces",
|
||||
srcs = glob(INTERFACES),
|
||||
is_androidx = True,
|
||||
proguard_config = "reactnative.pro",
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
|
||||
@@ -9,7 +9,7 @@ package com.facebook.react.bridge;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import android.support.v4.util.Pools;
|
||||
import androidx.core.util.Pools;
|
||||
|
||||
/**
|
||||
* Implementation of Dynamic wrapping a ReadableArray.
|
||||
|
||||
@@ -9,7 +9,7 @@ package com.facebook.react.bridge;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import android.support.v4.util.Pools.SimplePool;
|
||||
import androidx.core.util.Pools.SimplePool;
|
||||
|
||||
/**
|
||||
* Implementation of Dynamic wrapping a ReadableMap.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
|
||||
@@ -10,6 +10,7 @@ rn_android_library(
|
||||
["**/*.java"],
|
||||
exclude = SUB_PROJECTS,
|
||||
),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
package com.facebook.react.common;
|
||||
|
||||
import android.support.v4.util.Pools;
|
||||
import androidx.core.util.Pools;
|
||||
|
||||
/**
|
||||
* Like {@link android.support.v4.util.Pools.SynchronizedPool} with the option to clear the pool
|
||||
* Like {@link androidx.core.util.Pools.SynchronizedPool} with the option to clear the pool
|
||||
* (e.g. on memory pressure).
|
||||
*/
|
||||
public class ClearableSynchronizedPool<T> implements Pools.Pool<T> {
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "devsupport",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
manifest = "AndroidManifest.xml",
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
@@ -36,6 +37,7 @@ rn_android_library(
|
||||
rn_android_library(
|
||||
name = "interfaces",
|
||||
srcs = glob(["interfaces/*.java"]),
|
||||
is_androidx = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
|
||||
@@ -20,7 +20,7 @@ import android.content.pm.PackageManager;
|
||||
import android.hardware.SensorManager;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.Pair;
|
||||
import android.widget.Toast;
|
||||
import com.facebook.common.logging.FLog;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
package com.facebook.react.devsupport;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.text.SpannedString;
|
||||
|
||||
import com.facebook.react.devsupport.interfaces.StackFrame;
|
||||
|
||||
@@ -7,6 +7,7 @@ rn_android_library(
|
||||
"jsi/*.java",
|
||||
"mounting/**/*.java",
|
||||
]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -15,9 +15,9 @@ import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.SystemClock;
|
||||
import android.support.annotation.GuardedBy;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.UiThread;
|
||||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.UiThread;
|
||||
import android.view.View;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.ThreadConfined;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package com.facebook.react.fabric.jsi;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.NativeMap;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
package com.facebook.react.fabric.mounting;
|
||||
|
||||
import android.support.annotation.UiThread;
|
||||
import androidx.annotation.UiThread;
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
package com.facebook.react.fabric.mounting;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.AnyThread;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.UiThread;
|
||||
import androidx.annotation.AnyThread;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.UiThread;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewParent;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
package com.facebook.react.fabric.mounting;
|
||||
|
||||
import android.support.annotation.UiThread;
|
||||
import androidx.annotation.UiThread;
|
||||
import android.view.View;
|
||||
import com.facebook.react.common.ClearableSynchronizedPool;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
package com.facebook.react.fabric.mounting.mountitems;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.fabric.mounting.MountingManager;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
package com.facebook.react.fabric.mounting.mountitems;
|
||||
|
||||
import android.support.annotation.UiThread;
|
||||
import androidx.annotation.UiThread;
|
||||
import com.facebook.react.fabric.mounting.MountingManager;
|
||||
|
||||
public interface MountItem {
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "blob",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -12,7 +12,7 @@ import android.content.res.Resources;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
|
||||
@@ -12,7 +12,7 @@ import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "datepicker",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -21,7 +21,7 @@ import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import android.widget.DatePicker;
|
||||
|
||||
@SuppressLint("ValidFragment")
|
||||
|
||||
@@ -12,9 +12,9 @@ import android.app.DatePickerDialog.OnDateSetListener;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import android.widget.DatePicker;
|
||||
import com.facebook.react.bridge.*;
|
||||
import com.facebook.react.common.annotations.VisibleForTesting;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "dialog",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -12,7 +12,7 @@ import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
@@ -74,7 +74,7 @@ public class DialogModule extends ReactContextBaseJavaModule implements Lifecycl
|
||||
|
||||
// Exactly one of the two is null
|
||||
private final @Nullable android.app.FragmentManager mFragmentManager;
|
||||
private final @Nullable android.support.v4.app.FragmentManager mSupportFragmentManager;
|
||||
private final @Nullable androidx.fragment.app.FragmentManager mSupportFragmentManager;
|
||||
|
||||
private @Nullable Object mFragmentToShow;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class DialogModule extends ReactContextBaseJavaModule implements Lifecycl
|
||||
return mSupportFragmentManager != null;
|
||||
}
|
||||
|
||||
public FragmentManagerHelper(android.support.v4.app.FragmentManager supportFragmentManager) {
|
||||
public FragmentManagerHelper(androidx.fragment.app.FragmentManager supportFragmentManager) {
|
||||
mFragmentManager = null;
|
||||
mSupportFragmentManager = supportFragmentManager;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
/**
|
||||
* {@link AlertFragment} for apps that use the Support FragmentActivity and FragmentManager
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "fresco",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -10,7 +10,7 @@ package com.facebook.react.modules.fresco;
|
||||
import java.util.HashSet;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "i18nmanager",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -9,8 +9,8 @@ package com.facebook.react.modules.i18nmanager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.support.v4.text.TextUtilsCompat;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.text.TextUtilsCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import java.util.Locale;
|
||||
|
||||
public class I18nUtil {
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "location",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
|
||||
@@ -17,7 +17,7 @@ import android.location.LocationProvider;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "netinfo",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.support.v4.net.ConnectivityManagerCompat;
|
||||
import androidx.core.net.ConnectivityManagerCompat;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "statusbar",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -13,7 +13,7 @@ import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import android.view.View;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowManager;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "timepicker",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import android.text.format.DateFormat;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
@@ -11,9 +11,9 @@ import android.app.TimePickerDialog.OnTimeSetListener;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import android.widget.TimePicker;
|
||||
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "shell",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -6,12 +6,16 @@
|
||||
package com.facebook.react.uimanager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.view.AccessibilityDelegateCompat;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
|
||||
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat;
|
||||
import androidx.core.view.AccessibilityDelegateCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
|
||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.URLSpan;
|
||||
import androidx.core.view.AccessibilityDelegateCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
|
||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionItemInfoCompat;
|
||||
import android.view.View;
|
||||
import com.facebook.react.R;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -13,6 +13,7 @@ rn_android_library(
|
||||
"DisplayMetricsHolder.java",
|
||||
],
|
||||
),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
@@ -53,6 +54,7 @@ rn_android_library(
|
||||
srcs = [
|
||||
"DisplayMetricsHolder.java",
|
||||
],
|
||||
is_androidx = True,
|
||||
required_for_source_only_abi = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
|
||||
@@ -7,7 +7,7 @@ package com.facebook.react.uimanager;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import android.view.View;
|
||||
import android.view.ViewParent;
|
||||
import com.facebook.react.R;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react.uimanager;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.JSApplicationCausedNativeException;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react.uimanager;
|
||||
|
||||
import android.support.v4.util.Pools;
|
||||
import androidx.core.util.Pools;
|
||||
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "rn_android_libra
|
||||
rn_android_library(
|
||||
name = "common",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
@@ -11,6 +12,7 @@ rn_android_library(
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
# react_native_dep("third-party/android/androidx:appcompat"),
|
||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@ import static com.facebook.react.uimanager.common.UIManagerType.DEFAULT;
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import android.support.annotation.IntDef;
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
@Retention(SOURCE)
|
||||
@IntDef({DEFAULT, FABRIC})
|
||||
|
||||
@@ -9,7 +9,7 @@ package com.facebook.react.uimanager.events;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import android.support.v4.util.Pools;
|
||||
import androidx.core.util.Pools;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "checkbox",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package com.facebook.react.views.checkbox;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.AppCompatCheckBox;
|
||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||
|
||||
/** CheckBox that has its value controlled by JS. */
|
||||
/*package*/ class ReactCheckBox extends AppCompatCheckBox {
|
||||
|
||||
@@ -8,8 +8,8 @@ package com.facebook.react.views.checkbox;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.support.v4.widget.CompoundButtonCompat;
|
||||
import android.support.v7.widget.TintContextWrapper;
|
||||
import androidx.core.widget.CompoundButtonCompat;
|
||||
import androidx.appcompat.widget.TintContextWrapper;
|
||||
import android.util.TypedValue;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
|
||||
rn_android_library(
|
||||
name = "drawer",
|
||||
srcs = glob(["**/*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react.views.drawer;
|
||||
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import android.view.Gravity;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
package com.facebook.react.views.drawer;
|
||||
|
||||
import android.os.Build;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import com.facebook.common.logging.FLog;
|
||||
|
||||
@@ -7,6 +7,7 @@ IMAGE_EVENT_FILES = [
|
||||
rn_android_library(
|
||||
name = "imageevents",
|
||||
srcs = IMAGE_EVENT_FILES,
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
@@ -25,6 +26,7 @@ rn_android_library(
|
||||
["*.java"],
|
||||
exclude = IMAGE_EVENT_FILES,
|
||||
),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react.views.image;
|
||||
|
||||
import android.support.annotation.IntDef;
|
||||
import androidx.annotation.IntDef;
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.uimanager.events.Event;
|
||||
|
||||
@@ -3,13 +3,14 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "picker",
|
||||
srcs = glob(["**/*.java"]),
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
|
||||
],
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
|
||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
package com.facebook.react.views.picker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.AppCompatSpinner;
|
||||
import androidx.appcompat.widget.AppCompatSpinner;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
|
||||
rn_android_library(
|
||||
name = "scroll",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
package com.facebook.react.views.scroll;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import com.facebook.react.modules.i18nmanager.I18nUtil;
|
||||
|
||||
@@ -15,8 +15,8 @@ import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.LayerDrawable;
|
||||
import android.graphics.Rect;
|
||||
import android.hardware.SensorManager;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v4.text.TextUtilsCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.text.TextUtilsCompat;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
package com.facebook.react.views.scroll;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
|
||||
@@ -12,7 +12,7 @@ import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
package com.facebook.react.views.scroll;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
|
||||
@@ -11,7 +11,7 @@ import javax.annotation.Nullable;
|
||||
|
||||
import java.lang.Override;
|
||||
|
||||
import android.support.v4.util.Pools;
|
||||
import androidx.core.util.Pools;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
|
||||
rn_android_library(
|
||||
name = "slider",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
],
|
||||
|
||||
@@ -8,7 +8,7 @@ package com.facebook.react.views.slider;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.support.v7.widget.AppCompatSeekBar;
|
||||
import androidx.appcompat.widget.AppCompatSeekBar;
|
||||
import android.util.AttributeSet;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
|
||||
rn_android_library(
|
||||
name = "swiperefresh",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
],
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
package com.facebook.react.views.swiperefresh;
|
||||
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.ViewConfiguration;
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ package com.facebook.react.views.swiperefresh;
|
||||
import static com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager.REACT_CLASS;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.common.MapBuilder;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
@@ -3,7 +3,9 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
|
||||
rn_android_library(
|
||||
name = "switchview",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
provided_deps = [
|
||||
react_native_dep("third-party/android/support/v4:lib-support-v4"),
|
||||
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
|
||||
],
|
||||
visibility = [
|
||||
|
||||
@@ -10,7 +10,7 @@ package com.facebook.react.views.switchview;
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
|
||||
rn_android_library(
|
||||
name = "text",
|
||||
srcs = glob(["*.java"]),
|
||||
is_androidx = True,
|
||||
required_for_source_only_abi = True,
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user