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

v2.3.0 #9

Merged
merged 3 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react-native-chabok/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ from:
```
to:
```
api 'com.adpdigital.push:chabok-lib:3.6.0'
api 'com.adpdigital.push:chabok-lib:3.7.1'
```

#### With breaking changes
Expand Down
95 changes: 5 additions & 90 deletions react-native-chabok/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
// android/build.gradle

// based on:
//
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
// original location:
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
//
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
// original location:
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle

def DEFAULT_COMPILE_SDK_VERSION = 28
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
def DEFAULT_MIN_SDK_VERSION = 16
Expand All @@ -20,7 +8,6 @@ def safeExtGet(prop, fallback) {
}

apply plugin: 'com.android.library'
apply plugin: 'maven'

buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
Expand All @@ -30,17 +17,14 @@ buildscript {
if (project == rootProject) {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'

android {
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
Expand All @@ -67,87 +51,18 @@ repositories {
url "$rootDir/../node_modules/jsc-android/dist"
}
google()
jcenter()
mavenCentral()
}

dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules

api 'com.adpdigital.push:chabok-lib:3.6.0'
api 'com.adpdigital.push:chabok-lib:3.7.1'

implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'com.android.installreferrer:installreferrer:1.0'
}

def configureReactNativePom(def pom) {
def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)

pom.project {
name packageJson.title
artifactId packageJson.name
version = packageJson.version
group = "com.adpdigital.push.rn"
description packageJson.description
url packageJson.repository.baseUrl

licenses {
license {
name packageJson.license
url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
distribution 'repo'
}
}

developers {
developer {
id packageJson.author.username
name packageJson.author.name
}
}
}
}

afterEvaluate { project ->
// some Gradle build hooks ref:
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
task androidJavadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += files(android.bootClasspath)
classpath += files(project.getConfigurations().getByName('compile').asList())
include '**/*.java'
}

task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
classifier = 'javadoc'
from androidJavadoc.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
include '**/*.java'
}

android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
task "jar${name}"(type: Jar, dependsOn: variant.javaCompileProvider.get()) {
from variant.javaCompileProvider.get().destinationDir
}
}

artifacts {
archives androidSourcesJar
archives androidJavadocJar
}

task installArchives(type: Upload) {
configuration = configurations.archives
repositories.mavenDeployer {
// Deploy to react-native-event-bridge/maven, ready to publish to npm
repository url: "file://${projectDir}/../android/maven"
configureReactNativePom pom
}
}
implementation 'com.google.android.gms:play-services-base:16.0.1'
}
3 changes: 3 additions & 0 deletions react-native-chabok/history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## History

### v2.3.0 (25/11/2021)
- Update: Chabok android SDK ([v3.7.1](https://github.com/chabok-io/chabok-client-android/releases/tag/v3.7.1))

### v2.2.0 (02/03/2021)
- Update: Chabok iOS SDK ([v2.4.0](https://github.com/chabok-io/chabok-client-ios/releases/tag/v2.4.0))
- Update: Chabok android SDK ([v3.6.0](https://github.com/chabok-io/chabok-client-android/releases/tag/v3.6.0))
Expand Down
2 changes: 1 addition & 1 deletion react-native-chabok/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-chabok",
"title": "React native wrapper for Chabok SDK",
"version": "2.2.0",
"version": "2.3.0",
"description": "React native wrapper for Chabok SDK",
"main": "index.js",
"scripts": {
Expand Down