Skip to content

Commit ed3ad06

Browse files
committed
updated example
1 parent c1048ee commit ed3ad06

File tree

15 files changed

+1586
-10374
lines changed

15 files changed

+1586
-10374
lines changed

TextGradientExample/.buckconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

TextGradientExample/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ src/bin/
77
.gradle/
88
compile_commands.json
99
rn-cli.config.js
10-
*.apk
10+
*.apk

TextGradientExample/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM iyegoroff/fable-android:1
1+
FROM iyegoroff/ubuntu-node-android-git:1
22

33
RUN mkdir /package
44
COPY . /package

TextGradientExample/android/build.gradle

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ buildscript {
88
targetSdkVersion = 28
99
supportLibVersion = "28.0.0"
1010
}
11-
1211
repositories {
13-
jcenter()
1412
google()
15-
maven {
16-
url "https://jitpack.io"
17-
}
13+
jcenter()
1814
}
1915
dependencies {
20-
classpath 'com.android.tools.build:gradle:3.3.0'
16+
classpath("com.android.tools.build:gradle:3.4.0")
2117

2218
// NOTE: Do not place your application dependencies here; they belong
2319
// in the individual module build.gradle files
@@ -27,28 +23,11 @@ buildscript {
2723
allprojects {
2824
repositories {
2925
mavenLocal()
26+
google()
3027
jcenter()
3128
maven {
3229
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
3330
url "$rootDir/../node_modules/react-native/android"
3431
}
35-
google()
36-
}
37-
}
38-
39-
40-
task wrapper(type: Wrapper) {
41-
gradleVersion = '4.4'
42-
distributionUrl = distributionUrl.replace("bin", "all")
43-
}
44-
45-
subprojects {
46-
afterEvaluate {project ->
47-
if (project.hasProperty("android")) {
48-
android {
49-
compileSdkVersion rootProject.ext.compileSdkVersion
50-
buildToolsVersion rootProject.ext.buildToolsVersion
51-
}
52-
}
5332
}
5433
}
1.26 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
34
zipStoreBase=GRADLE_USER_HOME
45
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

TextGradientExample/android/gradlew

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# 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=""
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"

TextGradientExample/android/gradlew.bat

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@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=
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

TextGradientExample/ios/TextGradientExample.xcodeproj/project.pbxproj

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2222
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2323
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
24-
215547CC9F9D4C39AEAFC908 /* libRNTextGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C5A6B401895540128FC141C3 /* libRNTextGradient.a */; };
2524
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
2625
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
2726
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
27+
FD19762A79274F90A6E0120D /* libRNTextGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AD10EFADD087469DA4175C92 /* libRNTextGradient.a */; };
2828
/* End PBXBuildFile section */
2929

