Skip to content

Commit f51aa5d

Browse files
nader dabitnader dabit
nader dabit
authored and
nader dabit
committed
updated ReactXP
1 parent 7cffdc4 commit f51aa5d

File tree

1,659 files changed

+66735
-29934
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,659 files changed

+66735
-29934
lines changed

.DS_Store

0 Bytes
Binary file not shown.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-xp-app",
3-
"version": "0.3.4",
3+
"version": "0.4.0",
44
"description": "react xp project generator",
55
"main": "index.js",
66
"bin": {

src/.DS_Store

6 KB
Binary file not shown.

src/README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RXP
1+
# RXPHelloWorld
22

33
This app works on React Native (iOS, Android) and web. Most of the app's code is contained in `App.tsx`.
44

@@ -7,10 +7,6 @@ The commands in the instructions below assume you are in the root of this repo.
77
### Initial Setup
88

99
- Run `npm install`. This fetches the dependencies.
10-
- Open `node_modules/reactxp/dist/native-common/App.js` and replace
11-
`RN.AppRegistry.registerComponent('RXApp',`
12-
with
13-
`RN.AppRegistry.registerComponent('reactXPTest',`
1410

1511
### Building for Web
1612

src/__tests__/index.android.js

-12
This file was deleted.

src/__tests__/index.ios.js

-12
This file was deleted.

src/android/app/BUCK

+26-27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import re
2-
31
# To learn about Buck see [Docs](https://buckbuild.com/).
42
# To run your application with Buck:
53
# - install Buck
@@ -11,56 +9,57 @@ import re
119
#
1210

1311
lib_deps = []
12+
1413
for jarfile in glob(['libs/*.jar']):
15-
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
14+
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
1615
lib_deps.append(':' + name)
1716
prebuilt_jar(
1817
name = name,
1918
binary_jar = jarfile,
2019
)
2120

2221
for aarfile in glob(['libs/*.aar']):
23-
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
22+
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
2423
lib_deps.append(':' + name)
2524
android_prebuilt_aar(
2625
name = name,
2726
aar = aarfile,
2827
)
2928

3029
android_library(
31-
name = 'all-libs',
32-
exported_deps = lib_deps
30+
name = "all-libs",
31+
exported_deps = lib_deps,
3332
)
3433

3534
android_library(
36-
name = 'app-code',
37-
srcs = glob([
38-
'src/main/java/**/*.java',
39-
]),
40-
deps = [
41-
':all-libs',
42-
':build_config',
43-
':res',
44-
],
35+
name = "app-code",
36+
srcs = glob([
37+
"src/main/java/**/*.java",
38+
]),
39+
deps = [
40+
":all-libs",
41+
":build_config",
42+
":res",
43+
],
4544
)
4645

4746
android_build_config(
48-
name = 'build_config',
49-
package = 'com.rxapp',
47+
name = "build_config",
48+
package = "com.rxphelloworld",
5049
)
5150

5251
android_resource(
53-
name = 'res',
54-
res = 'src/main/res',
55-
package = 'com.rxapp',
52+
name = "res",
53+
package = "com.rxphelloworld",
54+
res = "src/main/res",
5655
)
5756

5857
android_binary(
59-
name = 'app',
60-
package_type = 'debug',
61-
manifest = 'src/main/AndroidManifest.xml',
62-
keystore = '//android/keystores:debug',
63-
deps = [
64-
':app-code',
65-
],
58+
name = "app",
59+
keystore = "//android/keystores:debug",
60+
manifest = "src/main/AndroidManifest.xml",
61+
package_type = "debug",
62+
deps = [
63+
":app-code",
64+
],
6665
)

src/android/app/build.gradle

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ def enableProguardInReleaseBuilds = false
8484

8585
android {
8686
compileSdkVersion 23
87-
buildToolsVersion "23.0.1"
87+
buildToolsVersion '25.0.0'
8888

8989
defaultConfig {
90-
applicationId "com.rxapp"
90+
applicationId "com.rxphelloworld"
9191
minSdkVersion 16
9292
targetSdkVersion 22
9393
versionCode 1
@@ -126,6 +126,8 @@ android {
126126
}
127127

128128
dependencies {
129+
compile project(':react-native-video')
130+
compile project(':react-native-svg')
129131
compile fileTree(dir: "libs", include: ["*.jar"])
130132
compile "com.android.support:appcompat-v7:23.0.1"
131133
compile "com.facebook.react:react-native:+" // From node_modules

src/android/app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rxapp"
2+
package="com.rxphelloworld"
33
android:versionCode="1"
44
android:versionName="1.0">
55

src/android/app/src/main/java/com/rxapp/MainActivity.java src/android/app/src/main/java/com/rxphelloworld/MainActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.rxapp;
1+
package com.rxphelloworld;
22

33
import com.facebook.react.ReactActivity;
44

src/android/app/src/main/java/com/rxapp/MainApplication.java src/android/app/src/main/java/com/rxphelloworld/MainApplication.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
package com.rxapp;
1+
package com.rxphelloworld;
22

33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import com.brentvatne.react.ReactVideoPackage;
7+
import com.horcrux.svg.RNSvgPackage;
68
import com.facebook.react.ReactNativeHost;
79
import com.facebook.react.ReactPackage;
810
import com.facebook.react.shell.MainReactPackage;
@@ -22,7 +24,9 @@ public boolean getUseDeveloperSupport() {
2224
@Override
2325
protected List<ReactPackage> getPackages() {
2426
return Arrays.<ReactPackage>asList(
25-
new MainReactPackage()
27+
new MainReactPackage(),
28+
new ReactVideoPackage(),
29+
new RNSvgPackage()
2630
);
2731
}
2832
};
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">rxapp</string>
2+
<string name="app_name">RXPHelloWorld</string>
33
</resources>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Sun Apr 09 20:23:19 PDT 2017
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
34
zipStoreBase=GRADLE_USER_HOME
45
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

src/android/gradlew

100755100644
File mode changed.

src/android/gradlew.bat

+90-90
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
1-
@if "%DEBUG%" == "" @echo off
2-
@rem ##########################################################################
3-
@rem
4-
@rem Gradle startup script for Windows
5-
@rem
6-
@rem ##########################################################################
7-
8-
@rem Set local scope for the variables with windows NT shell
9-
if "%OS%"=="Windows_NT" setlocal
10-
11-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12-
set DEFAULT_JVM_OPTS=
13-
14-
set DIRNAME=%~dp0
15-
if "%DIRNAME%" == "" set DIRNAME=.
16-
set APP_BASE_NAME=%~n0
17-
set APP_HOME=%DIRNAME%
18-
19-
@rem Find java.exe
20-
if defined JAVA_HOME goto findJavaFromJavaHome
21-
22-
set JAVA_EXE=java.exe
23-
%JAVA_EXE% -version >NUL 2>&1
24-
if "%ERRORLEVEL%" == "0" goto init
25-
26-
echo.
27-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28-
echo.
29-
echo Please set the JAVA_HOME variable in your environment to match the
30-
echo location of your Java installation.
31-
32-
goto fail
33-
34-
:findJavaFromJavaHome
35-
set JAVA_HOME=%JAVA_HOME:"=%
36-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37-
38-
if exist "%JAVA_EXE%" goto init
39-
40-
echo.
41-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42-
echo.
43-
echo Please set the JAVA_HOME variable in your environment to match the
44-
echo location of your Java installation.
45-
46-
goto fail
47-
48-
:init
49-
@rem Get command-line arguments, handling Windowz variants
50-
51-
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
if "%@eval[2+2]" == "4" goto 4NT_args
53-
54-
:win9xME_args
55-
@rem Slurp the command line arguments.
56-
set CMD_LINE_ARGS=
57-
set _SKIP=2
58-
59-
:win9xME_args_slurp
60-
if "x%~1" == "x" goto execute
61-
62-
set CMD_LINE_ARGS=%*
63-
goto execute
64-
65-
:4NT_args
66-
@rem Get arguments from the 4NT Shell from JP Software
67-
set CMD_LINE_ARGS=%$
68-
69-
:execute
70-
@rem Setup the command line
71-
72-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73-
74-
@rem Execute Gradle
75-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76-
77-
:end
78-
@rem End local scope for the variables with windows NT shell
79-
if "%ERRORLEVEL%"=="0" goto mainEnd
80-
81-
:fail
82-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83-
rem the _cmd.exe /c_ return code!
84-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85-
exit /b 1
86-
87-
:mainEnd
88-
if "%OS%"=="Windows_NT" endlocal
89-
90-
:omega
1+
@if "%DEBUG%" == "" @echo off
2+
@rem ##########################################################################
3+
@rem
4+
@rem Gradle startup script for Windows
5+
@rem
6+
@rem ##########################################################################
7+
8+
@rem Set local scope for the variables with windows NT shell
9+
if "%OS%"=="Windows_NT" setlocal
10+
11+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12+
set DEFAULT_JVM_OPTS=
13+
14+
set DIRNAME=%~dp0
15+
if "%DIRNAME%" == "" set DIRNAME=.
16+
set APP_BASE_NAME=%~n0
17+
set APP_HOME=%DIRNAME%
18+
19+
@rem Find java.exe
20+
if defined JAVA_HOME goto findJavaFromJavaHome
21+
22+
set JAVA_EXE=java.exe
23+
%JAVA_EXE% -version >NUL 2>&1
24+
if "%ERRORLEVEL%" == "0" goto init
25+
26+
echo.
27+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28+
echo.
29+
echo Please set the JAVA_HOME variable in your environment to match the
30+
echo location of your Java installation.
31+
32+
goto fail
33+
34+
:findJavaFromJavaHome
35+
set JAVA_HOME=%JAVA_HOME:"=%
36+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37+
38+
if exist "%JAVA_EXE%" goto init
39+
40+
echo.
41+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42+
echo.
43+
echo Please set the JAVA_HOME variable in your environment to match the
44+
echo location of your Java installation.
45+
46+
goto fail
47+
48+
:init
49+
@rem Get command-line arguments, handling Windowz variants
50+
51+
if not "%OS%" == "Windows_NT" goto win9xME_args
52+
if "%@eval[2+2]" == "4" goto 4NT_args
53+
54+
:win9xME_args
55+
@rem Slurp the command line arguments.
56+
set CMD_LINE_ARGS=
57+
set _SKIP=2
58+
59+
:win9xME_args_slurp
60+
if "x%~1" == "x" goto execute
61+
62+
set CMD_LINE_ARGS=%*
63+
goto execute
64+
65+
:4NT_args
66+
@rem Get arguments from the 4NT Shell from JP Software
67+
set CMD_LINE_ARGS=%$
68+
69+
:execute
70+
@rem Setup the command line
71+
72+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
74+
@rem Execute Gradle
75+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76+
77+
:end
78+
@rem End local scope for the variables with windows NT shell
79+
if "%ERRORLEVEL%"=="0" goto mainEnd
80+
81+
:fail
82+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83+
rem the _cmd.exe /c_ return code!
84+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85+
exit /b 1
86+
87+
:mainEnd
88+
if "%OS%"=="Windows_NT" endlocal
89+
90+
:omega

0 commit comments

Comments
 (0)