Skip to content

Remove ViewManagerWithGeneratedInterface from old arch interfaces #1927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import androidx.annotation.Nullable;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface AddToWalletButtonManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface AddToWalletButtonManagerInterface<T extends View> {
void setIOSButtonStyle(T view, @Nullable String value);
void setAndroidAssetSource(T view, @Nullable ReadableMap value);
void setTestEnv(T view, boolean value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import androidx.annotation.Nullable;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface AddressSheetViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface AddressSheetViewManagerInterface<T extends View> {
void setVisible(T view, boolean value);
void setPresentationStyle(T view, @Nullable String value);
void setAnimationStyle(T view, @Nullable String value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
package com.facebook.react.viewmanagers;

import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface ApplePayButtonManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface ApplePayButtonManagerInterface<T extends View> {
void setDisabled(T view, boolean value);
void setType(T view, int value);
void setButtonStyle(T view, int value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface AuBECSDebitFormManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface AuBECSDebitFormManagerInterface<T extends View> {
void setCompanyName(T view, @Nullable String value);
void setFormStyle(T view, Dynamic value);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import androidx.annotation.Nullable;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface CardFieldManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface CardFieldManagerInterface<T extends View> {
void setAutofocus(T view, boolean value);
void setCardStyle(T view, Dynamic value);
void setCountryCode(T view, @Nullable String value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import androidx.annotation.Nullable;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface CardFormManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface CardFormManagerInterface<T extends View> {
void setAutofocus(T view, boolean value);
void setCardStyle(T view, Dynamic value);
void setDangerouslyGetFullCardDetails(T view, boolean value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@

import android.view.View;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface EmbeddedPaymentElementViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface EmbeddedPaymentElementViewManagerInterface<T extends View> {
void setConfiguration(T view, Dynamic value);
void setIntentConfiguration(T view, Dynamic value);
void confirm(T view);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
package com.facebook.react.viewmanagers;

import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface GooglePayButtonManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface GooglePayButtonManagerInterface<T extends View> {
void setType(T view, int value);
void setAppearance(T view, int value);
void setBorderRadius(T view, int value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
package com.facebook.react.viewmanagers;

import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;

public interface StripeContainerManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
public interface StripeContainerManagerInterface<T extends View> {
void setKeyboardShouldPersistTaps(T view, boolean value);
}
10 changes: 9 additions & 1 deletion scripts/old-arch-codegen-android
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ popd
rm -rf android/src/oldarch/java
cp -r android/build/generated/source/codegen/java android/src/oldarch/java

find android/src/oldarch/java -type f -name '*Interface.java' | while IFS= read -r file; do
sed -i '' \
-e '/import com\.facebook\.react\.uimanager\.ViewManagerWithGeneratedInterface;/d' \
-e 's/extends ViewManagerWithGeneratedInterface//g' \
"$file"
done

# Apply a patch to modify the codegen code so it works with the old architecture.
# If this patch needs to be updated, create android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpecNew.java
# If this patch needs to be updated, temporarily remove the patch and sed lines and run this script.
# Then create android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpecNew.java
# and make the required changes then run the following command:
# diff -u android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpecNew.java > scripts/NativeStripeSdkModuleSpec.patch
patch android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java < scripts/NativeStripeSdkModuleSpec.patch
Expand Down
Loading