Przeglądaj źródła

Merge branch 'master' into master

Hau Vo 6 lat temu
rodzic
commit
0684481615
No account linked to committer's email address
56 zmienionych plików z 3588 dodań i 2322 usunięć
  1. 1
    1
      Example/.babelrc
  2. 28
    6
      Example/.flowconfig
  3. 3
    0
      Example/.gitignore
  4. 0
    12
      Example/__tests__/App.js
  5. 2
    2
      Example/android/app/BUCK
  6. 8
    8
      Example/android/app/build.gradle
  7. 0
    53
      Example/android/app/proguard-rules.pro
  8. 2
    8
      Example/android/app/src/main/AndroidManifest.xml
  9. 2
    2
      Example/android/app/src/main/java/com/example573/MainActivity.java
  10. 2
    2
      Example/android/app/src/main/java/com/example573/MainApplication.java
  11. BIN
      Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  12. BIN
      Example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  13. BIN
      Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  14. BIN
      Example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  15. BIN
      Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  16. BIN
      Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  17. BIN
      Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  18. BIN
      Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  19. BIN
      Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  20. BIN
      Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  21. 1
    1
      Example/android/app/src/main/res/values/strings.xml
  22. 16
    1
      Example/android/build.gradle
  23. 0
    2
      Example/android/gradle.properties
  24. BIN
      Example/android/gradle/wrapper/gradle-wrapper.jar
  25. 1
    1
      Example/android/gradle/wrapper/gradle-wrapper.properties
  26. 43
    35
      Example/android/gradlew
  27. 4
    10
      Example/android/gradlew.bat
  28. 1
    1
      Example/android/settings.gradle
  29. 2
    2
      Example/app.json
  30. 5
    2
      Example/index.js
  31. 0
    16
      Example/ios/Example/AppDelegate.h
  32. 0
    0
      Example/ios/example573-tvOS/Info.plist
  33. 0
    0
      Example/ios/example573-tvOSTests/Info.plist
  34. 348
    167
      Example/ios/example573.xcodeproj/project.pbxproj
  35. 19
    19
      Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573-tvOS.xcscheme
  36. 19
    19
      Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573.xcscheme
  37. 14
    0
      Example/ios/example573/AppDelegate.h
  38. 3
    5
      Example/ios/example573/AppDelegate.m
  39. 1
    1
      Example/ios/example573/Base.lproj/LaunchScreen.xib
  40. 0
    0
      Example/ios/example573/Images.xcassets/AppIcon.appiconset/Contents.json
  41. 6
    0
      Example/ios/example573/Images.xcassets/Contents.json
  42. 18
    16
      Example/ios/example573/Info.plist
  43. 2
    4
      Example/ios/example573/main.m
  44. 1
    1
      Example/ios/example573Tests/Info.plist
  45. 4
    6
      Example/ios/example573Tests/example573Tests.m
  46. 26
    22
      Example/package.json
  47. 2741
    1859
      Example/yarn.lock
  48. 1
    1
      RNThumbnail.podspec
  49. 6
    4
      android/build.gradle
  50. BIN
      android/gradle/wrapper/gradle-wrapper.jar
  51. 6
    0
      android/gradle/wrapper/gradle-wrapper.properties
  52. 160
    0
      android/gradlew
  53. 90
    0
      android/gradlew.bat
  54. 0
    25
      ios/RNThumbnail.podspec
  55. 2
    5
      package.json
  56. 0
    3
      yarn.lock

+ 1
- 1
Example/.babelrc Wyświetl plik

@@ -1,3 +1,3 @@
1 1
 {
2
-  "presets": ["react-native"]
2
+  "presets": ["module:metro-react-native-babel-preset"]
3 3
 }

+ 28
- 6
Example/.flowconfig Wyświetl plik

@@ -16,33 +16,55 @@
16 16
 ; Ignore polyfills
17 17
 .*/Libraries/polyfills/.*
18 18
 
19
+; Ignore metro
20
+.*/node_modules/metro/.*
21
+
19 22
 [include]
20 23
 
21 24
 [libs]
22 25
 node_modules/react-native/Libraries/react-native/react-native-interface.js
23 26
 node_modules/react-native/flow/
27
+node_modules/react-native/flow-github/
24 28
 
25 29
 [options]
26 30
 emoji=true
27 31
 
32
+esproposal.optional_chaining=enable
33
+esproposal.nullish_coalescing=enable
34
+
28 35
 module.system=haste
36
+module.system.haste.use_name_reducers=true
37
+# get basename
38
+module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
39
+# strip .js or .js.flow suffix
40
+module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
41
+# strip .ios suffix
42
+module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
43
+module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
44
+module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
45
+module.system.haste.paths.blacklist=.*/__tests__/.*
46
+module.system.haste.paths.blacklist=.*/__mocks__/.*
47
+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
48
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
29 49
 
30 50
 munge_underscores=true
31 51
 
32 52
 module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
33 53
 
54
+module.file_ext=.js
55
+module.file_ext=.jsx
56
+module.file_ext=.json
57
+module.file_ext=.native.js
58
+
34 59
 suppress_type=$FlowIssue
35 60
 suppress_type=$FlowFixMe
36 61
 suppress_type=$FlowFixMeProps
37 62
 suppress_type=$FlowFixMeState
38
-suppress_type=$FixMe
39 63
 
40
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
64
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
42 66
 suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
43 67
 suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
44 68
 
45
-unsafe.enable_getters_and_setters=true
46
-
47 69
 [version]
48
-^0.53.0
70
+^0.78.0

+ 3
- 0
Example/.gitignore Wyświetl plik

@@ -51,3 +51,6 @@ buck-out/
51 51
 */fastlane/report.xml
52 52
 */fastlane/Preview.html
53 53
 */fastlane/screenshots
