Skip to content

Commit c945b46

Browse files
Fix project structure and upgrade lottie
1 parent 7c98960 commit c945b46

File tree

9 files changed

+44
-80
lines changed

9 files changed

+44
-80
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ project.xcworkspace
2828
*.iml
2929
.gradle
3030
local.properties
31+
example/android/app/src/main/gen/
32+
lib/android/src/main/gen/
3133

3234
# node.js
3335
#

build.gradle

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
1-
/*
2-
* This build file was auto generated by running the Gradle 'init' task
3-
* by 'leland_richardson' at '12/19/16 1:05 PM' with Gradle 2.4
4-
*
5-
* This generated file contains a commented-out sample Java project to get you started.
6-
* For more details take a look at the Java Quickstart chapter in the Gradle
7-
* user guide available at http://gradle.org/docs/2.4/userguide/tutorial_java_projects.html
8-
*/
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
92

10-
/*
11-
// Apply the java plugin to add support for Java
12-
apply plugin: 'java'
13-
14-
// In this section you declare where to find the dependencies of your project
15-
repositories {
16-
// Use 'jcenter' for resolving your dependencies.
17-
// You can declare any Maven/Ivy/file repository here.
3+
buildscript {
4+
repositories {
185
jcenter()
6+
}
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:2.3.0'
9+
}
1910
}
2011

21-
// In this section you declare the dependencies for your production and test code
22-
dependencies {
23-
// The production code uses the SLF4J logging API at compile time
24-
compile 'org.slf4j:slf4j-api:1.7.12'
12+
allprojects {
13+
repositories {
14+
mavenLocal()
15+
jcenter()
16+
maven {
17+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
18+
url "$rootDir/node_modules/react-native/android"
19+
}
20+
}
21+
}
2522

26-
// Declare the dependency for your favourite test framework you want to use in your tests.
27-
// TestNG is also supported by the Gradle Test task. Just change the
28-
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
29-
// 'test.useTestNG()' to your build script.
30-
testCompile 'junit:junit:4.12'
23+
task clean(type: Delete) {
24+
delete rootProject.buildDir
3125
}
32-
*/

example/android/app/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ def enableSeparateBuildPerCPUArchitecture = false
9797
def enableProguardInReleaseBuilds = false
9898

9999
android {
100-
compileSdkVersion 23
101-
buildToolsVersion "23.0.1"
100+
compileSdkVersion 25
101+
buildToolsVersion "25.0.2"
102102

103103
defaultConfig {
104104
applicationId "com.example"
105105
minSdkVersion 16
106-
targetSdkVersion 22
106+
targetSdkVersion 25
107107
versionCode 1
108108
versionName "1.0"
109109
ndk {
@@ -141,9 +141,10 @@ android {
141141

142142
dependencies {
143143
compile fileTree(dir: "libs", include: ["*.jar"])
144-
compile "com.android.support:appcompat-v7:23.0.1"
144+
compile 'com.android.support:appcompat-v7:25.1.1'
145+
compile 'com.android.support:support-annotations:25.1.1'
145146
compile "com.facebook.react:react-native:+" // From node_modules
146-
compile project(':lottie')
147+
compile project(':lottie-react-native-lib')
147148

148149
}
149150

example/android/build.gradle

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

example/ios/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ target 'example' do
1010
# Add any other subspecs you want to use in your project
1111
]
1212
pod 'lottie-react-native', :path => '../../'
13+
pod 'lottie-ios', :path => '../../node_modules/lottie-ios'
1314
end

example/ios/Podfile.lock

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
2-
- lottie-ios (1.0.0)
3-
- lottie-react-native (1.0.1):
2+
- lottie-ios (1.5.1)
3+
- lottie-react-native (1.0.6):
44
- lottie-ios
55
- React
66
- React (0.41.1):
@@ -25,6 +25,7 @@ PODS:
2525
- React/yoga (0.41.1)
2626

2727
DEPENDENCIES:
28+
- lottie-ios (from `../../node_modules/lottie-ios`)
2829
- lottie-react-native (from `../../`)
2930
- React/Core (from `../../node_modules/react-native`)
3031
- React/RCTAnimation (from `../../node_modules/react-native`)
@@ -34,16 +35,18 @@ DEPENDENCIES:
3435
- React/RCTWebSocket (from `../../node_modules/react-native`)
3536

3637
EXTERNAL SOURCES:
38+
lottie-ios:
39+
:path: "../../node_modules/lottie-ios"
3740
lottie-react-native:
3841
:path: "../../"
3942
React:
4043
:path: "../../node_modules/react-native"
4144

4245
SPEC CHECKSUMS:
43-
lottie-ios: c40d67c1481d6fb9fa24fe46731ac823f5f6675b
44-
lottie-react-native: 651290cb9dbfb7eebafa0a0f3ab2b399f177e354
46+
lottie-ios: f680a7c4cb7a567ecf258fde0f967913aff111b8
47+
lottie-react-native: 4ecfdd856f20863cea9d4ddfd25dec5550ef50a6
4548
React: 92b73e1de23f052ab049247554427634986b40d1
4649

47-
PODFILE CHECKSUM: f599da013d7c1939292ba2072269e5bcb78acf43
50+
PODFILE CHECKSUM: f51e2172ed228016b380cd0daa6b749a81ad54f8
4851

4952
COCOAPODS: 1.2.0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 19 13:05:54 PST 2016
1+
#Sat Mar 25 15:51:57 PDT 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"dependencies": {
4545
"invariant": "^2.2.2",
4646
"react-native-safe-module": "^1.1.0",
47-
"lottie-ios": "^1.0.2"
47+
"lottie-ios": "^1.5.1"
4848
},
4949
"devDependencies": {
5050
"babel-eslint": "^6.1.2",

settings.gradle

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
/*
2-
* This settings file was auto generated by the Gradle buildInit task
3-
* by 'leland_richardson' at '12/19/16 1:05 PM' with Gradle 2.4
4-
*
5-
* The settings file is used to specify which projects to include in your build.
6-
* In a single project build this file can be empty or even removed.
7-
*
8-
* Detailed information about configuring a multi-project build in Gradle can be found
9-
* in the user guide at http://gradle.org/docs/2.4/userguide/multi_project_builds.html
10-
*/
1+
rootProject.name = 'lottie-react-native'
112

12-
/*
13-
// To declare projects as part of a multi-project build use the 'include' method
14-
include 'shared'
15-
include 'api'
16-
include 'services:webservice'
17-
*/
3+
include ":example-android"
4+
project(":example-android").projectDir = file("./example/android/app")
185

19-
rootProject.name = 'lottie-react-native'
6+
include ":lottie-react-native-lib"
7+
project(":lottie-react-native-lib").projectDir = file("./lib/android")

0 commit comments

Comments
 (0)