-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #417 from THEOplayer/feature/e2e_cavy
Feature/e2e
- Loading branch information
Showing
90 changed files
with
20,750 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ android.iml | |
# Cocoapods | ||
# | ||
example/ios/Pods | ||
e2e/ios/Pods | ||
|
||
# node.js | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# To learn about Buck see [Docs](https://buckbuild.com/). | ||
# To run your application with Buck: | ||
# - install Buck | ||
# - `npm start` - to start the packager | ||
# - `cd android` | ||
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` | ||
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck | ||
# - `buck install -r android/app` - compile, install and run application | ||
# | ||
|
||
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") | ||
|
||
lib_deps = [] | ||
|
||
create_aar_targets(glob(["libs/*.aar"])) | ||
|
||
create_jar_targets(glob(["libs/*.jar"])) | ||
|
||
android_library( | ||
name = "all-libs", | ||
exported_deps = lib_deps, | ||
) | ||
|
||
android_library( | ||
name = "app-code", | ||
srcs = glob([ | ||
"src/main/java/**/*.java", | ||
]), | ||
deps = [ | ||
":all-libs", | ||
":build_config", | ||
":res", | ||
], | ||
) | ||
|
||
android_build_config( | ||
name = "build_config", | ||
package = "com.reactnativetheoplayer", | ||
) | ||
|
||
android_resource( | ||
name = "res", | ||
package = "com.reactnativetheoplayer", | ||
res = "src/main/res", | ||
) | ||
|
||
android_binary( | ||
name = "app", | ||
keystore = "//android/keystores:debug", | ||
manifest = "src/main/AndroidManifest.xml", | ||
package_type = "debug", | ||
deps = [ | ||
":app-code", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
apply plugin: "com.android.application" | ||
apply plugin: "org.jetbrains.kotlin.android" | ||
apply plugin: "com.facebook.react" | ||
|
||
/** | ||
* This is the configuration block to customize your React Native Android app. | ||
* By default you don't need to apply any configuration, just uncomment the lines you need. | ||
*/ | ||
react { | ||
/* Folders */ | ||
// The root of your project, i.e. where "package.json" lives. Default is '..' | ||
// root = file("../") | ||
// The folder where the react-native NPM package is. Default is ../node_modules/react-native | ||
// reactNativeDir = file("../node_modules/react-native") | ||
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen | ||
// codegenDir = file("../node_modules/@react-native/codegen") | ||
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js | ||
// cliFile = file("../node_modules/react-native/cli.js") | ||
|
||
/* Variants */ | ||
// The list of variants to that are debuggable. For those we're going to | ||
// skip the bundling of the JS bundle and the assets. By default is just 'debug'. | ||
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. | ||
// debuggableVariants = ["liteDebug", "prodDebug"] | ||
|
||
/* Bundling */ | ||
// A list containing the node command and its flags. Default is just 'node'. | ||
// nodeExecutableAndArgs = ["node"] | ||
// | ||
// The command to run when bundling. By default is 'bundle' | ||
// bundleCommand = "ram-bundle" | ||
// | ||
// The path to the CLI configuration file. Default is empty. | ||
// bundleConfig = file(../rn-cli.config.js) | ||
// | ||
// The name of the generated asset file containing your JS bundle | ||
// bundleAssetName = "MyApplication.android.bundle" | ||
// | ||
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js' | ||
entryFile = file("../../index.js") | ||
// | ||
// A list of extra flags to pass to the 'bundle' commands. | ||
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle | ||
// extraPackagerArgs = [] | ||
|
||
/* Hermes Commands */ | ||
// The hermes compiler command to run. By default it is 'hermesc' | ||
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" | ||
// | ||
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" | ||
// hermesFlags = ["-O", "-output-source-map"] | ||
} | ||
|
||
/** | ||
* Set this to true to Run Proguard on Release builds to minify the Java bytecode. | ||
*/ | ||
def enableProguardInReleaseBuilds = false | ||
|
||
/** | ||
* The preferred build flavor of JavaScriptCore (JSC) | ||
* | ||
* For example, to use the international variant, you can use: | ||
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'` | ||
* | ||
* The international variant includes ICU i18n library and necessary data | ||
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that | ||
* give correct results when using with locales other than en-US. Note that | ||
* this variant is about 6MiB larger per architecture than default. | ||
*/ | ||
def jscFlavor = 'org.webkit:android-jsc:+' | ||
|
||
android { | ||
ndkVersion rootProject.ext.ndkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
compileSdk rootProject.ext.compileSdkVersion | ||
|
||
namespace "com.reactnativetheoplayer" | ||
defaultConfig { | ||
applicationId "com.reactnativetheoplayer.e2e" | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
signingConfigs { | ||
debug { | ||
storeFile file('debug.keystore') | ||
storePassword 'android' | ||
keyAlias 'androiddebugkey' | ||
keyPassword 'android' | ||
} | ||
} | ||
buildTypes { | ||
debug { | ||
signingConfig signingConfigs.debug | ||
} | ||
release { | ||
// Caution! In production, you need to generate your own keystore file. | ||
// see https://reactnative.dev/docs/signed-apk-android. | ||
signingConfig signingConfigs.debug | ||
minifyEnabled enableProguardInReleaseBuilds | ||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | ||
} | ||
} | ||
} | ||
|
||
def safeExtGet(prop, fallback) { | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
} | ||
|
||
dependencies { | ||
implementation project(path: ':react-native-theoplayer') | ||
implementation "com.google.android.gms:play-services-cast-framework:${safeExtGet('castFrameworkVersion', '+')}" | ||
|
||
// The version of react-native is set by the React Native Gradle Plugin | ||
implementation("com.facebook.react:react-android") | ||
|
||
if (hermesEnabled.toBoolean()) { | ||
implementation("com.facebook.react:hermes-android") | ||
} else { | ||
implementation jscFlavor | ||
} | ||
} | ||
|
||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""Helper definitions to glob .aar and .jar targets""" | ||
|
||
def create_aar_targets(aarfiles): | ||
for aarfile in aarfiles: | ||
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] | ||
lib_deps.append(":" + name) | ||
android_prebuilt_aar( | ||
name = name, | ||
aar = aarfile, | ||
) | ||
|
||
def create_jar_targets(jarfiles): | ||
for jarfile in jarfiles: | ||
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] | ||
lib_deps.append(":" + name) | ||
prebuilt_jar( | ||
name = name, | ||
binary_jar = jarfile, | ||
) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<!-- This is needed by React Native in debug mode only, to show the developer menu. --> | ||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> | ||
|
||
<application | ||
android:icon="@mipmap/ic_launcher" | ||
android:networkSecurityConfig="@xml/network_security_config" | ||
android:usesCleartextTraffic="true" | ||
tools:targetApi="28" | ||
tools:ignore="GoogleAppIndexingWarning" /> | ||
|
||
</manifest> |
Oops, something went wrong.