Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Feb 8, 2024
1 parent dac06af commit bdecd44
Show file tree
Hide file tree
Showing 13 changed files with 352 additions and 121 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
node-version: [16.x, 18.x, 20.x]
include:
- node-version: 16.x
gradle-version: 7.3.3
agp-version: 7.2.2
gradle-version: 6.5
agp-version: 4.1.3
java-version: 11
rn-version: 0.68.3
rn-version: 0.65.3
- node-version: 18.x
gradle-version: 7.5
agp-version: 7.4.2
Expand Down Expand Up @@ -71,10 +71,10 @@ jobs:
run: yarn upgrade react-native@${{ matrix.rn-version }}
working-directory: example

- name: Copy gradle settings
if: ${{ (matrix.gradle-version == '8.2')}}
run: cp ../resources/.test/settings_8.2.gradle android/settings.gradle
working-directory: example
- name: Copy project files
if: ${{ (matrix.gradle-version == '8.2') || (matrix.gradle-version == '6.5')}}
run: sh copy.sh
working-directory: resources/.test/gradle_${{ matrix.gradle-version }}

- name: Generate gradle wrapper
run: gradle wrapper --gradle-version ${{ matrix.gradle-version }} --distribution-type all
Expand Down
13 changes: 0 additions & 13 deletions example/android/app/src/debug/AndroidManifest.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@ public void onCreate() {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load();
}
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
}

This file was deleted.

15 changes: 15 additions & 0 deletions resources/.test/gradle_6.5/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package ai.picovoice.reactnative.voiceprocessorexample;

import com.facebook.react.ReactActivity;

public class MainActivity extends ReactActivity {

/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "VoiceProcessorExample";
}
}
47 changes: 47 additions & 0 deletions resources/.test/gradle_6.5/MainApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package ai.picovoice.reactnative.voiceprocessorexample;

import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();

return packages;
}

@Override
protected String getJSMainModuleName() {
return "index";
}
};

@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}

@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
Loading

0 comments on commit bdecd44

Please sign in to comment.