-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from radko93/master
Update for latest React Native, Spinkit Android dependency and TS support
- Loading branch information
Showing
4 changed files
with
66 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
def safeExtGet(prop, fallback) { | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
url "https://jitpack.io" | ||
} | ||
} | ||
|
||
buildscript { | ||
ext.safeExtGet = {prop, fallback -> | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
} | ||
repositories { | ||
mavenCentral() | ||
maven { | ||
url "https://jitpack.io" | ||
} | ||
google() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:2.0.0' | ||
//noinspection GradleDependency | ||
classpath("com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '3.4.1')}") | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion safeExtGet('compileSdkVersion', 23) | ||
buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1") | ||
compileSdkVersion safeExtGet('compileSdkVersion', 28) | ||
//noinspection GradleDependency | ||
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3') | ||
|
||
defaultConfig { | ||
minSdkVersion safeExtGet('minSdkVersion', 16) | ||
targetSdkVersion safeExtGet('targetSdkVersion', 23) | ||
versionCode 1 | ||
versionName "1.0" | ||
minSdkVersion safeExtGet('minSdkVersion', 16) | ||
//noinspection OldTargetApi | ||
targetSdkVersion safeExtGet('targetSdkVersion', 28) | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
google() | ||
jcenter() | ||
maven { | ||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | ||
url "$rootDir/../node_modules/react-native/android" | ||
} | ||
maven { | ||
url "https://jitpack.io" | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'com.facebook.react:react-native:+' | ||
implementation 'com.github.ybq:Android-SpinKit:1.2.0' | ||
} | ||
//noinspection GradleDynamicVersion | ||
implementation "com.facebook.react:react-native:${safeExtGet('reactnativeVersion', '+')}" | ||
implementation 'com.github.ybq:Android-SpinKit:1.4.0' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
declare module 'react-native-spinkit' { | ||
import React from 'react'; | ||
|
||
export type SpinnerType = | ||
| 'CircleFlip' | ||
| 'Bounce' | ||
| 'Wave' | ||
| 'WanderingCubes' | ||
| 'Pulse' | ||
| 'ChasingDots' | ||
| 'ThreeBounce' | ||
| 'Circle' | ||
| '9CubeGrid' | ||
| 'WordPress' | ||
| 'FadingCircle' | ||
| 'FadingCircleAlt' | ||
| 'Arc' | ||
| 'ArcAlt' | ||
| 'Plane'; | ||
|
||
export type SpinnerProps = { | ||
isVisible?: boolean; | ||
color?: string; | ||
size?: number; | ||
type?: SpinnerType; | ||
}; | ||
|
||
const Spinner: React.ComponentType<SpinnerProps>; | ||
export default Spinner; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "react-native-spinkit" | ||
s.version = "1.0.2" | ||
s.version = "1.4.1" | ||
s.license = "MIT" | ||
s.homepage = "https://github.com/maxs15/react-native-spinkit" | ||
s.authors = { 'Maxime Mezrahi' => '[email protected]' } | ||
|