3030
/* Begin PBXContainerItemProxy section */
@@ -238,37 +238,37 @@
238238
remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
239239
remoteInfo = "RCTAnimation-tvOS";
240240
};
241-
74051F2622715C2400D63DF9 /* PBXContainerItemProxy */ = {
241+
7491267622CC050B00A81C37 /* PBXContainerItemProxy */ = {
242242
isa = PBXContainerItemProxy;
243243
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
244244
proxyType = 2;
245245
remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8;
246246
remoteInfo = jsi;
247247
};
248-
74051F2822715C2400D63DF9 /* PBXContainerItemProxy */ = {
248+
7491267822CC050B00A81C37 /* PBXContainerItemProxy */ = {
249249
isa = PBXContainerItemProxy;
250250
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
251251
proxyType = 2;
252252
remoteGlobalIDString = EDEBC73B214B45A300DD5AC8;
253253
remoteInfo = jsiexecutor;
254254
};
255-
74051F2A22715C2400D63DF9 /* PBXContainerItemProxy */ = {
255+
7491267A22CC050B00A81C37 /* PBXContainerItemProxy */ = {
256256
isa = PBXContainerItemProxy;
257257
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
258258
proxyType = 2;
259259
remoteGlobalIDString = ED296FB6214C9A0900B7C4FE;
260260
remoteInfo = "jsi-tvOS";
261261
};
262-
74051F2C22715C2400D63DF9 /* PBXContainerItemProxy */ = {
262+
7491267C22CC050B00A81C37 /* PBXContainerItemProxy */ = {
263263
isa = PBXContainerItemProxy;
264264
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
265265
proxyType = 2;
266266
remoteGlobalIDString = ED296FEE214C9CF800B7C4FE;
267267
remoteInfo = "jsiexecutor-tvOS";
268268
};
269-
74051F3122715C2600D63DF9 /* PBXContainerItemProxy */ = {
269+
7491268122CC050C00A81C37 /* PBXContainerItemProxy */ = {
270270
isa = PBXContainerItemProxy;
271-
containerPortal = B101FB8CE7734E418906358E /* RNTextGradient.xcodeproj */;
271+
containerPortal = 9047C94DE81B4B118317963C /* RNTextGradient.xcodeproj */;
272272
proxyType = 2;
273273
remoteGlobalIDString = 134814201AA4EA6300B7C361;
274274
remoteInfo = RNTextGradient;
@@ -317,9 +317,9 @@
317317
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
318318
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
319319
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
320+
9047C94DE81B4B118317963C /* RNTextGradient.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNTextGradient.xcodeproj; path = "../node_modules/react-native-text-gradient/ios/RNTextGradient.xcodeproj"; sourceTree = "<group>"; };
321+
AD10EFADD087469DA4175C92 /* libRNTextGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNTextGradient.a; sourceTree = "<group>"; };
320322
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
321-
B101FB8CE7734E418906358E /* RNTextGradient.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNTextGradient.xcodeproj; path = "../node_modules/react-native-text-gradient/ios/RNTextGradient.xcodeproj"; sourceTree = "<group>"; };
322-
C5A6B401895540128FC141C3 /* libRNTextGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNTextGradient.a; sourceTree = "<group>"; };
323323
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
324324
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
325325
/* End PBXFileReference section */
@@ -342,7 +342,7 @@
342342
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
343343
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
344344
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
345-
215547CC9F9D4C39AEAFC908 /* libRNTextGradient.a in Frameworks */,
345+
FD19762A79274F90A6E0120D /* libRNTextGradient.a in Frameworks */,
346346
);
347347
runOnlyForDeploymentPostprocessing = 0;
348348
};
@@ -440,10 +440,10 @@
440440
2DF0FFE52056DD460020B375 /* libthird-party.a */,
441441
2DF0FFE72056DD460020B375 /* libdouble-conversion.a */,
442442
2DF0FFE92056DD460020B375 /* libdouble-conversion.a */,
443-
74051F2722715C2400D63DF9 /* libjsi.a */,
444-
74051F2922715C2400D63DF9 /* libjsiexecutor.a */,
445-
74051F2B22715C2400D63DF9 /* libjsi-tvOS.a */,
446-
74051F2D22715C2400D63DF9 /* libjsiexecutor-tvOS.a */,
443+
7491267722CC050B00A81C37 /* libjsi.a */,
444+
7491267922CC050B00A81C37 /* libjsiexecutor.a */,
445+
7491267B22CC050B00A81C37 /* libjsi-tvOS.a */,
446+
7491267D22CC050B00A81C37 /* libjsiexecutor-tvOS.a */,
447447
);
448448
name = Products;
449449
sourceTree = "<group>";
@@ -467,18 +467,18 @@
467467
name = Products;
468468
sourceTree = "<group>";
469469
};
470-
74051F0022715C0C00D63DF9 /* Recovered References */ = {
470+
7491265022CC04FD00A81C37 /* Recovered References */ = {
471471
isa = PBXGroup;
472472
children = (
473-
C5A6B401895540128FC141C3 /* libRNTextGradient.a */,
473+
AD10EFADD087469DA4175C92 /* libRNTextGradient.a */,
474474
);
475475
name = "Recovered References";
476476
sourceTree = "<group>";
477477
};
478-
74051F2E22715C2400D63DF9 /* Products */ = {
478+
7491267E22CC050B00A81C37 /* Products */ = {
479479
isa = PBXGroup;
480480
children = (
481-
74051F3222715C2600D63DF9 /* libRNTextGradient.a */,
481+
7491268222CC050C00A81C37 /* libRNTextGradient.a */,
482482
);
483483
name = Products;
484484
sourceTree = "<group>";
@@ -507,7 +507,7 @@
507507
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
508508
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
509509
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
510-
B101FB8CE7734E418906358E /* RNTextGradient.xcodeproj */,
510+
9047C94DE81B4B118317963C /* RNTextGradient.xcodeproj */,
511511
);
512512
name = Libraries;
513513
sourceTree = "<group>";
@@ -528,7 +528,7 @@
528528
832341AE1AAA6A7D00B99B32 /* Libraries */,
529529
83CBBA001A601CBA00E9B192 /* Products */,
530530
2D16E6871FA4F8E400B85C8A /* Frameworks */,
531-
74051F0022715C0C00D63DF9 /* Recovered References */,
531+
7491265022CC04FD00A81C37 /* Recovered References */,
532532
);
533533
indentWidth = 2;
534534
sourceTree = "<group>";
@@ -648,8 +648,8 @@
648648
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
649649
},
650650
{
651-
ProductGroup = 74051F2E22715C2400D63DF9 /* Products */;
652-
ProjectRef = B101FB8CE7734E418906358E /* RNTextGradient.xcodeproj */;
651+
ProductGroup = 7491267E22CC050B00A81C37 /* Products */;
652+
ProjectRef = 9047C94DE81B4B118317963C /* RNTextGradient.xcodeproj */;
653653
},
654654
);
655655
projectRoot = "";
@@ -870,39 +870,39 @@
870870
remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
871871
sourceTree = BUILT_PRODUCTS_DIR;
872872
};
873-
74051F2722715C2400D63DF9 /* libjsi.a */ = {
873+
7491267722CC050B00A81C37 /* libjsi.a */ = {
874874
isa = PBXReferenceProxy;
875875
fileType = archive.ar;
876876
path = libjsi.a;
877-
remoteRef = 74051F2622715C2400D63DF9 /* PBXContainerItemProxy */;
877+
remoteRef = 7491267622CC050B00A81C37 /* PBXContainerItemProxy */;
878878
sourceTree = BUILT_PRODUCTS_DIR;
879879
};
880-
74051F2922715C2400D63DF9 /* libjsiexecutor.a */ = {
880+
7491267922CC050B00A81C37 /* libjsiexecutor.a */ = {
881881
isa = PBXReferenceProxy;
882882
fileType = archive.ar;
883883
path = libjsiexecutor.a;
884-
remoteRef = 74051F2822715C2400D63DF9 /* PBXContainerItemProxy */;
884+
remoteRef = 7491267822CC050B00A81C37 /* PBXContainerItemProxy */;
885885
sourceTree = BUILT_PRODUCTS_DIR;
886886
};
887-
74051F2B22715C2400D63DF9 /* libjsi-tvOS.a */ = {
887+
7491267B22CC050B00A81C37 /* libjsi-tvOS.a */ = {
888888
isa = PBXReferenceProxy;
889889
fileType = archive.ar;
890890
path = "libjsi-tvOS.a";
891-
remoteRef = 74051F2A22715C2400D63DF9 /* PBXContainerItemProxy */;
891+
remoteRef = 7491267A22CC050B00A81C37 /* PBXContainerItemProxy */;
892892
sourceTree = BUILT_PRODUCTS_DIR;
893893
};
894-
74051F2D22715C2400D63DF9 /* libjsiexecutor-tvOS.a */ = {
894+
7491267D22CC050B00A81C37 /* libjsiexecutor-tvOS.a */ = {
895895
isa = PBXReferenceProxy;
896896
fileType = archive.ar;
897897
path = "libjsiexecutor-tvOS.a";
898-
remoteRef = 74051F2C22715C2400D63DF9 /* PBXContainerItemProxy */;
898+
remoteRef = 7491267C22CC050B00A81C37 /* PBXContainerItemProxy */;
899899
sourceTree = BUILT_PRODUCTS_DIR;
900900
};
901-
74051F3222715C2600D63DF9 /* libRNTextGradient.a */ = {
901+
7491268222CC050C00A81C37 /* libRNTextGradient.a */ = {
902902
isa = PBXReferenceProxy;
903903
fileType = archive.ar;
904904
path = libRNTextGradient.a;
905-
remoteRef = 74051F3122715C2600D63DF9 /* PBXContainerItemProxy */;
905+
remoteRef = 7491268122CC050C00A81C37 /* PBXContainerItemProxy */;
906906
sourceTree = BUILT_PRODUCTS_DIR;
907907
};
908908
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Metro configuration for React Native
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
*/
7+
8+
const path = require('path');
9+
10+
const extraNodeModules = {
11+
'react': path.resolve(__dirname, 'node_modules/react'),
12+
'fbjs': path.resolve(__dirname, 'node_modules/fbjs'),
13+
'react-native': path.resolve(__dirname, 'node_modules/react-native'),
14+
'@babel/runtime': path.resolve(__dirname, 'node_modules/@babel/runtime'),
15+
'react-native-text-gradient': path.resolve(__dirname, '../')
16+
};
17+
const watchFolders = [
18+
path.resolve(__dirname, '../')
19+
];
20+
21+
module.exports = {
22+
resolver: {
23+
extraNodeModules,
24+
},
25+
watchFolders,
26+
transformer: {
27+
getTransformOptions: async () => ({
28+
transform: {
29+
experimentalImportSupport: false,
30+
inlineRequires: false,
31+
},
32+
}),
33+
},
34+
};

0 commit comments

Comments
 (0)