Browse Source

Upgraded to React Native 0.56

master
Henning Hall 7 years ago
parent
commit
b8617ce2c6
26 changed files with 697 additions and 755 deletions
  1. +4
    -4
      android/build.gradle
  2. +14
    -1
      example/.flowconfig
  3. +6
    -6
      example/android/app/build.gradle
  4. +0
    -53
      example/android/app/proguard-rules.pro
  5. BIN
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  6. BIN
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  7. BIN
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  8. BIN
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  9. BIN
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  10. BIN
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  11. BIN
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  12. BIN
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  13. BIN
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  14. BIN
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  15. +17
    -1
      example/android/build.gradle
  16. +1
    -1
      example/android/gradle/wrapper/gradle-wrapper.properties
  17. +4
    -4
      example/ios/DatePickerExample.xcodeproj/project.pbxproj
  18. +4
    -5
      example/package.json
  19. +1
    -6
      example/src/App.js
  20. +1
    -3
      example/src/PropSlider.js
  21. +5
    -6
      example/src/examples/Advanced.js
  22. +1
    -4
      example/src/propPickers/FadeToColor.js
  23. +0
    -2
      example/src/propPickers/LocalePicker.js
  24. +0
    -3
      example/src/propPickers/ModePicker.js
  25. +1
    -4
      example/src/propPickers/TextColor.js
  26. +638
    -652
      example/yarn.lock

+ 4
- 4
android/build.gradle View File

@ -1,12 +1,12 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 23
buildToolsVersion '27.0.3'
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig { defaultConfig {
minSdkVersion 16
targetSdkVersion 23
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"

+ 14
- 1
example/.flowconfig View File

@ -30,6 +30,19 @@ node_modules/react-native/flow-github/
emoji=true emoji=true
module.system=haste module.system=haste
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
munge_underscores=true munge_underscores=true
@ -51,4 +64,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[version] [version]
^0.67.0
^0.75.0

+ 6
- 6
example/android/app/build.gradle View File

@ -94,13 +94,13 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false def enableProguardInReleaseBuilds = false
android { android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig { defaultConfig {
applicationId "com.datepickerexample" applicationId "com.datepickerexample"
minSdkVersion 16
targetSdkVersion 22
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
ndk { ndk {
@ -140,8 +140,8 @@ dependencies {
compile project(':react-native-date-picker-x') compile project(':react-native-date-picker-x')
compile project(':react-native-device-info') compile project(':react-native-device-info')
compile fileTree(dir: "libs", include: ["*.jar"]) compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile ("com.facebook.react:react-native:0.55.2") { force = true }
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
compile "com.facebook.react:react-native:+" // From node_modules
} }
// Run this once to be able to run the application with BUCK // Run this once to be able to run the application with BUCK

+ 0
- 53
example/android/app/proguard-rules.pro View File

@ -15,56 +15,3 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *; # public *;
#} #}
# Disabling obfuscation is useful if you collect stack traces from production crashes
# (unless you are using a system that supports de-obfuscate the stack traces).
-dontobfuscate
# React Native
# Keep our interfaces so they can be used by other ProGuard rules.
# See http://sourceforge.net/p/proguard/bugs/466/
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.proguard.annotations.DoNotStrip *;
@com.facebook.common.internal.DoNotStrip *;
}
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
void set*(***);
*** get*();
}
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
-dontwarn com.facebook.react.**
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
-dontwarn android.text.StaticLayout
# okhttp
-keepattributes Signature
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
# okio
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**

BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png View File

Before After
Width: 72  |  Height: 72  |  Size: 3.3 KiB Width: 72  |  Height: 72  |  Size: 3.0 KiB

BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png View File

Before After
Width: 72  |  Height: 72  |  Size: 4.9 KiB

BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png View File

Before After
Width: 48  |  Height: 48  |  Size: 2.2 KiB Width: 48  |  Height: 48  |  Size: 2.0 KiB

BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png View File

Before After
Width: 48  |  Height: 48  |  Size: 2.8 KiB

BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png View File

Before After
Width: 96  |  Height: 96  |  Size: 4.7 KiB Width: 96  |  Height: 96  |  Size: 4.5 KiB

BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png View File

Before After
Width: 96  |  Height: 96  |  Size: 6.9 KiB

BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png View File

Before After
Width: 144  |  Height: 144  |  Size: 7.5 KiB Width: 144  |  Height: 144  |  Size: 6.3 KiB

BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png View File

Before After
Width: 144  |  Height: 144  |  Size: 10 KiB

BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png View File

Before After
Width: 192  |  Height: 192  |  Size: 9.0 KiB

BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png View File

Before After
Width: 192  |  Height: 192  |  Size: 15 KiB

+ 17
- 1
example/android/build.gradle View File

@ -3,9 +3,13 @@
buildscript { buildscript {
repositories { repositories {
jcenter() jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@ -22,5 +26,17 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android" url "$rootDir/../node_modules/react-native/android"
} }
maven {
url 'https://maven.google.com/'
name 'Google'
}
} }
} }
ext {
buildToolsVersion = "26.0.3"
minSdkVersion = 16
compileSdkVersion = 26
targetSdkVersion = 26
supportLibVersion = "26.1.0"
}

+ 1
- 1
example/android/gradle/wrapper/gradle-wrapper.properties View File

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

+ 4
- 4
example/ios/DatePickerExample.xcodeproj/project.pbxproj View File

@ -1184,7 +1184,7 @@
"$(SRCROOT)/../node_modules/react-native-date-picker-x/ios/DatePickerX", "$(SRCROOT)/../node_modules/react-native-date-picker-x/ios/DatePickerX",
); );
INFOPLIST_FILE = DatePickerExampleTests/Info.plist; INFOPLIST_FILE = DatePickerExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@ -1221,7 +1221,7 @@
"$(SRCROOT)/../node_modules/react-native-date-picker-x/ios/DatePickerX", "$(SRCROOT)/../node_modules/react-native-date-picker-x/ios/DatePickerX",
); );
INFOPLIST_FILE = DatePickerExampleTests/Info.plist; INFOPLIST_FILE = DatePickerExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@ -1330,7 +1330,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -1365,7 +1365,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;

