chore: rework examples (#4225)
* remove unused examples * init bare example with test app * add react-native-video * add test app suport in expo plugin * expo plugin: skip keys that are already in pod file * fix podfile * add src files * fix metro config * finalize react native test app configuration * init expo example * remove old examples * add guide for example * Add link to examples apps in docs * adopt bare example to CI tests * update CI workflows * CI build lib after node_modules install * fix examples readme * fix iOS CI * Add Example for DRM * Update examples/README.md * fix links * update examples README * sync example code * update README
This commit is contained in:
48
examples/bare/android/build.gradle
Normal file
48
examples/bare/android/build.gradle
Normal file
@@ -0,0 +1,48 @@
|
||||
buildscript {
|
||||
apply(from: {
|
||||
def searchDir = rootDir.toPath()
|
||||
do {
|
||||
def p = searchDir.resolve("node_modules/react-native-test-app/android/dependencies.gradle")
|
||||
if (p.toFile().exists()) {
|
||||
return p.toRealPath().toString()
|
||||
}
|
||||
} while (searchDir = searchDir.getParent())
|
||||
throw new GradleException("Could not find `react-native-test-app`");
|
||||
}())
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
getReactNativeDependencies().each { dependency ->
|
||||
classpath(dependency)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
// For CI builds
|
||||
useExoplayerIMA = System.getenv("RNV_SAMPLE_ENABLE_ADS") ?: false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven {
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
url({
|
||||
def searchDir = rootDir.toPath()
|
||||
do {
|
||||
def p = searchDir.resolve("node_modules/react-native/android")
|
||||
if (p.toFile().exists()) {
|
||||
return p.toRealPath().toString()
|
||||
}
|
||||
} while (searchDir = searchDir.getParent())
|
||||
throw new GradleException("Could not find `react-native`");
|
||||
}())
|
||||
}
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user