Skip to content

Commit 3b167c1

Browse files
committed
add lottie-react-native
1 parent 3561427 commit 3b167c1

File tree

7 files changed

+53
-1
lines changed

7 files changed

+53
-1
lines changed

Example/android/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def enableSeparateBuildPerCPUArchitecture = false
9494
def enableProguardInReleaseBuilds = false
9595

9696
android {
97-
compileSdkVersion 23
97+
compileSdkVersion 26
9898
buildToolsVersion "23.0.1"
9999

100100
defaultConfig {
@@ -137,6 +137,7 @@ android {
137137
}
138138

139139
dependencies {
140+
compile project(':lottie-react-native')
140141
compile project(':react-native-smartrefreshlayout')
141142
compile project(':react-native-vector-icons')
142143
compile fileTree(dir: "libs", include: ["*.jar"])

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

Lines changed: 2 additions & 0 deletions
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.airbnb.android.react.lottie.LottiePackage;
67
import com.lmy.smartrefreshlayout.SmartRefreshLayoutPackage;
78
import com.oblador.vectoricons.VectorIconsPackage;
89
import com.facebook.react.ReactNativeHost;
@@ -25,6 +26,7 @@ public boolean getUseDeveloperSupport() {
2526
protected List<ReactPackage> getPackages() {
2627
return Arrays.<ReactPackage>asList(
2728
new MainReactPackage(),
29+
new LottiePackage(),
2830
new SmartRefreshLayoutPackage(),
2931
new VectorIconsPackage() );
3032
}

Example/android/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
67
}
78
dependencies {
89
classpath 'com.android.tools.build:gradle:2.2.3'
@@ -16,6 +17,9 @@ allprojects {
1617
repositories {
1718
mavenLocal()
1819
jcenter()
20+
maven {
21+
url 'https://maven.google.com'
22+
}
1923
maven {
2024
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
2125
url "$rootDir/../node_modules/react-native/android"

Example/android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rootProject.name = 'Example'
2+
include ':lottie-react-native'
3+
project(':lottie-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/lottie-react-native/src/android')
24
include ':react-native-smartrefreshlayout'
35
project(':react-native-smartrefreshlayout').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smartrefreshlayout/android')
46
include ':react-native-vector-icons'

Example/ios/Example.xcodeproj/project.pbxproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
AB3E6266F81B4B00A0C2DBC6 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E951A5739DD24BC3B66710B5 /* Octicons.ttf */; };
5050
0EF158848B084A43B812B40A /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 70E3107840A14BF6B61C710A /* SimpleLineIcons.ttf */; };
5151
090A21D08ABC4BF8AF26BFAE /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CD28DD520D8F468C9E4C1EAA /* Zocial.ttf */; };
52+
6DB765DAEDF145CFBD72B613 /* libLottieReactNative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B83CD4C6F4A8486FA632EE83 /* libLottieReactNative.a */; };
5253
/* End PBXBuildFile section */
5354

5455
/* Begin PBXContainerItemProxy section */
@@ -367,6 +368,8 @@
367368
E951A5739DD24BC3B66710B5 /* Octicons.ttf */ = {isa = PBXFileReference; name = "Octicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
368369
70E3107840A14BF6B61C710A /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; name = "SimpleLineIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
369370
CD28DD520D8F468C9E4C1EAA /* Zocial.ttf */ = {isa = PBXFileReference; name = "Zocial.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
371+
75D7E029B8874454BFC27C65 /* LottieReactNative.xcodeproj */ = {isa = PBXFileReference; name = "LottieReactNative.xcodeproj"; path = "../node_modules/lottie-react-native/src/ios/LottieReactNative.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
372+
B83CD4C6F4A8486FA632EE83 /* libLottieReactNative.a */ = {isa = PBXFileReference; name = "libLottieReactNative.a"; path = "libLottieReactNative.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
370373
/* End PBXFileReference section */
371374

372375
/* Begin PBXFrameworksBuildPhase section */
@@ -396,6 +399,7 @@
396399
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
397400
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
398401
AF3D69D8CDD24FD2BCCBC027 /* libRNVectorIcons.a in Frameworks */,
402+
6DB765DAEDF145CFBD72B613 /* libLottieReactNative.a in Frameworks */,
399403
);
400404
runOnlyForDeploymentPostprocessing = 0;
401405
};
@@ -583,6 +587,7 @@
583587
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
584588
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
585589
71C01375647E42F291952142 /* RNVectorIcons.xcodeproj */,
590+
75D7E029B8874454BFC27C65 /* LottieReactNative.xcodeproj */,
586591
);
587592
name = Libraries;
588593
sourceTree = "<group>";
@@ -1241,10 +1246,12 @@
12411246
LIBRARY_SEARCH_PATHS = (
12421247
"$(inherited)",
12431248
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1249+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12441250
);
12451251
HEADER_SEARCH_PATHS = (
12461252
"$(inherited)",
12471253
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1254+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
12481255
);
12491256
};
12501257
name = Debug;
@@ -1266,10 +1273,12 @@
12661273
LIBRARY_SEARCH_PATHS = (
12671274
"$(inherited)",
12681275
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1276+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12691277
);
12701278
HEADER_SEARCH_PATHS = (
12711279
"$(inherited)",
12721280
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1281+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
12731282
);
12741283
};
12751284
name = Release;
@@ -1292,6 +1301,7 @@
12921301
HEADER_SEARCH_PATHS = (
12931302
"$(inherited)",
12941303
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1304+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
12951305
);
12961306
};
12971307
name = Debug;
@@ -1313,6 +1323,7 @@
13131323
HEADER_SEARCH_PATHS = (
13141324
"$(inherited)",
13151325
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1326+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
13161327
);
13171328
};
13181329
name = Release;
@@ -1343,10 +1354,12 @@
13431354
LIBRARY_SEARCH_PATHS = (
13441355
"$(inherited)",
13451356
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1357+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13461358
);
13471359
HEADER_SEARCH_PATHS = (
13481360
"$(inherited)",
13491361
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1362+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
13501363
);
13511364
};
13521365
name = Debug;
@@ -1377,10 +1390,12 @@
13771390
LIBRARY_SEARCH_PATHS = (
13781391
"$(inherited)",
13791392
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1393+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
13801394
);
13811395
HEADER_SEARCH_PATHS = (
13821396
"$(inherited)",
13831397
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1398+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
13841399
);
13851400
};
13861401
name = Release;
@@ -1410,10 +1425,12 @@
14101425
LIBRARY_SEARCH_PATHS = (
14111426
"$(inherited)",
14121427
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1428+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
14131429
);
14141430
HEADER_SEARCH_PATHS = (
14151431
"$(inherited)",
14161432
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1433+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
14171434
);
14181435
};
14191436
name = Debug;
@@ -1443,10 +1460,12 @@
14431460
LIBRARY_SEARCH_PATHS = (
14441461
"$(inherited)",
14451462
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1463+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
14461464
);
14471465
HEADER_SEARCH_PATHS = (
14481466
"$(inherited)",
14491467
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
1468+
"$(SRCROOT)/../node_modules/lottie-react-native/src/ios/LottieReactNative",
14501469
);
14511470
};
14521471
name = Release;

