Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unnecessary @Override #78

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
10 changes: 5 additions & 5 deletions BluetoothSerialExample/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ android {
}

dependencies {
compile project(':react-native-bluetooth-serial')
compile project(':@remobile/react-native-toast')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-bluetooth-serial')
implementation project(':@remobile/react-native-toast')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+" // From node_modules
}

// Run this once to be able to run the application with BUCK
Expand Down
14 changes: 7 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:3.4.0'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
targetSdkVersion 28
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}

repositories {
google()
mavenCentral()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand All @@ -34,5 +34,5 @@ repositories {
}

dependencies {
compile 'com.facebook.react:react-native:+'
implementation 'com.facebook.react:react-native:+'
}
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Thu Nov 24 08:03:52 CET 2016
android.useDeprecatedNdk=true
#android.useDeprecatedNdk=true
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
return modules;
}

@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
Expand Down
26 changes: 26 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Type definitions for @secullum/react-native-bluetooth-serial
// Project: https://github.com/rusel1989/react-native-bluetooth-serial
// Definitions by: Rodrigo Weber <https://github.com/RodrigoAWeber>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7.2
declare module '@secullum/react-native-bluetooth-serial' {
import * as React from "react";
import * as ReactNative from "react-native";

class Buffer {
constructor(data: number[]);
}

namespace BluetoothSerial {
const on: (eventName: string, handler: () => void) => void
const removeListener: (eventName: string, handler: () => void) => void
const write: (data: Buffer | string) => Promise<Boolean>;
const list: () => Promise<Array<{ id: string, name: string }>>;
const isEnabled: () => Promise<Boolean>;
const connect: (id: string) => Promise<void>;
const disconnect: () => Promise<void>;
const isConnected: () => Promise<Boolean>;
}

export = BluetoothSerial
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-bluetooth-serial",
"version": "1.0.0-rc1",
"description": "'Bluetooth serial for react native'",
"name": "@secullum/react-native-bluetooth-serial",
"version": "1.1.0",
"description": "Bluetooth serial for react native",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down