diff --git a/android/app/build.gradle b/android/app/build.gradle index 489dcc7..dcc7a44 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -174,9 +174,11 @@ dependencies { } else { implementation jscFlavor } + + implementation project(':react-native-vision-camera') } apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); applyNativeModulesAppBuildGradle(project) -apply plugin: 'com.google.gms.google-services' \ No newline at end of file +apply plugin: 'com.google.gms.google-services' diff --git a/android/app/src/main/java/android/railbird/app/MainApplication.java b/android/app/src/main/java/android/railbird/app/MainApplication.java index 38f84b5..7388170 100644 --- a/android/app/src/main/java/android/railbird/app/MainApplication.java +++ b/android/app/src/main/java/android/railbird/app/MainApplication.java @@ -15,6 +15,7 @@ import com.facebook.soloader.SoLoader; import expo.modules.ApplicationLifecycleDispatcher; import expo.modules.ReactNativeHostWrapper; +import com.mrousavy.camera.CameraPackage; import java.util.List; @@ -32,7 +33,8 @@ public class MainApplication extends Application implements ReactApplication { @SuppressWarnings("UnnecessaryLocalVariable") List packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); + // packages.add(new MyReactNativePackage()); + packages.add(new CameraPackage()); return packages; } diff --git a/android/build.gradle b/android/build.gradle index 63179df..b6f57d7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -20,6 +20,7 @@ buildscript { classpath 'com.google.gms:google-services:4.3.3' classpath('com.android.tools.build:gradle:7.4.2') classpath('com.facebook.react:react-native-gradle-plugin') + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.22") } } diff --git a/android/settings.gradle b/android/settings.gradle index a002532..eb532f8 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -2,14 +2,16 @@ rootProject.name = 'Railbird' apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle"); +apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); + useExpoModules() apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); applyNativeModulesSettingsGradle(settings) -include ':app' -includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile()) - include ':react-native-vision-camera' project(':react-native-vision-camera').projectDir = new File(rootProject.projectDir, '../react-native-vision-camera/package/android') + +include ':app' +includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile()) diff --git a/package.json b/package.json index fb8372c..837fc48 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@typescript-eslint/eslint-plugin": "^6.17.0", "@typescript-eslint/parser": "^6.17.0", "babel-plugin-inline-dotenv": "^1.7.0", + "expo-constants": "15.4.5", "d3-path": "^3.1.0", "d3-scale": "^1.0.6", "eslint": "^8.56.0", diff --git a/tsconfig.json b/tsconfig.json index 5707cd6..cc0aa3f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,5 +28,5 @@ }, "include": ["react-native-vision-camera/package/src", "."], "exclude": ["node_modules"], - "extends": ["expo/tsconfig.base"] + "extends": "./react-native-vision-camera/package/tsconfig" }