Example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"test": "jest"
88
},
99
"dependencies": {
10+
"lottie-react-native": "^2.5.6",
1011
"react": "16.3.1",
1112
"react-native": "0.55.4",
1213
"react-native-indicators": "^0.13.0",

Example/yarn.lock

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,10 @@ decode-uri-component@^0.2.0:
17051705
version "0.2.0"
17061706
resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
17071707

1708+
dedent@^0.6.0:
1709+
version "0.6.0"
1710+
resolved "https://registry.npmjs.org/dedent/-/dedent-0.6.0.tgz#0e6da8f0ce52838ef5cec5c8f9396b0c1b64a3cb"
1711+
17081712
deep-extend@^0.6.0:
17091713
version "0.6.0"
17101714
resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
@@ -3319,6 +3323,19 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1:
33193323
dependencies:
33203324
js-tokens "^3.0.0"
33213325

3326+
lottie-ios@^2.5.0:
3327+
version "2.5.0"
3328+
resolved "https://registry.npmjs.org/lottie-ios/-/lottie-ios-2.5.0.tgz#55c808e785d4a6933b0c10b395530b17098b05de"
3329+
3330+
lottie-react-native@^2.5.6:
3331+
version "2.5.6"
3332+
resolved "https://registry.npmjs.org/lottie-react-native/-/lottie-react-native-2.5.6.tgz#c5ad64a880108d50c728505ede10470a109c6e70"
3333+
dependencies:
3334+
invariant "^2.2.2"
3335+
lottie-ios "^2.5.0"
3336+
prop-types "^15.5.10"
3337+
react-native-safe-module "^1.1.0"
3338+
33223339
lru-cache@^4.0.1:
33233340
version "4.1.3"
33243341
resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
@@ -4171,6 +4188,12 @@ react-native-indicators@^0.13.0:
41714188
dependencies:
41724189
prop-types "^15.5.10"
41734190

4191+
react-native-safe-module@^1.1.0:
4192+
version "1.2.0"
4193+
resolved "https://registry.npmjs.org/react-native-safe-module/-/react-native-safe-module-1.2.0.tgz#a23824ca24edc2901913694a76646475113d570d"
4194+
dependencies:
4195+
dedent "^0.6.0"
4196+
41744197
react-native-smartrefreshlayout@^0.6.1:
41754198
version "0.6.1"
41764199
resolved "https://registry.npmjs.org/react-native-smartrefreshlayout/-/react-native-smartrefreshlayout-0.6.1.tgz#177ba26536d412fd5fa37ac08bb8050b7e0e3c01"

0 commit comments

Comments
 (0)