Skip to content

Commit

Permalink
Publish version 2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdi-malv committed Jun 7, 2021
0 parents commit d98af6a
Show file tree
Hide file tree
Showing 11 changed files with 846 additions and 0 deletions.
Empty file added .gitattributes
Empty file.
399 changes: 399 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

## 2.1.2 (7 Jun, 2021)
#### Android
- Update native dependency to `2.1.2`

## 2.1.1 (22 May, 2021)
- Add **Standard banner** feature.
- Use static class for `TapsellPlus`
- Helps for completion and guides when using it's APIs
- You can use `import {TapsellPlus}` or `import TapsellPlus`
- Add **native banner**
- Refactor all methods due to new android changes


```js
import { TapsellPlus } from 'react-native-tapsell-plus';

TapsellPlus.initialize(key);
```

#### Android
- Update native functionality to `2.1.1`

## 1.2.7 (27 Apr, 2021)
#### Android
- Update native library to 1.2.5

## 1.2.4-alpha01 (26 Apr, 2021)
#### Android
- Update native library to 1.2.2
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# TapsellPlusSDK-ReactNativePlugin [![npm version](https://img.shields.io/npm/v/react-native-tapsell-plus?color=green&label=react-native-tapsell-plus&logo=react)](https://www.npmjs.com/package/react-native-tapsell-plus)

# react-native-tapsell-plus

## Getting started

`$ npm install react-native-tapsell-plus --save`


> If your react-native version is below `0.60`, you need to link it as well:
>
> ```
> $ react-native link react-native-tapsell-plus
> ```
<details>
<summary>Manual installation (Older react native versions)</summary>
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactlibrary.RNTapsellPlusPackage;` to the imports at the top of the file
- Add `new RNTapsellPlusPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-tapsell-plus'
project(':react-native-tapsell-plus').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-tapsell-plus/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-tapsell-plus')
```
</details>
## Usage
```javascript
import RNTapsellPlus from 'react-native-tapsell-plus';
// TODO: What to do with the module?
RNTapsellPlus;
```
40 changes: 40 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

buildscript {
repositories {
jcenter()
}

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

apply plugin: 'com.android.library'

android {
compileSdkVersion 29
buildToolsVersion "29.0.2"

defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
lintOptions {
abortOnError false
}
}

rootProject.allprojects {
repositories {
mavenCentral()
}
}

dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'
implementation 'ir.tapsell.plus:tapsell-plus-sdk-reactnative:2.1.2'
}

6 changes: 6 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ir.tapsell.plus">

</manifest>

29 changes: 29 additions & 0 deletions android/src/main/java/ir/tapsell/plus/RNTapsellPlusPackage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

package ir.tapsell.plus;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.bridge.JavaScriptModule;

public class RNTapsellPlusPackage implements ReactPackage, NoProguard {
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
return Arrays.<NativeModule>asList(new RNTapsellPlusModule(reactContext));
}

// Deprecated from RN 0.47
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}

@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
}
Loading

0 comments on commit d98af6a

Please sign in to comment.