Bring the basic example back to a runnable state

This commit is contained in:
Benoit Dion 2019-09-16 13:32:01 -04:00 committed by Benoit Dion
parent ed335f3b02
commit 81cfd4e629
10 changed files with 2976 additions and 2462 deletions

View File

@ -1,3 +0,0 @@
{
"presets": ["react-native"]
}

View File

@ -65,6 +65,10 @@ import com.android.build.OutputFile
* ] * ]
*/ */
project.ext.react = [
entryFile: "index.android.js",
enableHermes: false,
]
apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native/react.gradle"
/** /**
@ -132,8 +136,8 @@ android {
dependencies { dependencies {
implementation project(':react-native-video') implementation project(':react-native-video')
implementation "androidx.appcompat:appcompat:1.0.0"
implementation "com.facebook.react:react-native:+" // From node_modules implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'org.webkit:android-jsc:+'
} }
// Run this once to be able to run the application with BUCK // Run this once to be able to run the application with BUCK

View File

@ -6,11 +6,7 @@
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-sdk <application
android:minSdkVersion="16"
android:targetSdkVersion="28" />
<application
android:name=".MainApplication" android:name=".MainApplication"
android:allowBackup="true" android:allowBackup="true"
android:label="@string/app_name" android:label="@string/app_name"

View File

@ -33,5 +33,9 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android" url "$rootDir/../node_modules/react-native/android"
} }
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
} }
} }

View File

@ -17,6 +17,5 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true # org.gradle.parallel=true
android.useDeprecatedNdk=true
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true

View File

@ -0,0 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};

View File

@ -0,0 +1,10 @@
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};

View File

@ -4,18 +4,23 @@
"private": true, "private": true,
"scripts": { "scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start", "start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest" "postinstall": "rm -rf node_modules/react-native-video/{examples,node_modules}",
"test": "jest",
"lint": "eslint ."
}, },
"dependencies": { "dependencies": {
"react": "16.4.1", "react": "16.9.0",
"react-native": "0.56.0", "react-native": "0.60.5",
"react-native-video": "file:../.." "react-native-video": "file:../.."
}, },
"devDependencies": { "devDependencies": {
"babel-jest": "22.4.1", "@babel/core": "^7.6.0",
"babel-preset-react-native": "5.0.2", "@babel/runtime": "^7.6.0",
"express": "^4.16.2", "@react-native-community/eslint-config": "^0.0.5",
"jest": "22.4.2", "babel-jest": "^24.9.0",
"react-test-renderer": "16.2.0" "eslint": "^6.4.0",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.8.6"
} }
} }

View File

@ -1,7 +0,0 @@
const blacklist = require('metro').createBlacklist;
module.exports = {
getBlacklistRE: function() {
return blacklist([/node_modules\/react-native-video\/examples\/.*/]);
}
};

File diff suppressed because it is too large Load Diff