+ 4
- 5
example/package.json View File

@ -8,15 +8,14 @@
}, },
"dependencies": { "dependencies": {
"moment": "^2.22.1", "moment": "^2.22.1",
"react": "16.3.1",
"react-native": "0.55.2",
"react": "16.4.1",
"react-native": "0.56.0",
"react-native-date-picker-x": "^1.4.1", "react-native-date-picker-x": "^1.4.1",
"react-native-device-info": "^0.22.5",
"react-native-search-filter": "^0.1.3"
"react-native-device-info": "^0.22.5"
}, },
"devDependencies": { "devDependencies": {
"babel-jest": "22.4.3", "babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"babel-preset-react-native": "5",
"jest": "22.4.3", "jest": "22.4.3",
"react-test-renderer": "16.3.1" "react-test-renderer": "16.3.1"
}, },

+ 1
- 6
example/src/App.js View File

@ -1,11 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Button, View, StyleSheet, ScrollView, Text, TouchableOpacity, TouchableHighlight } from 'react-native';
import SearchInput, { createFilter } from 'react-native-search-filter';
import DeviceInfo from 'react-native-device-info';
import DatePicker from 'react-native-date-picker-x';
import locales from './locales';
import { ScrollView, StyleSheet, Text, TouchableOpacity } from 'react-native';
import examples from './examples'; import examples from './examples';
import Advanced from './examples/Advanced';
export default class App extends Component { export default class App extends Component {

+ 1
- 3
example/src/PropSlider.js View File

@ -1,7 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { FlatList, Dimensions, Button, View, StyleSheet, ScrollView, Text, TouchableOpacity } from 'react-native';
import SearchInput, { createFilter } from 'react-native-search-filter';
import DatePicker from 'react-native-date-picker-x';
import { Dimensions, FlatList, StyleSheet, Text, TouchableOpacity } from 'react-native';
const { width, height } = Dimensions.get('screen') const { width, height } = Dimensions.get('screen')

+ 5
- 6
example/src/examples/Advanced.js View File

@ -1,14 +1,13 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Dimensions, Button, View, StyleSheet, ScrollView, Text, TouchableOpacity } from 'react-native';
import SearchInput, { createFilter } from 'react-native-search-filter';
import { StyleSheet, Text, View } from 'react-native';
import DatePicker from 'react-native-date-picker-x'; import DatePicker from 'react-native-date-picker-x';
import PropSlider from '../PropSlider';
import LocalePicker from '../propPickers/LocalePicker';
import ModePicker from '../propPickers/ModePicker';
import DeviceInfo from 'react-native-device-info';
import DateChange from '../propPickers/DateChange'; import DateChange from '../propPickers/DateChange';
import FadeToColor from '../propPickers/FadeToColor'; import FadeToColor from '../propPickers/FadeToColor';
import LocalePicker from '../propPickers/LocalePicker';
import ModePicker from '../propPickers/ModePicker';
import TextColor from '../propPickers/TextColor'; import TextColor from '../propPickers/TextColor';
import DeviceInfo from 'react-native-device-info';
import PropSlider from '../PropSlider';
Date.prototype.addHours = function (h) { Date.prototype.addHours = function (h) {
this.setTime(this.getTime() + (h * 60 * 60 * 1000)); this.setTime(this.getTime() + (h * 60 * 60 * 1000));

+ 1
- 4
example/src/propPickers/FadeToColor.js View File

@ -1,8 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Dimensions, Button, View, StyleSheet, ScrollView, Text, TouchableOpacity } from 'react-native';
import SearchInput, { createFilter } from 'react-native-search-filter';
import locales from '../locales';
import PropSlider from '../PropSlider';
import { Button } from 'react-native';
export default class extends Component { export default class extends Component {

+ 0
- 2
example/src/propPickers/LocalePicker.js View File

@ -1,6 +1,4 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Dimensions, Button, View, StyleSheet, ScrollView, Text, TouchableOpacity } from 'react-native';
import SearchInput, { createFilter } from 'react-native-search-filter';
import locales from '../locales'; import locales from '../locales';
import PropSlider from '../PropSlider'; import PropSlider from '../PropSlider';

+ 0
- 3
example/src/propPickers/ModePicker.js View File

@ -1,7 +1,4 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Dimensions, Button, View, StyleSheet, ScrollView, Text, TouchableOpacity } from 'react-native';
import SearchInput, { createFilter } from 'react-native-search-filter';
import locales from '../locales';
import PropSlider from '../PropSlider'; import PropSlider from '../PropSlider';
const data = [ const data = [

+ 1
- 4
example/src/propPickers/TextColor.js View File

@ -1,8 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Dimensions, Button, View, StyleSheet, ScrollView, Text, TouchableOpacity } from 'react-native';
import SearchInput, { createFilter } from 'react-native-search-filter';
import locales from '../locales';
import PropSlider from '../PropSlider';
import { Button } from 'react-native';
export default class extends Component { export default class extends Component {

+ 638
- 652
example/yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save