54
+
55
+# Bundle artifact
56
+*.jsbundle

+ 0
- 12
Example/__tests__/App.js Wyświetl plik

@@ -1,12 +0,0 @@
1
-import 'react-native';
2
-import React from 'react';
3
-import App from '../App';
4
-
5
-// Note: test renderer must be required after react-native.
6
-import renderer from 'react-test-renderer';
7
-
8
-it('renders correctly', () => {
9
-  const tree = renderer.create(
10
-    <App />
11
-  );
12
-});

+ 2
- 2
Example/android/app/BUCK Wyświetl plik

@@ -45,12 +45,12 @@ android_library(
45 45
 
46 46
 android_build_config(
47 47
     name = "build_config",
48
-    package = "com.example",
48
+    package = "com.example573",
49 49
 )
50 50
 
51 51
 android_resource(
52 52
     name = "res",
53
-    package = "com.example",
53
+    package = "com.example573",
54 54
     res = "src/main/res",
55 55
 )
56 56
 

+ 8
- 8
Example/android/app/build.gradle Wyświetl plik

@@ -94,13 +94,13 @@ def enableSeparateBuildPerCPUArchitecture = false
94 94
 def enableProguardInReleaseBuilds = false
95 95
 
96 96
 android {
97
-    compileSdkVersion 23
98
-    buildToolsVersion "23.0.1"
97
+    compileSdkVersion rootProject.ext.compileSdkVersion
98
+    buildToolsVersion rootProject.ext.buildToolsVersion
99 99
 
100 100
     defaultConfig {
101
-        applicationId "com.example"
102
-        minSdkVersion 16
103
-        targetSdkVersion 22
101
+        applicationId "com.example573"
102
+        minSdkVersion rootProject.ext.minSdkVersion
103
+        targetSdkVersion rootProject.ext.targetSdkVersion
104 104
         versionCode 1
105 105
         versionName "1.0"
106 106
         ndk {
@@ -139,9 +139,9 @@ android {
139 139
 dependencies {
140 140
     compile project(':react-native-thumbnail')
141 141
     compile project(':react-native-image-picker')
142
-    compile fileTree(dir: "libs", include: ["*.jar"])
143
-    compile "com.android.support:appcompat-v7:23.0.1"
144
-    compile "com.facebook.react:react-native:+"  // From node_modules
142
+    implementation fileTree(dir: "libs", include: ["*.jar"])
143
+    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
144
+    implementation "com.facebook.react:react-native:+"  // From node_modules
145 145
 }
146 146
 
147 147
 // Run this once to be able to run the application with BUCK

+ 0
- 53
Example/android/app/proguard-rules.pro Wyświetl plik

@@ -15,56 +15,3 @@
15 15
 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 16
 #   public *;
17 17
 #}
18
-
19
-# Disabling obfuscation is useful if you collect stack traces from production crashes
20
-# (unless you are using a system that supports de-obfuscate the stack traces).
21
--dontobfuscate
22
-
23
-# React Native
24
-
25
-# Keep our interfaces so they can be used by other ProGuard rules.
26
-# See http://sourceforge.net/p/proguard/bugs/466/
27
--keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28
--keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29
--keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30
-
31
-# Do not strip any method/class that is annotated with @DoNotStrip
32
--keep @com.facebook.proguard.annotations.DoNotStrip class *
33
--keep @com.facebook.common.internal.DoNotStrip class *
34
--keepclassmembers class * {
35
-    @com.facebook.proguard.annotations.DoNotStrip *;
36
-    @com.facebook.common.internal.DoNotStrip *;
37
-}
38
-
39
--keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40
-  void set*(***);
41
-  *** get*();
42
-}
43
-
44
--keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45
--keep class * extends com.facebook.react.bridge.NativeModule { *; }
46
--keepclassmembers,includedescriptorclasses class * { native <methods>; }
47
--keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }
48
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
50
-
51
--dontwarn com.facebook.react.**
52
-
53
-# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54
-# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55
--dontwarn android.text.StaticLayout
56
-
57
-# okhttp
58
-
59
--keepattributes Signature
60
--keepattributes *Annotation*
61
--keep class okhttp3.** { *; }
62
--keep interface okhttp3.** { *; }
63
--dontwarn okhttp3.**
64
-
65
-# okio
66
-
67
--keep class sun.misc.Unsafe { *; }
68
--dontwarn java.nio.file.*
69
--dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
70
--dontwarn okio.**

+ 2
- 8
Example/android/app/src/main/AndroidManifest.xml Wyświetl plik

@@ -1,20 +1,14 @@
1 1
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="com.example"
3
-    android:versionCode="1"
4
-    android:versionName="1.0">
2
+    package="com.example573">
5 3
 
6 4
     <uses-permission android:name="android.permission.INTERNET" />
7 5
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
8 6
 
9
-    <uses-sdk
10
-        android:minSdkVersion="16"
11
-        android:targetSdkVersion="22" />
12
-
13 7
     <application
14 8
       android:name=".MainApplication"
15
-      android:allowBackup="true"
16 9
       android:label="@string/app_name"
17 10
       android:icon="@mipmap/ic_launcher"
11
+      android:allowBackup="false"
18 12
       android:theme="@style/AppTheme">
19 13
       <activity
20 14
         android:name=".MainActivity"

Example/android/app/src/main/java/com/example/MainActivity.java → Example/android/app/src/main/java/com/example573/MainActivity.java Wyświetl plik

@@ -1,4 +1,4 @@
1
-package com.example;
1
+package com.example573;
2 2
 
3 3
 import com.facebook.react.ReactActivity;
4 4
 
@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
10 10
      */
11 11
     @Override
12 12
     protected String getMainComponentName() {
13
-        return "Example";
13
+        return "example573";
14 14
     }
15 15
 }

Example/android/app/src/main/java/com/example/MainApplication.java → Example/android/app/src/main/java/com/example573/MainApplication.java Wyświetl plik

@@ -1,9 +1,9 @@
1
-package com.example;
1
+package com.example573;
2 2
 
3 3
 import android.app.Application;
4 4
 
5 5
 import com.facebook.react.ReactApplication;
6
-import io.thumbnail.RNThumbnailPackage;
6
+import me.hauvo.thumbnail.RNThumbnailPackage;
7 7
 import com.imagepicker.ImagePickerPackage;
8 8
 import com.facebook.react.ReactNativeHost;
9 9
 import com.facebook.react.ReactPackage;

BIN
Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Wyświetl plik


BIN
Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png Wyświetl plik


+ 1
- 1
Example/android/app/src/main/res/values/strings.xml Wyświetl plik

@@ -1,3 +1,3 @@
1 1
 <resources>
2
-    <string name="app_name">Example</string>
2
+    <string name="app_name">example573</string>
3 3
 </resources>

+ 16
- 1
Example/android/build.gradle Wyświetl plik

@@ -1,11 +1,19 @@
1 1
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 2
 
3 3
 buildscript {
4
+    ext {
5
+        buildToolsVersion = "27.0.3"
6
+        minSdkVersion = 16
7
+        compileSdkVersion = 27
8
+        targetSdkVersion = 26
9
+        supportLibVersion = "27.1.1"
10
+    }
4 11
     repositories {
5 12
         jcenter()
13
+        google()
6 14
     }
7 15
     dependencies {
8
-        classpath 'com.android.tools.build:gradle:2.2.3'
16
+        classpath 'com.android.tools.build:gradle:3.1.4'
9 17
 
10 18
         // NOTE: Do not place your application dependencies here; they belong
11 19
         // in the individual module build.gradle files
@@ -20,5 +28,12 @@ allprojects {
20 28
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 29
             url "$rootDir/../node_modules/react-native/android"
22 30
         }
31
+        google()
23 32
     }
24 33
 }
34
+
35
+
36
+task wrapper(type: Wrapper) {
37
+    gradleVersion = '4.4'
38
+    distributionUrl = distributionUrl.replace("bin", "all")
39
+}

+ 0
- 2
Example/android/gradle.properties Wyświetl plik

@@ -16,5 +16,3 @@
16 16
 # This option should only be used with decoupled projects. More details, visit
17 17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 18
 # org.gradle.parallel=true
19
-
20
-android.useDeprecatedNdk=true

BIN
Example/android/gradle/wrapper/gradle-wrapper.jar Wyświetl plik


+ 1
- 1
Example/android/gradle/wrapper/gradle-wrapper.properties Wyświetl plik

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
2 2
 distributionPath=wrapper/dists
3 3
 zipStoreBase=GRADLE_USER_HOME
4 4
 zipStorePath=wrapper/dists
5
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
5
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

+ 43
- 35
Example/android/gradlew Wyświetl plik

@@ -1,4 +1,4 @@
1
-#!/usr/bin/env bash
1
+#!/usr/bin/env sh
2 2
 
3 3
 ##############################################################################
4 4
 ##
@@ -6,20 +6,38 @@
6 6
 ##
7 7
 ##############################################################################
8 8
 
9
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
-DEFAULT_JVM_OPTS=""
9
+# Attempt to set APP_HOME
10
+# Resolve links: $0 may be a link
11
+PRG="$0"
12
+# Need this for relative symlinks.
13
+while [ -h "$PRG" ] ; do
14
+    ls=`ls -ld "$PRG"`
15
+    link=`expr "$ls" : '.*-> \(.*\)$'`
16
+    if expr "$link" : '/.*' > /dev/null; then
17
+        PRG="$link"
18
+    else
19
+        PRG=`dirname "$PRG"`"/$link"
20
+    fi
21
+done
22
+SAVED="`pwd`"
23
+cd "`dirname \"$PRG\"`/" >/dev/null
24
+APP_HOME="`pwd -P`"
25
+cd "$SAVED" >/dev/null
11 26
 
12 27
 APP_NAME="Gradle"
13 28
 APP_BASE_NAME=`basename "$0"`
14 29
 
30
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
+DEFAULT_JVM_OPTS=""
32
+
15 33
 # Use the maximum available, or set MAX_FD != -1 to use that value.
16 34
 MAX_FD="maximum"
17 35
 
18
-warn ( ) {
36
+warn () {
19 37
     echo "$*"
20 38
 }
21 39
 
22
-die ( ) {
40
+die () {
23 41
     echo
24 42
     echo "$*"
25 43
     echo
@@ -30,6 +48,7 @@ die ( ) {
30 48
 cygwin=false
31 49
 msys=false
32 50
 darwin=false
51
+nonstop=false
33 52
 case "`uname`" in
34 53
   CYGWIN* )
35 54
     cygwin=true
@@ -40,31 +59,11 @@ case "`uname`" in
40 59
   MINGW* )
41 60
     msys=true
42 61
     ;;
62
+  NONSTOP* )
63
+    nonstop=true
64
+    ;;
43 65
 esac
44 66
 
45
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
46
-if $cygwin ; then
47
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48
-fi
49
-
50
-# Attempt to set APP_HOME
51
-# Resolve links: $0 may be a link
52
-PRG="$0"
53
-# Need this for relative symlinks.
54
-while [ -h "$PRG" ] ; do
55
-    ls=`ls -ld "$PRG"`
56
-    link=`expr "$ls" : '.*-> \(.*\)$'`
57
-    if expr "$link" : '/.*' > /dev/null; then
58
-        PRG="$link"
59
-    else
60
-        PRG=`dirname "$PRG"`"/$link"
61
-    fi
62
-done
63
-SAVED="`pwd`"
64
-cd "`dirname \"$PRG\"`/" >&-
65
-APP_HOME="`pwd -P`"
66
-cd "$SAVED" >&-
67
-
68 67
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 68
 
70 69
 # Determine the Java command to use to start the JVM.
@@ -90,7 +89,7 @@ location of your Java installation."
90 89
 fi
91 90
 
92 91
 # Increase the maximum file descriptors if we can.
93
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94 93
     MAX_FD_LIMIT=`ulimit -H -n`
95 94
     if [ $? -eq 0 ] ; then
96 95
         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
114 113
 if $cygwin ; then
115 114
     APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 115
     CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116
+    JAVACMD=`cygpath --unix "$JAVACMD"`
117 117
 
118 118
     # We build the pattern for arguments to be converted via cygpath
119 119
     ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
154 154
     esac
155 155
 fi
156 156
 
157
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158
-function splitJvmOpts() {
159
-    JVM_OPTS=("$@")
157
+# Escape application args
158
+save () {
159
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160
+    echo " "
160 161
 }
161
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162
+APP_ARGS=$(save "$@")
163
+
164
+# Collect all arguments for the java command, following the shell quoting and substitution rules
165
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166
+
167
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169
+  cd "$(dirname "$0")"
170
+fi
163 171
 
164
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172
+exec "$JAVACMD" "$@"

+ 4
- 10
Example/android/gradlew.bat Wyświetl plik

@@ -8,14 +8,14 @@
8 8
 @rem Set local scope for the variables with windows NT shell
9 9
 if "%OS%"=="Windows_NT" setlocal
10 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 11
 set DIRNAME=%~dp0
15 12
 if "%DIRNAME%" == "" set DIRNAME=.
16 13
 set APP_BASE_NAME=%~n0
17 14
 set APP_HOME=%DIRNAME%
18 15
 
16
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17
+set DEFAULT_JVM_OPTS=
18
+
19 19
 @rem Find java.exe
20 20
 if defined JAVA_HOME goto findJavaFromJavaHome
21 21
 
@@ -46,10 +46,9 @@ echo location of your Java installation.
46 46
 goto fail
47 47
 
48 48
 :init
49
-@rem Get command-line arguments, handling Windowz variants
49
+@rem Get command-line arguments, handling Windows variants
50 50
 
51 51
 if not "%OS%" == "Windows_NT" goto win9xME_args
52
-if "%@eval[2+2]" == "4" goto 4NT_args
53 52
 
54 53
 :win9xME_args
55 54
 @rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
60 59
 if "x%~1" == "x" goto execute
61 60
 
62 61
 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 62
 
69 63
 :execute
70 64
 @rem Setup the command line

+ 1
- 1
Example/android/settings.gradle Wyświetl plik

@@ -1,4 +1,4 @@
1
-rootProject.name = 'Example'
1
+rootProject.name = 'example573'
2 2
 include ':react-native-thumbnail'
3 3
 project(':react-native-thumbnail').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thumbnail/android')
4 4
 include ':react-native-image-picker'

+ 2
- 2
Example/app.json Wyświetl plik

@@ -1,4 +1,4 @@
1 1
 {
2
-  "name": "Example",
3
-  "displayName": "Example"
2
+  "name": "example573",
3
+  "displayName": "example573"
4 4
 }

+ 5
- 2
Example/index.js Wyświetl plik

@@ -1,4 +1,7 @@
1
-import { AppRegistry } from 'react-native';
1
+/** @format */
2
+
3
+import {AppRegistry} from 'react-native';
2 4
 import App from './App';
5
+import {name as appName} from './app.json';
3 6
 
4
-AppRegistry.registerComponent('Example', () => App);
7
+AppRegistry.registerComponent(appName, () => App);

+ 0
- 16
Example/ios/Example/AppDelegate.h Wyświetl plik

@@ -1,16 +0,0 @@
1
-/**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- */
9
-
10
-#import <UIKit/UIKit.h>
11
-
12
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
13
-
14
-@property (nonatomic, strong) UIWindow *window;
15
-
16
-@end

Example/ios/Example-tvOS/Info.plist → Example/ios/example573-tvOS/Info.plist Wyświetl plik


Example/ios/Example-tvOSTests/Info.plist → Example/ios/example573-tvOSTests/Info.plist Wyświetl plik


Example/ios/example573.xcodeproj/project.pbxproj
Plik diff jest za duży
Wyświetl plik


Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme → Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573-tvOS.xcscheme Wyświetl plik

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <Scheme
3
-   LastUpgradeVersion = "0820"
3
+   LastUpgradeVersion = "0940"
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"
@@ -29,9 +29,9 @@
29 29
             <BuildableReference
30 30
                BuildableIdentifier = "primary"
31 31
                BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
32
-               BuildableName = "Example-tvOS.app"
33
-               BlueprintName = "Example-tvOS"
34
-               ReferencedContainer = "container:Example.xcodeproj">
32
+               BuildableName = "example573-tvOS.app"
33
+               BlueprintName = "example573-tvOS"
34
+               ReferencedContainer = "container:example573.xcodeproj">
35 35
             </BuildableReference>
36 36
          </BuildActionEntry>
37 37
          <BuildActionEntry
@@ -43,9 +43,9 @@
43 43
             <BuildableReference
44 44
                BuildableIdentifier = "primary"
45 45
                BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
46
-               BuildableName = "Example-tvOSTests.xctest"
47
-               BlueprintName = "Example-tvOSTests"
48
-               ReferencedContainer = "container:Example.xcodeproj">
46
+               BuildableName = "example573-tvOSTests.xctest"
47
+               BlueprintName = "example573-tvOSTests"
48
+               ReferencedContainer = "container:example573.xcodeproj">
49 49
             </BuildableReference>
50 50
          </BuildActionEntry>
51 51
       </BuildActionEntries>
@@ -61,9 +61,9 @@
61 61
             <BuildableReference
62 62
                BuildableIdentifier = "primary"
63 63
                BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
64
-               BuildableName = "Example-tvOSTests.xctest"
65
-               BlueprintName = "Example-tvOSTests"
66
-               ReferencedContainer = "container:Example.xcodeproj">
64
+               BuildableName = "example573-tvOSTests.xctest"
65
+               BlueprintName = "example573-tvOSTests"
66
+               ReferencedContainer = "container:example573.xcodeproj">
67 67
             </BuildableReference>
68 68
          </TestableReference>
69 69
       </Testables>
@@ -71,9 +71,9 @@
71 71
          <BuildableReference
72 72
             BuildableIdentifier = "primary"
73 73
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
-            BuildableName = "Example-tvOS.app"
75
-            BlueprintName = "Example-tvOS"
76
-            ReferencedContainer = "container:Example.xcodeproj">
74
+            BuildableName = "example573-tvOS.app"
75
+            BlueprintName = "example573-tvOS"
76
+            ReferencedContainer = "container:example573.xcodeproj">
77 77
          </BuildableReference>
78 78
       </MacroExpansion>
79 79
       <AdditionalOptions>
@@ -94,9 +94,9 @@
94 94
          <BuildableReference
95 95
             BuildableIdentifier = "primary"
96 96
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
97
-            BuildableName = "Example-tvOS.app"
98
-            BlueprintName = "Example-tvOS"
99
-            ReferencedContainer = "container:Example.xcodeproj">
97
+            BuildableName = "example573-tvOS.app"
98
+            BlueprintName = "example573-tvOS"
99
+            ReferencedContainer = "container:example573.xcodeproj">
100 100
          </BuildableReference>
101 101
       </BuildableProductRunnable>
102 102
       <AdditionalOptions>
@@ -113,9 +113,9 @@
113 113
          <BuildableReference
114 114
             BuildableIdentifier = "primary"
115 115
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
116
-            BuildableName = "Example-tvOS.app"
117
-            BlueprintName = "Example-tvOS"
118
-            ReferencedContainer = "container:Example.xcodeproj">
116
+            BuildableName = "example573-tvOS.app"
117
+            BlueprintName = "example573-tvOS"
118
+            ReferencedContainer = "container:example573.xcodeproj">
119 119
          </BuildableReference>
120 120
       </BuildableProductRunnable>
121 121
    </ProfileAction>

Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme → Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573.xcscheme Wyświetl plik

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <Scheme
3
-   LastUpgradeVersion = "0620"
3
+   LastUpgradeVersion = "0940"
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"
@@ -29,9 +29,9 @@
29 29
             <BuildableReference
30 30
                BuildableIdentifier = "primary"
31 31
                BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
32
-               BuildableName = "Example.app"
33
-               BlueprintName = "Example"
34
-               ReferencedContainer = "container:Example.xcodeproj">
32
+               BuildableName = "example573.app"
33
+               BlueprintName = "example573"
34
+               ReferencedContainer = "container:example573.xcodeproj">
35 35
             </BuildableReference>
36 36
          </BuildActionEntry>
37 37
          <BuildActionEntry
@@ -43,9 +43,9 @@
43 43
             <BuildableReference
44 44
                BuildableIdentifier = "primary"
45 45
                BlueprintIdentifier = "00E356ED1AD99517003FC87E"
46
-               BuildableName = "ExampleTests.xctest"
47
-               BlueprintName = "ExampleTests"
48
-               ReferencedContainer = "container:Example.xcodeproj">
46
+               BuildableName = "example573Tests.xctest"
47
+               BlueprintName = "example573Tests"
48
+               ReferencedContainer = "container:example573.xcodeproj">
49 49
             </BuildableReference>
50 50
          </BuildActionEntry>
51 51
       </BuildActionEntries>
@@ -61,9 +61,9 @@
61 61
             <BuildableReference
62 62
                BuildableIdentifier = "primary"
63 63
                BlueprintIdentifier = "00E356ED1AD99517003FC87E"
64
-               BuildableName = "ExampleTests.xctest"
65
-               BlueprintName = "ExampleTests"
66
-               ReferencedContainer = "container:Example.xcodeproj">
64
+               BuildableName = "example573Tests.xctest"
65
+               BlueprintName = "example573Tests"
66
+               ReferencedContainer = "container:example573.xcodeproj">
67 67
             </BuildableReference>
68 68
          </TestableReference>
69 69
       </Testables>
@@ -71,9 +71,9 @@
71 71
          <BuildableReference
72 72
             BuildableIdentifier = "primary"
73 73
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
74
-            BuildableName = "Example.app"
75
-            BlueprintName = "Example"
76
-            ReferencedContainer = "container:Example.xcodeproj">
74
+            BuildableName = "example573.app"
75
+            BlueprintName = "example573"
76
+            ReferencedContainer = "container:example573.xcodeproj">
77 77
          </BuildableReference>
78 78
       </MacroExpansion>
79 79
       <AdditionalOptions>
@@ -94,9 +94,9 @@
94 94
          <BuildableReference
95 95
             BuildableIdentifier = "primary"
96 96
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
97
-            BuildableName = "Example.app"
98
-            BlueprintName = "Example"
99
-            ReferencedContainer = "container:Example.xcodeproj">
97
+            BuildableName = "example573.app"
98
+            BlueprintName = "example573"
99
+            ReferencedContainer = "container:example573.xcodeproj">
100 100
          </BuildableReference>
101 101
       </BuildableProductRunnable>
102 102
       <AdditionalOptions>
@@ -113,9 +113,9 @@
113 113
          <BuildableReference
114 114
             BuildableIdentifier = "primary"
115 115
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
116
-            BuildableName = "Example.app"
117
-            BlueprintName = "Example"
118
-            ReferencedContainer = "container:Example.xcodeproj">
116
+            BuildableName = "example573.app"
117
+            BlueprintName = "example573"
118
+            ReferencedContainer = "container:example573.xcodeproj">
119 119
          </BuildableReference>
120 120
       </BuildableProductRunnable>
121 121
    </ProfileAction>

+ 14
- 0
Example/ios/example573/AppDelegate.h Wyświetl plik

@@ -0,0 +1,14 @@
1
+/**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+#import <UIKit/UIKit.h>
9
+
10
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
11
+
12
+@property (nonatomic, strong) UIWindow *window;
13
+
14
+@end

Example/ios/Example/AppDelegate.m → Example/ios/example573/AppDelegate.m Wyświetl plik

@@ -1,10 +1,8 @@
1 1
 /**
2 2
  * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4 3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8 6
  */
9 7
 
10 8
 #import "AppDelegate.h"
@@ -21,7 +19,7 @@
21 19
   jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
22 20
 
23 21
   RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24
-                                                      moduleName:@"Example"
22
+                                                      moduleName:@"example573"
25 23
                                                initialProperties:nil
26 24
                                                    launchOptions:launchOptions];
27 25
   rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

Example/ios/Example/Base.lproj/LaunchScreen.xib → Example/ios/example573/Base.lproj/LaunchScreen.xib Wyświetl plik

@@ -18,7 +18,7 @@
18 18
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
19 19
                     <nil key="highlightedColor"/>
20 20
                 </label>
21
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example573" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
22 22
                     <rect key="frame" x="20" y="140" width="441" height="43"/>
23 23
                     <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
24 24
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>

Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json → Example/ios/example573/Images.xcassets/AppIcon.appiconset/Contents.json Wyświetl plik


+ 6
- 0
Example/ios/example573/Images.xcassets/Contents.json Wyświetl plik

@@ -0,0 +1,6 @@
1
+{
2
+  "info" : {
3
+    "version" : 1,
4
+    "author" : "xcode"
5
+  }
6
+}

Example/ios/Example/Info.plist → Example/ios/example573/Info.plist Wyświetl plik

@@ -5,7 +5,7 @@
5 5
 	<key>CFBundleDevelopmentRegion</key>
6 6
 	<string>en</string>
7 7
 	<key>CFBundleDisplayName</key>
8
-	<string>RNThumbnail</string>
8
+	<string>example573</string>
9 9
 	<key>CFBundleExecutable</key>
10 10
 	<string>$(EXECUTABLE_NAME)</string>
11 11
 	<key>CFBundleIdentifier</key>
@@ -24,17 +24,6 @@
24 24
 	<string>1</string>
25 25
 	<key>LSRequiresIPhoneOS</key>
26 26
 	<true/>
27
-	<key>NSAppTransportSecurity</key>
28
-	<dict>
29
-		<key>NSExceptionDomains</key>
30
-		<dict>
31
-			<key>localhost</key>
32
-			<dict>
33
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
34
-				<true/>
35
-			</dict>
36
-		</dict>
37
-	</dict>
38 27
 	<key>NSLocationWhenInUseUsageDescription</key>
39 28
 	<string></string>
40 29
 	<key>UILaunchStoryboardName</key>
@@ -49,11 +38,24 @@
49 38
 		<string>UIInterfaceOrientationLandscapeLeft</string>
50 39
 		<string>UIInterfaceOrientationLandscapeRight</string>
51 40
 	</array>
52
-	<key>NSPhotoLibraryUsageDescription</key>
53
-	<string>For testing only</string>
54
-	<key>NSCameraUsageDescription</key>
55
-	<string>For testing only</string>
56 41
 	<key>UIViewControllerBasedStatusBarAppearance</key>
57 42
 	<false/>
43
+	<key>NSAppTransportSecurity</key>
44
+	<dict>
45
+		<key>NSAllowsArbitraryLoads</key>
46
+		<true/>
47
+		<key>NSExceptionDomains</key>
48
+		<dict>
49
+			<key>localhost</key>
50
+			<dict>
51
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
52
+				<true/>
53
+			</dict>
54
+		</dict>
55
+	</dict>
56
+	<key>NSPhotoLibraryUsageDescription</key>
57
+	<string>Choose photo</string>
58
+	<key>NSCameraUsageDescription</key>
59
+	<string>Take photo</string>
58 60
 </dict>
59 61
 </plist>

Example/ios/Example/main.m → Example/ios/example573/main.m Wyświetl plik

@@ -1,10 +1,8 @@
1 1
 /**
2 2
  * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4 3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8 6
  */
9 7
 
10 8
 #import <UIKit/UIKit.h>

Example/ios/ExampleTests/Info.plist → Example/ios/example573Tests/Info.plist Wyświetl plik

@@ -7,7 +7,7 @@
7 7
 	<key>CFBundleExecutable</key>
8 8
 	<string>$(EXECUTABLE_NAME)</string>
9 9
 	<key>CFBundleIdentifier</key>
10
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
10
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11 11
 	<key>CFBundleInfoDictionaryVersion</key>
12 12
 	<string>6.0</string>
13 13
 	<key>CFBundleName</key>

Example/ios/ExampleTests/ExampleTests.m → Example/ios/example573Tests/example573Tests.m Wyświetl plik

@@ -1,10 +1,8 @@
1 1
 /**
2 2
  * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4 3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8 6
  */
9 7
 
10 8
 #import <UIKit/UIKit.h>
@@ -16,11 +14,11 @@
16 14
 #define TIMEOUT_SECONDS 600
17 15
 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 16
 
19
-@interface ExampleTests : XCTestCase
17
+@interface example573Tests : XCTestCase
20 18
 
21 19
 @end
22 20
 
23
-@implementation ExampleTests
21
+@implementation example573Tests
24 22
 
25 23
 - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 24
 {

+ 26
- 22
Example/package.json Wyświetl plik

@@ -1,24 +1,28 @@
1 1
 {
2
-	"name": "rnthumbnail-example",
3
-	"version": "0.0.1",
4
-	"private": true,
5
-	"scripts": {
6
-		"start": "node node_modules/react-native/local-cli/cli.js start",
7
-		"test": "jest"
8
-	},
9
-	"dependencies": {
10
-		"react": "16.0.0-beta.5",
11
-		"react-native": "0.49.3",
12
-		"react-native-image-picker": "^0.26.7",
13
-		"react-native-thumbnail": "^1.1.0"
14
-	},
15
-	"devDependencies": {
16
-		"babel-jest": "21.2.0",
17
-		"babel-preset-react-native": "4.0.0",
18
-		"jest": "21.2.1",
19
-		"react-test-renderer": "16.0.0-beta.5"
20
-	},
21
-	"jest": {
22
-		"preset": "react-native"
23
-	}
2
+  "name": "example573",
3
+  "version": "0.0.1",
4
+  "private": true,
5
+  "scripts": {
6
+    "start": "node node_modules/react-native/local-cli/cli.js start",
7
+    "test": "jest",
8
+    "ios": "react-native run-ios",
9
+    "android": "react-native run-android",
10
+    "rn-fix-fishhook": "sed -i '' 's#<fishhook/fishhook.h>#\"fishhook.h\"#g' ./node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m",
11
+    "rn-fix-glog": "cd node_modules/react-native/third-party/glog-0.3.4 && ../../scripts/ios-configure-glog.sh && cd ../../../../"
12
+  },
13
+  "dependencies": {
14
+    "react": "16.6.0-alpha.8af6728",
15
+    "react-native": "0.57.3",
16
+    "react-native-image-picker": "^0.27.1",
17
+    "react-native-thumbnail": "^1.1.2"
18
+  },
19
+  "devDependencies": {
20
+    "babel-jest": "23.6.0",
21
+    "jest": "23.6.0",
22
+    "metro-react-native-babel-preset": "0.48.1",
23
+    "react-test-renderer": "16.6.0-alpha.8af6728"
24
+  },
25
+  "jest": {
26
+    "preset": "react-native"
27
+  }
24 28
 }

+ 2741
- 1859
Example/yarn.lock
Plik diff jest za duży
Wyświetl plik


+ 1
- 1
RNThumbnail.podspec Wyświetl plik

@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16 16
   s.platform       = :ios, '7.0'
17 17
 
18 18
   s.preserve_paths = 'README.md', 'package.json', 'index.js'
19
-  s.source_files   = 'iOS/*.{h,m}'
19
+  s.source_files   = 'ios/**/*.{h,m}'
20 20
 
21 21
   s.dependency 'React'
22 22
 end

+ 6
- 4
android/build.gradle Wyświetl plik

@@ -2,22 +2,23 @@
2 2
 buildscript {
3 3
     repositories {
4 4
         jcenter()
5
+        google()
5 6
     }
6 7
 
7 8
     dependencies {
8
-        classpath 'com.android.tools.build:gradle:1.3.1'
9
+        classpath 'com.android.tools.build:gradle:3.0.1'
9 10
     }
10 11
 }
11 12
 
12 13
 apply plugin: 'com.android.library'
13 14
 
14 15
 android {
15
-    compileSdkVersion 23
16
-    buildToolsVersion "23.0.1"
16
+    compileSdkVersion 26
17
+    buildToolsVersion "26.0.1"
17 18
 
18 19
     defaultConfig {
19 20
         minSdkVersion 16
20
-        targetSdkVersion 22
21
+        targetSdkVersion 26
21 22
         versionCode 1
22 23
         versionName "1.0"
23 24
     }
@@ -28,6 +29,7 @@ android {
28 29
 
29 30
 repositories {
30 31
     mavenCentral()
32
+    google()
31 33
 }
32 34
 
33 35
 dependencies {

BIN
android/gradle/wrapper/gradle-wrapper.jar Wyświetl plik


+ 6
- 0
android/gradle/wrapper/gradle-wrapper.properties Wyświetl plik

@@ -0,0 +1,6 @@
1
+#Sun Oct 14 16:44:27 ICT 2018
2
+distributionBase=GRADLE_USER_HOME
3
+distributionPath=wrapper/dists
4
+zipStoreBase=GRADLE_USER_HOME
5
+zipStorePath=wrapper/dists
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

+ 160
- 0
android/gradlew Wyświetl plik

@@ -0,0 +1,160 @@
1
+#!/usr/bin/env bash
2
+
3
+##############################################################################
4
+##
5
+##  Gradle start up script for UN*X
6
+##
7
+##############################################################################
8
+
9
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
+DEFAULT_JVM_OPTS=""
11
+
12
+APP_NAME="Gradle"
13
+APP_BASE_NAME=`basename "$0"`
14
+
15
+# Use the maximum available, or set MAX_FD != -1 to use that value.
16
+MAX_FD="maximum"
17
+
18
+warn ( ) {
19
+    echo "$*"
20
+}
21
+
22
+die ( ) {
23
+    echo
24
+    echo "$*"
25
+    echo
26
+    exit 1
27
+}
28
+
29
+# OS specific support (must be 'true' or 'false').
30
+cygwin=false
31
+msys=false
32
+darwin=false
33
+case "`uname`" in
34
+  CYGWIN* )
35
+    cygwin=true
36
+    ;;
37
+  Darwin* )
38
+    darwin=true
39
+    ;;
40
+  MINGW* )
41
+    msys=true
42
+    ;;
43
+esac
44
+
45
+# Attempt to set APP_HOME
46
+# Resolve links: $0 may be a link
47
+PRG="$0"
48
+# Need this for relative symlinks.
49
+while [ -h "$PRG" ] ; do
50
+    ls=`ls -ld "$PRG"`
51
+    link=`expr "$ls" : '.*-> \(.*\)$'`
52
+    if expr "$link" : '/.*' > /dev/null; then
53
+        PRG="$link"
54
+    else
55
+        PRG=`dirname "$PRG"`"/$link"
56
+    fi
57
+done
58
+SAVED="`pwd`"
59
+cd "`dirname \"$PRG\"`/" >/dev/null
60
+APP_HOME="`pwd -P`"
61
+cd "$SAVED" >/dev/null
62
+
63
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64
+
65
+# Determine the Java command to use to start the JVM.
66
+if [ -n "$JAVA_HOME" ] ; then
67
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68
+        # IBM's JDK on AIX uses strange locations for the executables
69
+        JAVACMD="$JAVA_HOME/jre/sh/java"
70
+    else
71
+        JAVACMD="$JAVA_HOME/bin/java"
72
+    fi
73
+    if [ ! -x "$JAVACMD" ] ; then
74
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75
+
76
+Please set the JAVA_HOME variable in your environment to match the
77
+location of your Java installation."
78
+    fi
79
+else
80
+    JAVACMD="java"
81
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82
+
83
+Please set the JAVA_HOME variable in your environment to match the
84
+location of your Java installation."
85
+fi
86
+
87
+# Increase the maximum file descriptors if we can.
88
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89
+    MAX_FD_LIMIT=`ulimit -H -n`
90
+    if [ $? -eq 0 ] ; then
91
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92
+            MAX_FD="$MAX_FD_LIMIT"
93
+        fi
94
+        ulimit -n $MAX_FD
95
+        if [ $? -ne 0 ] ; then
96
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
97
+        fi
98
+    else
99
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100
+    fi
101
+fi
102
+
103
+# For Darwin, add options to specify how the application appears in the dock
104
+if $darwin; then
105
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106
+fi
107
+
108
+# For Cygwin, switch paths to Windows format before running java
109
+if $cygwin ; then
110
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112
+    JAVACMD=`cygpath --unix "$JAVACMD"`
113
+
114
+    # We build the pattern for arguments to be converted via cygpath
115
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116
+    SEP=""
117
+    for dir in $ROOTDIRSRAW ; do
118
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
119
+        SEP="|"
120
+    done
121
+    OURCYGPATTERN="(^($ROOTDIRS))"
122
+    # Add a user-defined pattern to the cygpath arguments
123
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125
+    fi
126
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
127
+    i=0
128
+    for arg in "$@" ; do
129
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
131
+
132
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
133
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134
+        else
135
+            eval `echo args$i`="\"$arg\""
136
+        fi
137
+        i=$((i+1))
138
+    done
139
+    case $i in
140
+        (0) set -- ;;
141
+        (1) set -- "$args0" ;;
142
+        (2) set -- "$args0" "$args1" ;;
143
+        (3) set -- "$args0" "$args1" "$args2" ;;
144
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150
+    esac
151
+fi
152
+
153
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154
+function splitJvmOpts() {
155
+    JVM_OPTS=("$@")
156
+}
157
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159
+
160
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 90
- 0
android/gradlew.bat Wyświetl plik

@@ -0,0 +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

+ 0
- 25
ios/RNThumbnail.podspec Wyświetl plik

@@ -1,25 +0,0 @@
1
-
2
-Pod::Spec.new do |s|
3
-  s.name         = "RNThumbnail"
4
-  s.version      = "1.0.0"
5
-  s.summary      = "RNThumbnail"
6
-  s.description  = <<-DESC
7
-                  RNThumbnail
8
-                   DESC
9
-  s.homepage     = ""
10
-  s.license      = "MIT"
11
-  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }
12
-  s.author             = { "author" => "author@domain.cn" }
13
-  s.homepage     = "https://github.com/author/RNThumbnail"
14
-  s.platform     = :ios, "7.0"
15
-  s.source       = { :git => "https://github.com/author/RNThumbnail.git", :tag => "master" }
16
-  s.source_files  = "RNThumbnail/**/*.{h,m}"
17
-  s.requires_arc = true
18
-
19
-
20
-  s.dependency "React"
21
-  #s.dependency "others"
22
-
23
-end
24
-
25
-  

+ 2
- 5
package.json Wyświetl plik

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-thumbnail",
3
-  "version": "1.1.1",
3
+  "version": "1.1.3",
4 4
   "description": "Get thumbnail from local media.",
5 5
   "main": "index.js",
6 6
   "scripts": {
@@ -14,8 +14,5 @@
14 14
     "url": "git+https://github.com/phuochau/react-native-thumbnail.git"
15 15
   },
16 16
   "author": "Hau Vo <hau.vophuoc@gmail.com>",
17
-  "license": "MIT",
18
-  "peerDependencies": {
19
-    "react-native": "^0.47.0"
20
-  }
17
+  "license": "MIT"
21 18
 }

+ 0
- 3
yarn.lock Wyświetl plik

@@ -2,6 +2,3 @@
2 2
 # yarn lockfile v1
3 3
 
4 4
 
5
-react-native-thumbnail@^1.1.0:
6
-  version "1.1.0"
7
-  resolved "https://registry.yarnpkg.com/react-native-thumbnail/-/react-native-thumbnail-1.1.0.tgz#d3fc34e642340541117ffdae887514450e4b4552"