Skip to content

Commit d0dcfbd

Browse files
committed
refactor(module): minor fixes and refactoring
1 parent 823d60f commit d0dcfbd

File tree

19 files changed

+1611
-606
lines changed

19 files changed

+1611
-606
lines changed

README.md

Lines changed: 160 additions & 89 deletions
Large diffs are not rendered by default.

example/.flowconfig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ emoji=true
2626

2727
module.system=haste
2828

29-
experimental.strict_type_args=true
30-
3129
munge_underscores=true
3230

3331
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'
@@ -36,12 +34,12 @@ suppress_type=$FlowIssue
3634
suppress_type=$FlowFixMe
3735
suppress_type=$FixMe
3836

39-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
37+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
4139
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4240
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4341

4442
unsafe.enable_getters_and_setters=true
4543

4644
[version]
47-
^0.42.0
45+
^0.49.1

example/android/app/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ import com.android.build.OutputFile
3333
* // bundleInPaidRelease: true,
3434
* // bundleInBeta: true,
3535
*
36+
* // whether to disable dev mode in custom build variants (by default only disabled in release)
37+
* // for example: to disable dev mode in the staging build type (if configured)
38+
* devDisabledInStaging: true,
39+
* // The configuration property can be in the following formats
40+
* // 'devDisabledIn${productFlavor}${buildType}'
41+
* // 'devDisabledIn${buildType}'
42+
*
3643
* // the root of your project, i.e. where "package.json" lives
3744
* root: "../../",
3845
*
@@ -126,6 +133,7 @@ android {
126133
}
127134

128135
dependencies {
136+
compile project(':react-native-linear-gradient')
129137
compile fileTree(dir: "libs", include: ["*.jar"])
130138
compile "com.android.support:appcompat-v7:23.0.1"
131139
compile "com.facebook.react:react-native:+" // From node_modules
@@ -136,4 +144,4 @@ dependencies {
136144
task copyDownloadableDepsToLibs(type: Copy) {
137145
from configurations.compile
138146
into 'libs'
139-
}
147+
}

example/android/app/src/main/java/com/example/MainApplication.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import com.BV.LinearGradient.LinearGradientPackage;
67
import com.facebook.react.ReactNativeHost;
78
import com.facebook.react.ReactPackage;
89
import com.facebook.react.shell.MainReactPackage;
@@ -22,7 +23,8 @@ public boolean getUseDeveloperSupport() {
2223
@Override
2324
protected List<ReactPackage> getPackages() {
2425
return Arrays.<ReactPackage>asList(
25-
new MainReactPackage()
26+
new MainReactPackage(),
27+
new LinearGradientPackage()
2628
);
2729
}
2830
};

example/android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
rootProject.name = 'example'
2+
include ':react-native-linear-gradient'
3+
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
24

35
include ':app'

0 commit comments

Comments
 (0)