Skip to content

Commit 62fc7c8

Browse files
committed
updated example
1 parent b0928e7 commit 62fc7c8

File tree

8 files changed

+953
-1302
lines changed

8 files changed

+953
-1302
lines changed

example/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ android {
159159
}
160160

161161
dependencies {
162-
compile project(':react-native-text-gradient')
163-
compile fileTree(dir: "libs", include: ["*.jar"])
164-
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
165-
compile "com.facebook.react:react-native:+" // From node_modules
162+
implementation project(':react-native-text-gradient')
163+
implementation fileTree(dir: "libs", include: ["*.jar"])
164+
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
165+
implementation "com.facebook.react:react-native:+" // From node_modules
166166
}
167167

168168
// Run this once to be able to run the application with BUCK

example/android/build.gradle

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4+
ext {
5+
buildToolsVersion = "28.0.3"
6+
minSdkVersion = 16
7+
compileSdkVersion = 28
8+
targetSdkVersion = 28
9+
supportLibVersion = "28.0.0"
10+
}
411
repositories {
12+
google()
513
jcenter()
6-
maven {
7-
url 'https://maven.google.com/'
8-
name 'Google'
9-
}
1014
}
1115
dependencies {
12-
classpath 'com.android.tools.build:gradle:2.3.3'
16+
classpath 'com.android.tools.build:gradle:3.2.1'
1317

1418
// NOTE: Do not place your application dependencies here; they belong
1519
// in the individual module build.gradle files
@@ -19,33 +23,17 @@ buildscript {
1923
allprojects {
2024
repositories {
2125
mavenLocal()
26+
google()
2227
jcenter()
2328
maven {
2429
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
2530
url "$rootDir/../node_modules/react-native/android"
2631
}
27-
maven {
28-
url 'https://maven.google.com/'
29-
name 'Google'
30-
}
3132
}
3233
}
3334

34-
ext {
35-
buildToolsVersion = "28.0.3"
36-
minSdkVersion = 16
37-
compileSdkVersion = 28
38-
targetSdkVersion = 28
39-
supportLibVersion = "28.0.0"
40-
}
4135

42-
subprojects {
43-
afterEvaluate {project ->
44-
if (project.hasProperty("android")) {
45-
android {
46-
compileSdkVersion rootProject.ext.compileSdkVersion
47-
buildToolsVersion rootProject.ext.buildToolsVersion
48-
}
49-
}
50-
}
36+
task wrapper(type: Wrapper) {
37+
gradleVersion = '4.7'
38+
distributionUrl = distributionUrl.replace("bin", "all")
5139
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip

example/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["module:metro-react-native-babel-preset"]
3+
}

example/ios/TextGradientExample.xcodeproj/project.pbxproj

Lines changed: 64 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2323
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2424
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
25+
7453750322343CD3002FECE4 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7453750222343CD3002FECE4 /* JavaScriptCore.framework */; };
2526
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
2627
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
2728
/* End PBXBuildFile section */
@@ -146,20 +147,6 @@
146147
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
147148
remoteInfo = "double-conversion-tvOS";
148149
};
149-
2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = {
150-
isa = PBXContainerItemProxy;
151-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
152-
proxyType = 2;
153-
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
154-
remoteInfo = privatedata;
155-
};
156-
2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = {
157-
isa = PBXContainerItemProxy;
158-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
159-
proxyType = 2;
160-
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
161-
remoteInfo = "privatedata-tvOS";
162-
};
163150
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
164151
isa = PBXContainerItemProxy;
165152
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
@@ -237,20 +224,6 @@
237224
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
238225
remoteInfo = "cxxreact-tvOS";
239226
};
240-
3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
241-
isa = PBXContainerItemProxy;
242-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
243-
proxyType = 2;
244-
remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
245-
remoteInfo = jschelpers;
246-
};
247-
3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
248-
isa = PBXContainerItemProxy;
249-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
250-
proxyType = 2;
251-
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
252-
remoteInfo = "jschelpers-tvOS";
253-
};
254227
5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
255228
isa = PBXContainerItemProxy;
256229
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
@@ -272,6 +245,34 @@
272245
remoteGlobalIDString = 134814201AA4EA6300B7C361;
273246
remoteInfo = RNTextGradient;
274247
};
248+
745374F922343CC3002FECE4 /* PBXContainerItemProxy */ = {
249+
isa = PBXContainerItemProxy;
250+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
251+
proxyType = 2;
252+
remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8;
253+
remoteInfo = jsi;
254+
};
255+
745374FB22343CC3002FECE4 /* PBXContainerItemProxy */ = {
256+
isa = PBXContainerItemProxy;
257+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
258+
proxyType = 2;
259+
remoteGlobalIDString = EDEBC73B214B45A300DD5AC8;
260+
remoteInfo = jsiexecutor;
261+
};
262+
745374FD22343CC3002FECE4 /* PBXContainerItemProxy */ = {
263+
isa = PBXContainerItemProxy;
264+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
265+
proxyType = 2;
266+
remoteGlobalIDString = ED296FB6214C9A0900B7C4FE;
267+
remoteInfo = "jsi-tvOS";
268+
};
269+
745374FF22343CC3002FECE4 /* PBXContainerItemProxy */ = {
270+
isa = PBXContainerItemProxy;
271+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
272+
proxyType = 2;
273+
remoteGlobalIDString = ED296FEE214C9CF800B7C4FE;
274+
remoteInfo = "jsiexecutor-tvOS";
275+
};
275276
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
276277
isa = PBXContainerItemProxy;
277278
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
@@ -315,6 +316,7 @@
315316
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
316317
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
317318
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
319+
7453750222343CD3002FECE4 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
318320
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
319321
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; 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>"; };
@@ -326,6 +328,7 @@
326328
isa = PBXFrameworksBuildPhase;
327329
buildActionMask = 2147483647;
328330
files = (
331+
7453750322343CD3002FECE4 /* JavaScriptCore.framework in Frameworks */,
329332
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
330333
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
331334
146834051AC3E58100842450 /* libReact.a in Frameworks */,
@@ -431,23 +434,24 @@
431434
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
432435
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
433436
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
434-
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
435-
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
436437
2DF0FFDF2056DD460020B375 /* libjsinspector.a */,
437438
2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */,
438439
2DF0FFE32056DD460020B375 /* libthird-party.a */,
439440
2DF0FFE52056DD460020B375 /* libthird-party.a */,
440441
2DF0FFE72056DD460020B375 /* libdouble-conversion.a */,
441442
2DF0FFE92056DD460020B375 /* libdouble-conversion.a */,
442-
2DF0FFEB2056DD460020B375 /* libprivatedata.a */,
443-
2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */,
443+
745374FA22343CC3002FECE4 /* libjsi.a */,
444+
745374FC22343CC3002FECE4 /* libjsiexecutor.a */,
445+
745374FE22343CC3002FECE4 /* libjsi-tvOS.a */,
446+
7453750022343CC3002FECE4 /* libjsiexecutor-tvOS.a */,
444447
);
445448
name = Products;
446449
sourceTree = "<group>";
447450
};
448451
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
449452
isa = PBXGroup;
450453
children = (
454+
7453750222343CD3002FECE4 /* JavaScriptCore.framework */,
451455
2D16E6891FA4F8E400B85C8A /* libReact.a */,
452456
);
453457
name = Frameworks;
@@ -774,20 +778,6 @@
774778
remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */;
775779
sourceTree = BUILT_PRODUCTS_DIR;
776780
};
777-
2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = {
778-
isa = PBXReferenceProxy;
779-
fileType = archive.ar;
780-
path = libprivatedata.a;
781-
remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */;
782-
sourceTree = BUILT_PRODUCTS_DIR;
783-
};
784-
2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = {
785-
isa = PBXReferenceProxy;
786-
fileType = archive.ar;
787-
path = "libprivatedata-tvOS.a";
788-
remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */;
789-
sourceTree = BUILT_PRODUCTS_DIR;
790-
};
791781
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
792782
isa = PBXReferenceProxy;
793783
fileType = archive.ar;
@@ -865,20 +855,6 @@
865855
remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
866856
sourceTree = BUILT_PRODUCTS_DIR;
867857
};
868-
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
869-
isa = PBXReferenceProxy;
870-
fileType = archive.ar;
871-
path = libjschelpers.a;
872-
remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
873-
sourceTree = BUILT_PRODUCTS_DIR;
874-
};
875-
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
876-
isa = PBXReferenceProxy;
877-
fileType = archive.ar;
878-
path = libjschelpers.a;
879-
remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
880-
sourceTree = BUILT_PRODUCTS_DIR;
881-
};
882858
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
883859
isa = PBXReferenceProxy;
884860
fileType = archive.ar;
@@ -900,6 +876,34 @@
900876
remoteRef = 7416146520EFF5C500782E92 /* PBXContainerItemProxy */;
901877
sourceTree = BUILT_PRODUCTS_DIR;
902878
};
879+
745374FA22343CC3002FECE4 /* libjsi.a */ = {
880+
isa = PBXReferenceProxy;
881+
fileType = archive.ar;
882+
path = libjsi.a;
883+
remoteRef = 745374F922343CC3002FECE4 /* PBXContainerItemProxy */;
884+
sourceTree = BUILT_PRODUCTS_DIR;
885+
};
886+
745374FC22343CC3002FECE4 /* libjsiexecutor.a */ = {
887+
isa = PBXReferenceProxy;
888+
fileType = archive.ar;
889+
path = libjsiexecutor.a;
890+
remoteRef = 745374FB22343CC3002FECE4 /* PBXContainerItemProxy */;
891+
sourceTree = BUILT_PRODUCTS_DIR;
892+
};
893+
745374FE22343CC3002FECE4 /* libjsi-tvOS.a */ = {
894+
isa = PBXReferenceProxy;
895+
fileType = archive.ar;
896+
path = "libjsi-tvOS.a";
897+
remoteRef = 745374FD22343CC3002FECE4 /* PBXContainerItemProxy */;
898+
sourceTree = BUILT_PRODUCTS_DIR;
899+
};
900+
7453750022343CC3002FECE4 /* libjsiexecutor-tvOS.a */ = {
901+
isa = PBXReferenceProxy;
902+
fileType = archive.ar;
903+
path = "libjsiexecutor-tvOS.a";
904+
remoteRef = 745374FF22343CC3002FECE4 /* PBXContainerItemProxy */;
905+
sourceTree = BUILT_PRODUCTS_DIR;
906+
};
903907
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
904908
isa = PBXReferenceProxy;
905909
fileType = archive.ar;

0 commit comments

Comments
 (0)