Skip to content

Commit e0339bc

Browse files
authored
Merge pull request 6DegreeLabs#9 from korifey91/master
Update package.json - Allow react 17.x, add typings
2 parents 1e107ad + 5b94782 commit e0339bc

File tree

3 files changed

+43
-15
lines changed

3 files changed

+43
-15
lines changed

android/build.gradle

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,55 @@
1-
21
buildscript {
3-
repositories {
4-
jcenter()
5-
}
2+
if (project == rootProject) {
3+
repositories {
4+
google()
5+
mavenCentral()
6+
jcenter()
7+
}
68

7-
dependencies {
8-
classpath 'com.android.tools.build:gradle:1.3.1'
9+
dependencies {
10+
classpath 'com.android.tools.build:gradle:3.5.3'
11+
}
912
}
1013
}
1114

1215
apply plugin: 'com.android.library'
1316

1417
android {
15-
compileSdkVersion 23
16-
buildToolsVersion "23.0.1"
18+
compileSdkVersion 29
1719

1820
defaultConfig {
1921
minSdkVersion 16
20-
targetSdkVersion 22
22+
targetSdkVersion 29
2123
versionCode 1
2224
versionName "1.0"
2325
}
26+
27+
buildTypes {
28+
release {
29+
minifyEnabled false
30+
}
31+
}
2432
lintOptions {
2533
abortOnError false
2634
}
35+
compileOptions {
36+
sourceCompatibility JavaVersion.VERSION_1_8
37+
targetCompatibility JavaVersion.VERSION_1_8
38+
}
2739
}
2840

2941
repositories {
42+
mavenLocal()
43+
maven {
44+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
45+
url("$rootDir/../node_modules/react-native/android")
46+
}
47+
google()
3048
mavenCentral()
49+
jcenter()
3150
}
3251

3352
dependencies {
34-
compile 'com.facebook.react:react-native:+'
53+
//noinspection GradleDynamicVersion
54+
implementation "com.facebook.react:react-native:+" // From node_modules
3555
}
36-

index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface ColorObject {
2+
r: number;
3+
g: number;
4+
b: number;
5+
}
6+
7+
export function getColor(source: string, quality: number, ignoreWhite: boolean): Promise<ColorObject>;
8+
export function getPalette(source: string, colorCount: number, quality: number, ignoreWhite: boolean): Promise<ColorObject[]>;

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "react-native-color-thief",
3-
"version": "0.3.3",
3+
"version": "0.3.5",
44
"description": "color thief for react-native (ios & android)",
55
"main": "index.js",
6+
"types": "index.d.ts",
67
"scripts": {
78
"test": "echo \"Error: no test specified\" && exit 1"
89
},
@@ -15,8 +16,8 @@
1516
"title": "React Native Color Thief",
1617
"repository": {
1718
"type": "git",
18-
"url": "git+https://github.com/6DegreeLabs/react-native-color-thief.git",
19-
"baseUrl": "https://github.com/6DegreeLabs/react-native-color-thief"
19+
"url": "git+https://github.com/korifey91/react-native-color-thief.git",
20+
"baseUrl": "https://github.com/korifey91/react-native-color-thief"
2021
},
2122
"author": {
2223
"name": "Likewise, Inc."
@@ -36,7 +37,7 @@
3637
"licenseFilename": "LICENSE",
3738
"readmeFilename": "README.md",
3839
"peerDependencies": {
39-
"react": "^16.5.0",
40+
"react": "^18.2.0",
4041
"react-native": ">=0.59.0 <1.0.x"
4142
}
4243
}

0 commit comments

Comments
 (0)