diff --git a/Examples/AdvancedEffects/.flowconfig b/Examples/AdvancedEffects/.flowconfig
index 05cad208f26316a3eddda55773f7a50715715d2e..8eadd339f034f8fb82a5215743d098bb46d0604c 100644
--- a/Examples/AdvancedEffects/.flowconfig
+++ b/Examples/AdvancedEffects/.flowconfig
@@ -7,12 +7,24 @@
# Some modules have their own node_modules with overlap
.*/node_modules/node-haste/.*
-# Ignore react-tools where there are overlaps, but don't ignore anything that
-# react-native relies on
-.*/node_modules/react-tools/src/React.js
-.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
-.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
-.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
+# Ugh
+.*/node_modules/babel.*
+.*/node_modules/babylon.*
+.*/node_modules/invariant.*
+
+# Ignore react and fbjs where there are overlaps, but don't ignore
+# anything that react-native relies on
+.*/node_modules/fbjs-haste/.*/__tests__/.*
+.*/node_modules/fbjs-haste/__forks__/Map.js
+.*/node_modules/fbjs-haste/__forks__/Promise.js
+.*/node_modules/fbjs-haste/__forks__/fetch.js
+.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js
+.*/node_modules/fbjs-haste/core/isEmpty.js
+.*/node_modules/fbjs-haste/crypto/crc32.js
+.*/node_modules/fbjs-haste/stubs/ErrorUtils.js
+.*/node_modules/react-haste/React.js
+.*/node_modules/react-haste/renderers/dom/ReactDOM.js
+.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
# Ignore commoner tests
.*/node_modules/commoner/test/.*
@@ -43,9 +55,9 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
[version]
-0.17.0
+0.18.1
diff --git a/Examples/AdvancedEffects/android/app/app.iml b/Examples/AdvancedEffects/android/app/app.iml
index 1b995bcb8e83efc0e7bf27cc4271d3402828c92a..236cbf39593b660de6936fd790602dc1059f47ee 100644
--- a/Examples/AdvancedEffects/android/app/app.iml
+++ b/Examples/AdvancedEffects/android/app/app.iml
@@ -73,12 +73,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -92,24 +92,27 @@
-
+
-
+
+
+
+
-
-
+
+
-
+
-
-
+
+
+
-
+
-
-
+
\ No newline at end of file
diff --git a/Examples/AdvancedEffects/android/app/build.gradle b/Examples/AdvancedEffects/android/app/build.gradle
index 850a7c5b316bf24eac10f3b505c9c19c7781e7fe..30541b8d1e312bad34c9c9ec79ff839c05d19cd6 100644
--- a/Examples/AdvancedEffects/android/app/build.gradle
+++ b/Examples/AdvancedEffects/android/app/build.gradle
@@ -74,6 +74,7 @@ android {
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
- compile "com.facebook.react:react-native:0.14.+"
- compile project(':rngl')
+ compile "com.facebook.react:react-native:0.16.+"
+
+ compile project(':RNGL')
}
diff --git a/Examples/AdvancedEffects/android/app/react.gradle b/Examples/AdvancedEffects/android/app/react.gradle
index dc18bb9a06257d2d7e612b1bcbd83474e92b99a5..1e08b00f13b9e6440f61787cf151998a4ee5a485 100644
--- a/Examples/AdvancedEffects/android/app/react.gradle
+++ b/Examples/AdvancedEffects/android/app/react.gradle
@@ -1,3 +1,5 @@
+import org.apache.tools.ant.taskdefs.condition.Os
+
def config = project.hasProperty("react") ? project.react : [];
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
@@ -36,8 +38,13 @@ task bundleDebugJsAndAssets(type: Exec) {
// set up the call to the react-native cli
workingDir reactRoot
- commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
+ entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug
+ } else {
+ commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug
+ }
enabled config.bundleInDebug ?: false
}
@@ -56,8 +63,13 @@ task bundleReleaseJsAndAssets(type: Exec) {
// set up the call to the react-native cli
workingDir reactRoot
- commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease
+ } else {
+ commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
+ entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease
+ }
enabled config.bundleInRelease ?: true
}
diff --git a/Examples/AdvancedEffects/android/app/src/main/java/com/advancedeffects/MainActivity.java b/Examples/AdvancedEffects/android/app/src/main/java/com/advancedeffects/MainActivity.java
index db34c47db68a9fca4a2937da30be3f331ebdf100..733e28752b1dda79e898b4d3ce5fafe708a0d085 100644
--- a/Examples/AdvancedEffects/android/app/src/main/java/com/advancedeffects/MainActivity.java
+++ b/Examples/AdvancedEffects/android/app/src/main/java/com/advancedeffects/MainActivity.java
@@ -9,7 +9,6 @@ import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactRootView;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
import com.facebook.react.shell.MainReactPackage;
-import com.facebook.soloader.SoLoader;
import com.projectseptember.RNGL.RNGLPackage;
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
@@ -26,8 +25,8 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
- .addPackage(new RNGLPackage())
.addPackage(new MainReactPackage())
+ .addPackage(new RNGLPackage())
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
@@ -74,7 +73,7 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
super.onResume();
if (mReactInstanceManager != null) {
- mReactInstanceManager.onResume(this);
+ mReactInstanceManager.onResume(this, this);
}
}
}
diff --git a/Examples/AdvancedEffects/android/build.gradle b/Examples/AdvancedEffects/android/build.gradle
index ccdfc4e3dca8070b281d68056da956343d52a4ea..bdb0fcc6dac69cadcb1aa5b177aa11e114941b6d 100644
--- a/Examples/AdvancedEffects/android/build.gradle
+++ b/Examples/AdvancedEffects/android/build.gradle
@@ -16,5 +16,8 @@ allprojects {
repositories {
mavenLocal()
jcenter()
+ jcenter {
+ url "http://dl.bintray.com/mkonicek/maven"
+ }
}
}
diff --git a/Examples/AdvancedEffects/android/settings.gradle b/Examples/AdvancedEffects/android/settings.gradle
index 310c30d3bafb929186fbaaaee9b5d30dfe6af312..01166d49e5c39e908f1d439b2b4993beeddae7bf 100644
--- a/Examples/AdvancedEffects/android/settings.gradle
+++ b/Examples/AdvancedEffects/android/settings.gradle
@@ -2,5 +2,5 @@ rootProject.name = 'AdvancedEffects'
include ':app'
-include ':rngl', ':app'
-project(':rngl').projectDir = new File(rootProject.projectDir, '../../../android')
\ No newline at end of file
+include ':RNGL'
+project(':RNGL').projectDir = file('../../../android')
\ No newline at end of file
diff --git a/Examples/AdvancedEffects/ios/AdvancedEffects.xcodeproj/project.pbxproj b/Examples/AdvancedEffects/ios/AdvancedEffects.xcodeproj/project.pbxproj
index 26fbef0c5678b2ee82a006fb41c84741560f5f2a..67137fa8e2bee65e80b13c4ddff19528e91ffb01 100644
--- a/Examples/AdvancedEffects/ios/AdvancedEffects.xcodeproj/project.pbxproj
+++ b/Examples/AdvancedEffects/ios/AdvancedEffects.xcodeproj/project.pbxproj
@@ -21,7 +21,7 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
- 3425F3031C03B5EE00139EC9 /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34582C661BEFE6BA0093A350 /* libRNGL.a */; };
+ 34CCE0351C13208200427A3E /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34CCE0341C13206E00427A3E /* libRNGL.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
/* End PBXBuildFile section */
@@ -89,9 +89,9 @@
remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
remoteInfo = React;
};
- 34582C651BEFE6BA0093A350 /* PBXContainerItemProxy */ = {
+ 34CCE0331C13206E00427A3E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = 34582C571BEFE6BA0093A350 /* RNGL.xcodeproj */;
+ containerPortal = 34CCE0251C13206E00427A3E /* RNGL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 4107012F1ACB723B00C6AA39;
remoteInfo = RNGL;
@@ -132,7 +132,7 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = AdvancedEffects/Info.plist; sourceTree = ""; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AdvancedEffects/main.m; sourceTree = ""; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
- 34582C571BEFE6BA0093A350 /* RNGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGL.xcodeproj; path = "../node_modules/gl-react-native/ios/RNGL.xcodeproj"; sourceTree = ""; };
+ 34CCE0251C13206E00427A3E /* RNGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGL.xcodeproj; path = "../node_modules/gl-react-native/ios/RNGL.xcodeproj"; sourceTree = ""; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
/* End PBXFileReference section */
@@ -149,7 +149,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 3425F3031C03B5EE00139EC9 /* libRNGL.a in Frameworks */,
+ 34CCE0351C13208200427A3E /* libRNGL.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
@@ -261,10 +261,10 @@
name = Products;
sourceTree = "";
};
- 34582C581BEFE6BA0093A350 /* Products */ = {
+ 34CCE0261C13206E00427A3E /* Products */ = {
isa = PBXGroup;
children = (
- 34582C661BEFE6BA0093A350 /* libRNGL.a */,
+ 34CCE0341C13206E00427A3E /* libRNGL.a */,
);
name = Products;
sourceTree = "";
@@ -280,7 +280,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
- 34582C571BEFE6BA0093A350 /* RNGL.xcodeproj */,
+ 34CCE0251C13206E00427A3E /* RNGL.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
@@ -431,8 +431,8 @@
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
},
{
- ProductGroup = 34582C581BEFE6BA0093A350 /* Products */;
- ProjectRef = 34582C571BEFE6BA0093A350 /* RNGL.xcodeproj */;
+ ProductGroup = 34CCE0261C13206E00427A3E /* Products */;
+ ProjectRef = 34CCE0251C13206E00427A3E /* RNGL.xcodeproj */;
},
);
projectRoot = "";
@@ -500,11 +500,11 @@
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 34582C661BEFE6BA0093A350 /* libRNGL.a */ = {
+ 34CCE0341C13206E00427A3E /* libRNGL.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNGL.a;
- remoteRef = 34582C651BEFE6BA0093A350 /* PBXContainerItemProxy */;
+ remoteRef = 34CCE0331C13206E00427A3E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
diff --git a/Examples/AdvancedEffects/ios/AdvancedEffects/AppDelegate.m b/Examples/AdvancedEffects/ios/AdvancedEffects/AppDelegate.m
index 3c75cc8dc74399e0c70681c79d80c2955436e5ea..7b781db3da200ba275b4ed83a2834828cb5390bc 100644
--- a/Examples/AdvancedEffects/ios/AdvancedEffects/AppDelegate.m
+++ b/Examples/AdvancedEffects/ios/AdvancedEffects/AppDelegate.m
@@ -47,7 +47,7 @@
launchOptions:launchOptions];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- UIViewController *rootViewController = [[UIViewController alloc] init];
+ UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
diff --git a/Examples/AdvancedEffects/ios/AdvancedEffectsTests/AdvancedEffectsTests.m b/Examples/AdvancedEffects/ios/AdvancedEffectsTests/AdvancedEffectsTests.m
index 8ce73515fd91aff89c0274b4cb35946b54986073..ee20246889a42826722ab6d37a1b719563c043ab 100644
--- a/Examples/AdvancedEffects/ios/AdvancedEffectsTests/AdvancedEffectsTests.m
+++ b/Examples/AdvancedEffects/ios/AdvancedEffectsTests/AdvancedEffectsTests.m
@@ -42,7 +42,7 @@
BOOL foundElement = NO;
__block NSString *redboxError = nil;
- RCTSetLogFunction(^(RCTLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) {
+ RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
diff --git a/Examples/AdvancedEffects/package.json b/Examples/AdvancedEffects/package.json
index 1e6931874f6204b094a36baffa432afb67207e4a..70137d00e4afd017bc5295ebb812a89fcc15d1db 100644
--- a/Examples/AdvancedEffects/package.json
+++ b/Examples/AdvancedEffects/package.json
@@ -6,9 +6,9 @@
"start": "react-native start"
},
"dependencies": {
+ "gl-react": "^2.0.2",
"gl-react-native": "file:../..",
- "gl-react": "file:../../../gl-react",
"glsl-transitions": "^2015.11.8",
- "react-native": "^0.14.2"
+ "react-native": "^0.16.0"
}
}
diff --git a/Examples/AdvancedEffects/src/Slideshow.js b/Examples/AdvancedEffects/src/Slideshow.js
index 5ed9223530b67d3ce1baa49a460e6683af7bbe77..20ca69c8773c1e50d3f1cf8121c3c0acd0cc2b64 100644
--- a/Examples/AdvancedEffects/src/Slideshow.js
+++ b/Examples/AdvancedEffects/src/Slideshow.js
@@ -34,13 +34,15 @@ class Slideshow extends React.Component {
const transitionUniforms = this._uniforms;
return
-
+
diff --git a/Examples/Simple/.flowconfig b/Examples/Simple/.flowconfig
index 05cad208f26316a3eddda55773f7a50715715d2e..8eadd339f034f8fb82a5215743d098bb46d0604c 100644
--- a/Examples/Simple/.flowconfig
+++ b/Examples/Simple/.flowconfig
@@ -7,12 +7,24 @@
# Some modules have their own node_modules with overlap
.*/node_modules/node-haste/.*
-# Ignore react-tools where there are overlaps, but don't ignore anything that
-# react-native relies on
-.*/node_modules/react-tools/src/React.js
-.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
-.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
-.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
+# Ugh
+.*/node_modules/babel.*
+.*/node_modules/babylon.*
+.*/node_modules/invariant.*
+
+# Ignore react and fbjs where there are overlaps, but don't ignore
+# anything that react-native relies on
+.*/node_modules/fbjs-haste/.*/__tests__/.*
+.*/node_modules/fbjs-haste/__forks__/Map.js
+.*/node_modules/fbjs-haste/__forks__/Promise.js
+.*/node_modules/fbjs-haste/__forks__/fetch.js
+.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js
+.*/node_modules/fbjs-haste/core/isEmpty.js
+.*/node_modules/fbjs-haste/crypto/crc32.js
+.*/node_modules/fbjs-haste/stubs/ErrorUtils.js
+.*/node_modules/react-haste/React.js
+.*/node_modules/react-haste/renderers/dom/ReactDOM.js
+.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
# Ignore commoner tests
.*/node_modules/commoner/test/.*
@@ -43,9 +55,9 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
[version]
-0.17.0
+0.18.1
diff --git a/Examples/Simple/android/app/app.iml b/Examples/Simple/android/app/app.iml
index 4b5659e9947915d062716d45e8d89b6c80930a89..bacf17aa77db883936557db6666b6ba9607d6e22 100644
--- a/Examples/Simple/android/app/app.iml
+++ b/Examples/Simple/android/app/app.iml
@@ -72,12 +72,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -91,25 +91,28 @@
-
+
-
+
+
+
+
-
-
+
+
-
+
-
-
+
+
+
-
+
-
-
+
\ No newline at end of file
diff --git a/Examples/Simple/android/app/build.gradle b/Examples/Simple/android/app/build.gradle
index ae3edeb4dc85a5d9cfc31111ca58d417b4767e4a..4bcd0ed93be4d7004fe8f5fbcc5ef894ba47fc49 100644
--- a/Examples/Simple/android/app/build.gradle
+++ b/Examples/Simple/android/app/build.gradle
@@ -74,7 +74,8 @@ android {
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
- compile "com.facebook.react:react-native:0.14.+"
- compile project(':rngl')
- compile project(':RNMaterialKit')
+ compile "com.facebook.react:react-native:0.16.+"
+
+ compile project(":RNMaterialKit")
+ compile project(":RNGL")
}
diff --git a/Examples/Simple/android/app/react.gradle b/Examples/Simple/android/app/react.gradle
index dc18bb9a06257d2d7e612b1bcbd83474e92b99a5..1e08b00f13b9e6440f61787cf151998a4ee5a485 100644
--- a/Examples/Simple/android/app/react.gradle
+++ b/Examples/Simple/android/app/react.gradle
@@ -1,3 +1,5 @@
+import org.apache.tools.ant.taskdefs.condition.Os
+
def config = project.hasProperty("react") ? project.react : [];
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
@@ -36,8 +38,13 @@ task bundleDebugJsAndAssets(type: Exec) {
// set up the call to the react-native cli
workingDir reactRoot
- commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
+ entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug
+ } else {
+ commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug
+ }
enabled config.bundleInDebug ?: false
}
@@ -56,8 +63,13 @@ task bundleReleaseJsAndAssets(type: Exec) {
// set up the call to the react-native cli
workingDir reactRoot
- commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease
+ } else {
+ commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
+ entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease
+ }
enabled config.bundleInRelease ?: true
}
diff --git a/Examples/Simple/android/app/src/main/java/com/simple/MainActivity.java b/Examples/Simple/android/app/src/main/java/com/simple/MainActivity.java
index 8c6aaeacc4249317e5aeb5e7bfcc38478c3de3de..1822c6c017c5a67d63910691aa0330d6a9f54cb4 100644
--- a/Examples/Simple/android/app/src/main/java/com/simple/MainActivity.java
+++ b/Examples/Simple/android/app/src/main/java/com/simple/MainActivity.java
@@ -9,7 +9,6 @@ import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactRootView;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
import com.facebook.react.shell.MainReactPackage;
-import com.facebook.soloader.SoLoader;
import com.github.xinthink.rnmk.ReactMaterialKitPackage;
import com.projectseptember.RNGL.RNGLPackage;
@@ -76,7 +75,7 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
super.onResume();
if (mReactInstanceManager != null) {
- mReactInstanceManager.onResume(this);
+ mReactInstanceManager.onResume(this, this);
}
}
}
diff --git a/Examples/Simple/android/build.gradle b/Examples/Simple/android/build.gradle
index ccdfc4e3dca8070b281d68056da956343d52a4ea..bdb0fcc6dac69cadcb1aa5b177aa11e114941b6d 100644
--- a/Examples/Simple/android/build.gradle
+++ b/Examples/Simple/android/build.gradle
@@ -16,5 +16,8 @@ allprojects {
repositories {
mavenLocal()
jcenter()
+ jcenter {
+ url "http://dl.bintray.com/mkonicek/maven"
+ }
}
}
diff --git a/Examples/Simple/android/settings.gradle b/Examples/Simple/android/settings.gradle
index 117a0b2e62e93c3977434e780ee30ed79da4e62e..eac886a4cb3dc83c9e8f7b46a373491a6f04ff31 100644
--- a/Examples/Simple/android/settings.gradle
+++ b/Examples/Simple/android/settings.gradle
@@ -2,8 +2,8 @@ rootProject.name = 'Simple'
include ':app'
-include ':rngl', ':app'
-project(':rngl').projectDir = new File(rootProject.projectDir, '../../../android')
-
include ':RNMaterialKit'
-project(':RNMaterialKit').projectDir = file('../node_modules/react-native-material-kit/android')
\ No newline at end of file
+project(':RNMaterialKit').projectDir = file('../node_modules/react-native-material-kit/android')
+
+include ':RNGL'
+project(':RNGL').projectDir = file('../../../android')
\ No newline at end of file
diff --git a/Examples/Simple/ios/Simple.xcodeproj/project.pbxproj b/Examples/Simple/ios/Simple.xcodeproj/project.pbxproj
index d5c945bdb2a00d2c0469a1848957ffe850880eda..d0fc18e51ce394e8cb12ce9e16a26f89348b3b50 100644
--- a/Examples/Simple/ios/Simple.xcodeproj/project.pbxproj
+++ b/Examples/Simple/ios/Simple.xcodeproj/project.pbxproj
@@ -21,8 +21,8 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
- 34BDBFE91C00AB2100A531CF /* libRCTMaterialKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 347A8B8B1C00771B00A29A61 /* libRCTMaterialKit.a */; };
- 34BDBFF51C00AB2400A531CF /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 347A8B851C00770E00A29A61 /* libRNGL.a */; };
+ 34607B601C132B22009203B1 /* libRCTMaterialKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34607B581C132B1C009203B1 /* libRCTMaterialKit.a */; };
+ 3461EB4B1C132AEC0003E4A2 /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3461EB4A1C132AD30003E4A2 /* libRNGL.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
/* End PBXBuildFile section */
@@ -90,19 +90,19 @@
remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
remoteInfo = React;
};
- 347A8B841C00770E00A29A61 /* PBXContainerItemProxy */ = {
+ 34607B571C132B1C009203B1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = 347A8B761C00770E00A29A61 /* RNGL.xcodeproj */;
+ containerPortal = 34607B4F1C132B1C009203B1 /* RCTMaterialKit.xcodeproj */;
proxyType = 2;
- remoteGlobalIDString = 4107012F1ACB723B00C6AA39;
- remoteInfo = RNGL;
+ remoteGlobalIDString = 8A1B8E771B22E4E300DB45C2;
+ remoteInfo = RCTMaterialKit;
};
- 347A8B8A1C00771B00A29A61 /* PBXContainerItemProxy */ = {
+ 3461EB491C132AD30003E4A2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = 347A8B861C00771B00A29A61 /* RCTMaterialKit.xcodeproj */;
+ containerPortal = 3461EB3B1C132AD30003E4A2 /* RNGL.xcodeproj */;
proxyType = 2;
- remoteGlobalIDString = 8A1B8E771B22E4E300DB45C2;
- remoteInfo = RCTMaterialKit;
+ remoteGlobalIDString = 4107012F1ACB723B00C6AA39;
+ remoteInfo = RNGL;
};
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@@ -140,8 +140,8 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Simple/Info.plist; sourceTree = ""; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Simple/main.m; sourceTree = ""; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
- 347A8B761C00770E00A29A61 /* RNGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGL.xcodeproj; path = "../node_modules/gl-react-native/ios/RNGL.xcodeproj"; sourceTree = ""; };
- 347A8B861C00771B00A29A61 /* RCTMaterialKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTMaterialKit.xcodeproj; path = "../node_modules/react-native-material-kit/iOS/RCTMaterialKit.xcodeproj"; sourceTree = ""; };
+ 34607B4F1C132B1C009203B1 /* RCTMaterialKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTMaterialKit.xcodeproj; path = "../node_modules/react-native-material-kit/iOS/RCTMaterialKit.xcodeproj"; sourceTree = ""; };
+ 3461EB3B1C132AD30003E4A2 /* RNGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGL.xcodeproj; path = "../node_modules/gl-react-native/ios/RNGL.xcodeproj"; sourceTree = ""; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
/* End PBXFileReference section */
@@ -158,8 +158,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 34BDBFF51C00AB2400A531CF /* libRNGL.a in Frameworks */,
- 34BDBFE91C00AB2100A531CF /* libRCTMaterialKit.a in Frameworks */,
+ 34607B601C132B22009203B1 /* libRCTMaterialKit.a in Frameworks */,
+ 3461EB4B1C132AEC0003E4A2 /* libRNGL.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
@@ -271,18 +271,18 @@
name = Products;
sourceTree = "";
};
- 347A8B771C00770E00A29A61 /* Products */ = {
+ 34607B501C132B1C009203B1 /* Products */ = {
isa = PBXGroup;
children = (
- 347A8B851C00770E00A29A61 /* libRNGL.a */,
+ 34607B581C132B1C009203B1 /* libRCTMaterialKit.a */,
);
name = Products;
sourceTree = "";
};
- 347A8B871C00771B00A29A61 /* Products */ = {
+ 3461EB3C1C132AD30003E4A2 /* Products */ = {
isa = PBXGroup;
children = (
- 347A8B8B1C00771B00A29A61 /* libRCTMaterialKit.a */,
+ 3461EB4A1C132AD30003E4A2 /* libRNGL.a */,
);
name = Products;
sourceTree = "";
@@ -298,8 +298,8 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
- 347A8B861C00771B00A29A61 /* RCTMaterialKit.xcodeproj */,
- 347A8B761C00770E00A29A61 /* RNGL.xcodeproj */,
+ 34607B4F1C132B1C009203B1 /* RCTMaterialKit.xcodeproj */,
+ 3461EB3B1C132AD30003E4A2 /* RNGL.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
@@ -426,8 +426,8 @@
ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
},
{
- ProductGroup = 347A8B871C00771B00A29A61 /* Products */;
- ProjectRef = 347A8B861C00771B00A29A61 /* RCTMaterialKit.xcodeproj */;
+ ProductGroup = 34607B501C132B1C009203B1 /* Products */;
+ ProjectRef = 34607B4F1C132B1C009203B1 /* RCTMaterialKit.xcodeproj */;
},
{
ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
@@ -454,8 +454,8 @@
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
},
{
- ProductGroup = 347A8B771C00770E00A29A61 /* Products */;
- ProjectRef = 347A8B761C00770E00A29A61 /* RNGL.xcodeproj */;
+ ProductGroup = 3461EB3C1C132AD30003E4A2 /* Products */;
+ ProjectRef = 3461EB3B1C132AD30003E4A2 /* RNGL.xcodeproj */;
},
);
projectRoot = "";
@@ -523,18 +523,18 @@
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 347A8B851C00770E00A29A61 /* libRNGL.a */ = {
+ 34607B581C132B1C009203B1 /* libRCTMaterialKit.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
- path = libRNGL.a;
- remoteRef = 347A8B841C00770E00A29A61 /* PBXContainerItemProxy */;
+ path = libRCTMaterialKit.a;
+ remoteRef = 34607B571C132B1C009203B1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 347A8B8B1C00771B00A29A61 /* libRCTMaterialKit.a */ = {
+ 3461EB4A1C132AD30003E4A2 /* libRNGL.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
- path = libRCTMaterialKit.a;
- remoteRef = 347A8B8A1C00771B00A29A61 /* PBXContainerItemProxy */;
+ path = libRNGL.a;
+ remoteRef = 3461EB491C132AD30003E4A2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
diff --git a/Examples/Simple/ios/Simple/AppDelegate.m b/Examples/Simple/ios/Simple/AppDelegate.m
index 87a358c508550378080a9b3bf37de5598b81352a..11563bb9a8c4f017316ca42bb6d4da00a246ea83 100644
--- a/Examples/Simple/ios/Simple/AppDelegate.m
+++ b/Examples/Simple/ios/Simple/AppDelegate.m
@@ -47,7 +47,7 @@
launchOptions:launchOptions];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- UIViewController *rootViewController = [[UIViewController alloc] init];
+ UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
diff --git a/Examples/Simple/ios/SimpleTests/SimpleTests.m b/Examples/Simple/ios/SimpleTests/SimpleTests.m
index 8b4746ff08abfdc1bf261f2fcb652d42cf197da0..ef367ed0ae4db98a873a86020ee23dd292ac3fd5 100644
--- a/Examples/Simple/ios/SimpleTests/SimpleTests.m
+++ b/Examples/Simple/ios/SimpleTests/SimpleTests.m
@@ -42,7 +42,7 @@
BOOL foundElement = NO;
__block NSString *redboxError = nil;
- RCTSetLogFunction(^(RCTLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) {
+ RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
diff --git a/Examples/Simple/package.json b/Examples/Simple/package.json
index a1b10431d7b6c0f1c1b8850697c8f5810aed396e..e42ff4e814fa8f7dae82b18788052295b36da06e 100644
--- a/Examples/Simple/package.json
+++ b/Examples/Simple/package.json
@@ -7,8 +7,8 @@
},
"dependencies": {
"gl-react-native": "file:../..",
- "gl-react": "file:../../../gl-react",
- "react-native": "^0.14.2",
+ "gl-react": "^2.0.2",
+ "react-native": "^0.16.0",
"react-native-material-kit": "^0.2.2"
}
}
diff --git a/Examples/Tests/.flowconfig b/Examples/Tests/.flowconfig
index caff84900c9e2a5712134c4198dc00b8362ee387..8eadd339f034f8fb82a5215743d098bb46d0604c 100644
--- a/Examples/Tests/.flowconfig
+++ b/Examples/Tests/.flowconfig
@@ -7,12 +7,24 @@
# Some modules have their own node_modules with overlap
.*/node_modules/node-haste/.*
-# Ignore react-tools where there are overlaps, but don't ignore anything that
-# react-native relies on
-.*/node_modules/react-tools/src/React.js
-.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
-.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
-.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
+# Ugh
+.*/node_modules/babel.*
+.*/node_modules/babylon.*
+.*/node_modules/invariant.*
+
+# Ignore react and fbjs where there are overlaps, but don't ignore
+# anything that react-native relies on
+.*/node_modules/fbjs-haste/.*/__tests__/.*
+.*/node_modules/fbjs-haste/__forks__/Map.js
+.*/node_modules/fbjs-haste/__forks__/Promise.js
+.*/node_modules/fbjs-haste/__forks__/fetch.js
+.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js
+.*/node_modules/fbjs-haste/core/isEmpty.js
+.*/node_modules/fbjs-haste/crypto/crc32.js
+.*/node_modules/fbjs-haste/stubs/ErrorUtils.js
+.*/node_modules/react-haste/React.js
+.*/node_modules/react-haste/renderers/dom/ReactDOM.js
+.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
# Ignore commoner tests
.*/node_modules/commoner/test/.*
diff --git a/Examples/Tests/android/app/app.iml b/Examples/Tests/android/app/app.iml
index 16df1d24368a1c92a58f7c58c48529270947c6fd..521052c4c1f58bab757eb22487a6957c4f8de779 100644
--- a/Examples/Tests/android/app/app.iml
+++ b/Examples/Tests/android/app/app.iml
@@ -72,12 +72,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -91,24 +91,27 @@
-
+
-
+
+
+
+
-
+
+
-
-
+
-
-
+
+
+
-
+
-
-
+
\ No newline at end of file
diff --git a/Examples/Tests/android/app/build.gradle b/Examples/Tests/android/app/build.gradle
index 24351ea8f14fb93fdc5d859b258a8eb5c70fe4ba..97b9dd81a075fc182c3c561f37dc57ec590044ba 100644
--- a/Examples/Tests/android/app/build.gradle
+++ b/Examples/Tests/android/app/build.gradle
@@ -74,6 +74,7 @@ android {
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
- compile "com.facebook.react:react-native:0.15.+"
- compile project(':rngl')
+ compile "com.facebook.react:react-native:0.16.+"
+
+ compile project(":RNGL")
}
diff --git a/Examples/Tests/android/app/react.gradle b/Examples/Tests/android/app/react.gradle
index dc18bb9a06257d2d7e612b1bcbd83474e92b99a5..1e08b00f13b9e6440f61787cf151998a4ee5a485 100644
--- a/Examples/Tests/android/app/react.gradle
+++ b/Examples/Tests/android/app/react.gradle
@@ -1,3 +1,5 @@
+import org.apache.tools.ant.taskdefs.condition.Os
+
def config = project.hasProperty("react") ? project.react : [];
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
@@ -36,8 +38,13 @@ task bundleDebugJsAndAssets(type: Exec) {
// set up the call to the react-native cli
workingDir reactRoot
- commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
+ entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug
+ } else {
+ commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file",
entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug
+ }
enabled config.bundleInDebug ?: false
}
@@ -56,8 +63,13 @@ task bundleReleaseJsAndAssets(type: Exec) {
// set up the call to the react-native cli
workingDir reactRoot
- commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease
+ } else {
+ commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file",
+ entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease
+ }
enabled config.bundleInRelease ?: true
}
diff --git a/Examples/Tests/android/app/src/main/java/com/tests/MainActivity.java b/Examples/Tests/android/app/src/main/java/com/tests/MainActivity.java
index c943db501dbe571a1ce38fc944029ef54a216e50..e88f34448d63f39b770aa6e59b43cd1316de0cf4 100644
--- a/Examples/Tests/android/app/src/main/java/com/tests/MainActivity.java
+++ b/Examples/Tests/android/app/src/main/java/com/tests/MainActivity.java
@@ -26,8 +26,8 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
- .addPackage(new RNGLPackage())
.addPackage(new MainReactPackage())
+ .addPackage(new RNGLPackage())
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
diff --git a/Examples/Tests/android/build.gradle b/Examples/Tests/android/build.gradle
index ccdfc4e3dca8070b281d68056da956343d52a4ea..bdb0fcc6dac69cadcb1aa5b177aa11e114941b6d 100644
--- a/Examples/Tests/android/build.gradle
+++ b/Examples/Tests/android/build.gradle
@@ -16,5 +16,8 @@ allprojects {
repositories {
mavenLocal()
jcenter()
+ jcenter {
+ url "http://dl.bintray.com/mkonicek/maven"
+ }
}
}
diff --git a/Examples/Tests/android/settings.gradle b/Examples/Tests/android/settings.gradle
index a328c0bc38936fe6d6cbed32e9b72eb639a28cdb..6fc74239b09b1e00f9061507180cdd1a391518ba 100644
--- a/Examples/Tests/android/settings.gradle
+++ b/Examples/Tests/android/settings.gradle
@@ -2,5 +2,5 @@ rootProject.name = 'Tests'
include ':app'
-include ':rngl', ':app'
-project(':rngl').projectDir = new File(rootProject.projectDir, '../../../android')
\ No newline at end of file
+include ':RNGL'
+project(':RNGL').projectDir = file('../../../android')
\ No newline at end of file
diff --git a/Examples/Tests/iOS/Tests.xcodeproj/project.pbxproj b/Examples/Tests/iOS/Tests.xcodeproj/project.pbxproj
index 59814821bbe0a0ca1a3b4496ba60f3bf357524ce..021ccbc6e5c9b89700218c3367a7c59f14733454 100644
--- a/Examples/Tests/iOS/Tests.xcodeproj/project.pbxproj
+++ b/Examples/Tests/iOS/Tests.xcodeproj/project.pbxproj
@@ -21,7 +21,7 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
- 349265F01C066AAD00992528 /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 349265EF1C066AA400992528 /* libRNGL.a */; };
+ 3461EB301C132AA90003E4A2 /* libRNGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3461EB2F1C132A9F0003E4A2 /* libRNGL.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
/* End PBXBuildFile section */
@@ -89,9 +89,9 @@
remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
remoteInfo = React;
};
- 349265EE1C066AA400992528 /* PBXContainerItemProxy */ = {
+ 3461EB2E1C132A9F0003E4A2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = 349265E01C066AA400992528 /* RNGL.xcodeproj */;
+ containerPortal = 3461EB201C132A9F0003E4A2 /* RNGL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 4107012F1ACB723B00C6AA39;
remoteInfo = RNGL;
@@ -132,7 +132,7 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Tests/Info.plist; sourceTree = ""; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Tests/main.m; sourceTree = ""; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
- 349265E01C066AA400992528 /* RNGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGL.xcodeproj; path = "../node_modules/gl-react-native/ios/RNGL.xcodeproj"; sourceTree = ""; };
+ 3461EB201C132A9F0003E4A2 /* RNGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGL.xcodeproj; path = "../node_modules/gl-react-native/ios/RNGL.xcodeproj"; sourceTree = ""; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
/* End PBXFileReference section */
@@ -149,7 +149,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 349265F01C066AAD00992528 /* libRNGL.a in Frameworks */,
+ 3461EB301C132AA90003E4A2 /* libRNGL.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
@@ -261,10 +261,10 @@
name = Products;
sourceTree = "";
};
- 349265E11C066AA400992528 /* Products */ = {
+ 3461EB211C132A9F0003E4A2 /* Products */ = {
isa = PBXGroup;
children = (
- 349265EF1C066AA400992528 /* libRNGL.a */,
+ 3461EB2F1C132A9F0003E4A2 /* libRNGL.a */,
);
name = Products;
sourceTree = "";
@@ -280,6 +280,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
+ 3461EB201C132A9F0003E4A2 /* RNGL.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
@@ -290,7 +291,6 @@
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
- 349265E01C066AA400992528 /* RNGL.xcodeproj */,
);
name = Libraries;
sourceTree = "";
@@ -431,8 +431,8 @@
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
},
{
- ProductGroup = 349265E11C066AA400992528 /* Products */;
- ProjectRef = 349265E01C066AA400992528 /* RNGL.xcodeproj */;
+ ProductGroup = 3461EB211C132A9F0003E4A2 /* Products */;
+ ProjectRef = 3461EB201C132A9F0003E4A2 /* RNGL.xcodeproj */;
},
);
projectRoot = "";
@@ -500,11 +500,11 @@
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 349265EF1C066AA400992528 /* libRNGL.a */ = {
+ 3461EB2F1C132A9F0003E4A2 /* libRNGL.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNGL.a;
- remoteRef = 349265EE1C066AA400992528 /* PBXContainerItemProxy */;
+ remoteRef = 3461EB2E1C132A9F0003E4A2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
diff --git a/Examples/Tests/ios/TestsTests/TestsTests.m b/Examples/Tests/ios/TestsTests/TestsTests.m
index b1b60bd0781e66e33a61edfb65c6cd82400589ad..a14b6572a61fa4fc8f71d4ceb8e43cff1fe13971 100644
--- a/Examples/Tests/ios/TestsTests/TestsTests.m
+++ b/Examples/Tests/ios/TestsTests/TestsTests.m
@@ -42,7 +42,7 @@
BOOL foundElement = NO;
__block NSString *redboxError = nil;
- RCTSetLogFunction(^(RCTLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) {
+ RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
diff --git a/Examples/Tests/package.json b/Examples/Tests/package.json
index 7cd494b3b84d6a9e24c74b60d3ae2b5188e17be3..da7ebdeb8d5d82757b30006efae9efb861cd2fb5 100644
--- a/Examples/Tests/package.json
+++ b/Examples/Tests/package.json
@@ -7,10 +7,7 @@
},
"dependencies": {
"gl-react-native": "file:../..",
- "gl-react": "file:../../../gl-react",
- "react-native": "^0.14.2"
- },
- "devDependencies": {
- "react-native-cli": "^0.1.7"
+ "gl-react": "^2.0.2",
+ "react-native": "^0.16.0"
}
}
diff --git a/README.md b/README.md
index 1793356cdd712b7af53bec11072cf22940144f4c..db88e5876d87f377e9161e002664a108eacd47df 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,11 @@
**[Gitbook documentation](http://projectseptemberinc.gitbooks.io/gl-react/content/) / [Github](https://github.com/ProjectSeptemberInc/gl-react-native/) / [gl-react](https://github.com/ProjectSeptemberInc/gl-react/)** / [#gl-react on reactiflux](https://discordapp.com/channels/102860784329052160/106102146109325312)
-#
gl-react-native
+#
gl-react-native 
-OpenGL bindings for react-native to implement complex effects over images and components, in the descriptive VDOM paradigm.
+OpenGL bindings for React Native to implement complex effects over images and components, in the descriptive VDOM paradigm.
-**`gl-react-native` is an implementation of `gl-react` for React Native. Please [read the main gl-react README](https://github.com/ProjectSeptemberInc/gl-react/) for more information.**
+**`gl-react-native` is an implementation of `gl-react` for `react-native`. Please [read the main gl-react README](https://github.com/ProjectSeptemberInc/gl-react/) for more information.**
[](./Examples/Simple)[](./Examples/AdvancedEffects)
diff --git a/android/rngl.iml b/android/rngl.iml
index 1654eb94a35c0f7617b5c58afceef26911900fee..8632d38a71c88e1ec969912c96c03e7eaac9b41c 100644
--- a/android/rngl.iml
+++ b/android/rngl.iml
@@ -1,9 +1,9 @@
-
+
-
+
@@ -70,6 +70,12 @@
+
+
+
+
+
+
diff --git a/ios/GLCanvasManager.m b/ios/GLCanvasManager.m
index 0ca4404d7c9c2a8015d7dbe82b62a6c6721b8718..ffa8abb37408dbbf288126611994a19c65657f1d 100644
--- a/ios/GLCanvasManager.m
+++ b/ios/GLCanvasManager.m
@@ -1,7 +1,6 @@
#import "GLCanvasManager.h"
#import "GLCanvas.h"
#import "RCTConvert+GLData.h"
-#import "RCTSparseArray.h"
#import "RCTUIManager.h"
#import "RCTLog.h"
#import
@@ -32,14 +31,15 @@ RCT_EXPORT_VIEW_PROPERTY(onChange, BOOL);
RCT_EXPORT_METHOD(capture: (nonnull NSNumber *)reactTag callback:(RCTResponseSenderBlock)callback)
{
- [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, RCTSparseArray *viewRegistry) {
- GLCanvas *view = viewRegistry[reactTag];
+ [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary *viewRegistry) {
+ UIView *view = viewRegistry[reactTag];
if (![view isKindOfClass:[GLCanvas class]]) {
RCTLog(@"expecting UIView, got: %@", view);
callback(@[@"view is not a GLCanvas"]);
}
else {
- [view capture:callback];
+ GLCanvas *glCanvas = (GLCanvas *)view;
+ [glCanvas capture:callback];
}
}];
}
diff --git a/ios/GLImage.m b/ios/GLImage.m
index 9635e2d4545b18217aa64a02c672c19ff3c065fb..9e47648593dcd95695b71814c570c1770d8e1e92 100644
--- a/ios/GLImage.m
+++ b/ios/GLImage.m
@@ -75,9 +75,9 @@ RCT_NOT_IMPLEMENTED(-init)
if (!_src) {
[self clearImage];
} else {
-
+
// Load the image (without resizing it)
-
+
if (![_src hasPrefix:@"http://"] && ![_src hasPrefix:@"https://"]) {
self.image = [UIImage imageNamed:_src];
dispatch_async(dispatch_get_main_queue(), ^{
@@ -89,13 +89,14 @@ RCT_NOT_IMPLEMENTED(-init)
scale:0
resizeMode:UIViewContentModeScaleToFill
progressBlock:nil
- completionBlock:^(NSError *error, id image) {
+ completionBlock:^(NSError *error, UIImage *image) {
_loading = nil;
[self clearImage];
if (error) {
NSLog(@"Image failed to load: %@", error);
} else {
- self.image = image;
+ // we need to copy the image because it seems the image will be altered.
+ self.image = [UIImage imageWithCGImage:image.CGImage];
if(_onload) _onload();
}
}];
diff --git a/ios/RNGLContext.m b/ios/RNGLContext.m
index ab009e87c9a3f928b1d8dc3af2395ba08ecb015e..340124bd6a0189892b07556b08480b2315fb9f91 100644
--- a/ios/RNGLContext.m
+++ b/ios/RNGLContext.m
@@ -1,6 +1,5 @@
#import "RNGLContext.h"
-
#import "RCTConvert.h"
#import "RCTLog.h"
diff --git a/package.json b/package.json
index 0f2511c3bed38254cbbad829b71fdbd0e06ad900..f06f93e25ebbc4e2a8125edd92fbda372efdcd3f 100644
--- a/package.json
+++ b/package.json
@@ -19,8 +19,8 @@
"author": "Project September ",
"license": "MIT",
"peerDependencies": {
- "react-native": ">=0.13.0 <0.16.0",
- "gl-react": ">= 2.0.0"
+ "react-native": ">= 0.16.0",
+ "gl-react": ">= 2.0.2"
},
"dependencies": {
"invariant": "2.2.0"