Skip to content

Commit

Permalink
Migrate to androidx
Browse files Browse the repository at this point in the history
  • Loading branch information
friederbluemle committed Jan 6, 2022
1 parent aeee2f1 commit 178f809
Showing 51 changed files with 117 additions and 102 deletions.
9 changes: 5 additions & 4 deletions android/electrode-reactnative-bridge/build.gradle
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ android {
ndk {
abiFilters "armeabi-v7a", "x86"
}
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -43,9 +43,10 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.facebook.react:react-native:+'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Original file line number Diff line number Diff line change
@@ -19,9 +19,10 @@
import android.app.Instrumentation;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.test.InstrumentationRegistry;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.test.platform.app.InstrumentationRegistry;

import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.Arguments;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.bridge.helpers.Logger;

Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.sample.api.PersonApi;
import com.walmartlabs.electrode.reactnative.sample.model.Person;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.sample.api.PersonApi;

@@ -166,7 +166,7 @@ public void onSuccess(@Nullable Integer responseData) {

@Override
public void onFailure(@NonNull FailureMessage failureMessage) {
fail();
fail();
}
});

Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReadableArray;
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.sample.api;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import com.walmartlabs.electrode.reactnative.bridge.ElectrodeBridgeEventListener;
import com.walmartlabs.electrode.reactnative.bridge.ElectrodeBridgeRequestHandler;
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.sample.api;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import com.walmartlabs.electrode.reactnative.bridge.ElectrodeBridgeEventListener;
import com.walmartlabs.electrode.reactnative.bridge.EventListenerProcessor;
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.sample.api;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import com.walmartlabs.electrode.reactnative.bridge.ElectrodeBridgeRequestHandler;
import com.walmartlabs.electrode.reactnative.bridge.ElectrodeBridgeResponseListener;
Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@
package com.walmartlabs.electrode.reactnative.sample.api;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;
import com.walmartlabs.electrode.reactnative.sample.model.Status;
Original file line number Diff line number Diff line change
@@ -19,8 +19,9 @@
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;

Original file line number Diff line number Diff line change
@@ -19,8 +19,8 @@
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;

import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;

Original file line number Diff line number Diff line change
@@ -19,8 +19,9 @@
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;

Original file line number Diff line number Diff line change
@@ -19,12 +19,11 @@
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import static com.walmartlabs.electrode.reactnative.bridge.util.BridgeArguments.getNumberValue;
import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;

public class Position implements Parcelable, Bridgeable {

@@ -88,7 +87,7 @@ public void writeToParcel(Parcel dest, int flags) {
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putDouble("lat", lat);
if(lng != null) {
if (lng != null) {
bundle.putDouble("lng", lng);
}
return bundle;
Original file line number Diff line number Diff line change
@@ -19,12 +19,11 @@
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import static com.walmartlabs.electrode.reactnative.bridge.util.BridgeArguments.getNumberValue;
import com.walmartlabs.electrode.reactnative.bridge.Bridgeable;

public class Status implements Parcelable, Bridgeable {

@@ -97,7 +96,7 @@ public void writeToParcel(Parcel dest, int flags) {
@NonNull
public Bundle toBundle() {
Bundle bundle = new Bundle();
if(log != null) {
if (log != null) {
bundle.putBoolean("log", log);
}
bundle.putBoolean("member", member);
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class BridgeFailureMessage implements FailureMessage {

Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReadableMap;
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class BridgeTransaction {

Original file line number Diff line number Diff line change
@@ -17,7 +17,8 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.os.Bundle;
import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

/**
* Indicates that any class that implements this interface can be sent across the ElectrodeNativeBridge.
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import java.util.Map;

Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.facebook.react.bridge.ReadableMap;
import com.walmartlabs.electrode.reactnative.bridge.helpers.Logger;
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

/**
* Provide method to be notified of incoming event
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.walmartlabs.electrode.reactnative.bridge.helpers.Logger;

Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.facebook.react.bridge.ReadableMap;
import com.walmartlabs.electrode.reactnative.bridge.helpers.Logger;
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* Provide method to be notified of incoming request.
Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@
package com.walmartlabs.electrode.reactnative.bridge;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReadableMap;
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* Provide methods to report response for a request.
Original file line number Diff line number Diff line change
@@ -18,9 +18,10 @@

import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import java.util.UUID;

Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import com.facebook.react.bridge.ReadableMap;

Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

package com.walmartlabs.electrode.reactnative.bridge;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

public interface EventDispatcher {
void dispatchEvent(@NonNull ElectrodeBridgeEvent event);
Loading

0 comments on commit 178f809

Please sign in to comment.