Skip to content

Commit

Permalink
Fixes on build gradle, pod, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
scerelli committed Aug 15, 2019
1 parent b0ddfaa commit 7129ccd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ or

#### iOS

### Pod

You can run `pod install` inside your ios folder to install the package automatically.
### Pods
Add the line below to your podfile then run `pod install`
`pod 'react-native-fitness', :path => '../node_modules/@ovalmoney/react-native-fitness'`

### Manually

Expand Down
27 changes: 14 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,27 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.android.tools.build:gradle:2.1.3'
}
}

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

apply plugin: 'com.android.library'

def DEFAULT_COMPILE_SDK_VERSION = 27
def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3"
def DEFAULT_TARGET_SDK_VERSION = 27
def GOOGLE_LIB_VERSION = "17.0.0"
def DEFAULT_COMPILE_SDK_VERSION = 28
def DEFAULT_BUILD_TOOLS_VERSION = "28.0.3"
def DEFAULT_TARGET_SDK_VERSION = 28

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)

defaultConfig {
minSdkVersion 16
targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
versionCode 1
versionName "1.0"
}
Expand All @@ -35,9 +38,7 @@ repositories {
}

dependencies {
def googleVersion = project.hasProperty('googleLibVersion') ? project.googleLibVersion : GOOGLE_LIB_VERSION

compile 'com.facebook.react:react-native:+'
compile "com.google.android.gms:play-services-fitness:$googleVersion"
compile "com.google.android.gms:play-services-auth:$googleVersion"
compile "com.google.android.gms:play-services-fitness:${safeExtGet('googlePlayServicesVersion', '+')}"
compile "com.google.android.gms:play-services-auth:${safeExtGet('googlePlayServicesVersion', '+')}"
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@ovalmoney/react-native-fitness",
"podName": "react-native-fitness",
"version": "0.2.0",
"description": "A React Native package that gives you access to Apple kit and Google Fit data.",
"main": "./js/index.js",
Expand Down
2 changes: 1 addition & 1 deletion react-native-fitness.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = package['podName']
s.name = 'react-native-fitness'
s.version = package['version']
s.summary = package['description']

Expand Down

0 comments on commit 7129ccd

Please sign in to comment.