@honeybadger-io/react-native 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.0.11] - 2022-04-12
8
+ ### Added
9
+ - Updated the Android Native Module to support newer versions of the Android tech stack.
10
+
7
11
  ## [0.0.10] - 2022-04-05
8
12
  ### Added
9
13
  - Add support for React 17.
@@ -1,72 +1,53 @@
1
- // android/build.gradle
2
-
3
- // based on:
4
- //
5
- // * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
6
- // original location:
7
- // - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
8
- //
9
- // * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
10
- // original location:
11
- // - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
12
-
13
- def DEFAULT_COMPILE_SDK_VERSION = 28
14
- def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
15
- def DEFAULT_MIN_SDK_VERSION = 16
16
- def DEFAULT_TARGET_SDK_VERSION = 28
17
-
18
- def safeExtGet(prop, fallback) {
19
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
20
- }
21
-
22
- apply plugin: 'com.android.library'
23
- apply plugin: 'maven'
24
-
25
1
  buildscript {
26
- // The Android Gradle plugin is only required when opening the android folder stand-alone.
27
- // This avoids unnecessary downloads and potential conflicts when the library is included as a
28
- // module dependency in an application project.
29
- // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
30
2
  if (project == rootProject) {
31
3
  repositories {
32
4
  google()
5
+ mavenCentral()
33
6
  jcenter()
34
7
  }
8
+
35
9
  dependencies {
36
- classpath 'com.android.tools.build:gradle:3.4.1'
10
+ classpath 'com.android.tools.build:gradle:3.5.3'
37
11
  }
38
12
  }
39
13
  }
40
14
 
41
15
  apply plugin: 'com.android.library'
42
- apply plugin: 'maven'
16
+
17
+ def safeExtGet(prop, fallback) {
18
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
19
+ }
43
20
 
44
21
  android {
45
- compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
46
- buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
22
+ compileSdk safeExtGet('compileSdkVersion', 29)
47
23
  defaultConfig {
48
- minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
49
- targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
24
+ minSdkVersion safeExtGet('minSdkVersion', 16)
25
+ targetSdkVersion safeExtGet('targetSdkVersion', 29)
50
26
  versionCode 1
51
27
  versionName "1.0"
52
28
  }
29
+ buildTypes {
30
+ release {
31
+ minifyEnabled false
32
+ }
33
+ }
53
34
  lintOptions {
54
- abortOnError false
35
+ disable 'GradleCompatible'
36
+ }
37
+ compileOptions {
38
+ sourceCompatibility JavaVersion.VERSION_1_8
39
+ targetCompatibility JavaVersion.VERSION_1_8
55
40
  }
56
41
  }
57
42
 
58
43
  repositories {
59
- // ref: https://www.baeldung.com/maven-local-repository
60
44
  mavenLocal()
61
45
  maven {
62
46
  // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
63
47
  url "$rootDir/../node_modules/react-native/android"
64
48
  }
65
- maven {
66
- // Android JSC is installed from npm
67
- url "$rootDir/../node_modules/jsc-android/dist"
68
- }
69
49
  google()
50
+ mavenCentral()
70
51
  jcenter()
71
52
  }
72
53
 
@@ -74,78 +55,3 @@ dependencies {
74
55
  //noinspection GradleDynamicVersion
75
56
  implementation 'com.facebook.react:react-native:+' // From node_modules
76
57
  }
77
-
78
- def configureReactNativePom(def pom) {
79
- def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
80
-
81
- pom.project {
82
- name packageJson.title
83
- artifactId packageJson.name
84
- version = packageJson.version
85
- group = "io.honeybadger"
86
- description packageJson.description
87
- url packageJson.repository.baseUrl
88
-
89
- licenses {
90
- license {
91
- name packageJson.license
92
- url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
93
- distribution 'repo'
94
- }
95
- }
96
-
97
- developers {
98
- developer {
99
- id packageJson.author
100
- name packageJson.author
101
- // id packageJson.author.username
102
- // name packageJson.author.name
103
- }
104
- }
105
- }
106
- }
107
-
108
- afterEvaluate { project ->
109
- // some Gradle build hooks ref:
110
- // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
111
- task androidJavadoc(type: Javadoc) {
112
- source = android.sourceSets.main.java.srcDirs
113
- classpath += files(android.bootClasspath)
114
- classpath += files(project.getConfigurations().getByName('compile').asList())
115
- include '**/*.java'
116
- }
117
-
118
- task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
119
- classifier = 'javadoc'
120
- from androidJavadoc.destinationDir
121
- }
122
-
123
- task androidSourcesJar(type: Jar) {
124
- classifier = 'sources'
125
- from android.sourceSets.main.java.srcDirs
126
- include '**/*.java'
127
- }
128
-
129
- android.libraryVariants.all { variant ->
130
- def name = variant.name.capitalize()
131
- def javaCompileTask = variant.javaCompileProvider.get()
132
-
133
- task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
134
- from javaCompileTask.destinationDir
135
- }
136
- }
137
-
138
- artifacts {
139
- archives androidSourcesJar
140
- archives androidJavadocJar
141
- }
142
-
143
- task installArchives(type: Upload) {
144
- configuration = configurations.archives
145
- repositories.mavenDeployer {
146
- // Deploy to react-native-event-bridge/maven, ready to publish to npm
147
- repository url: "file://${projectDir}/../android/maven"
148
- configureReactNativePom pom
149
- }
150
- }
151
- }
@@ -85,6 +85,18 @@ public class HoneybadgerReactNativeModule extends ReactContextBaseJavaModule {
85
85
  );
86
86
  }
87
87
 
88
+ // Required for React-Native built in EventEmitter Calls.
89
+ @ReactMethod
90
+ public void addListener(String eventName) {
91
+
92
+ }
93
+
94
+ // Required for React-Native built in EventEmitter Calls.
95
+ @ReactMethod
96
+ public void removeListeners(Integer count) {
97
+
98
+ }
99
+
88
100
  private Throwable getRootCause ( Throwable throwable ) {
89
101
  Throwable cause = throwable.getCause();
90
102
  return cause == null ? throwable : getRootCause(cause);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honeybadger-io/react-native",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Honeybadger.io for React Native.",
5
5
  "author": "Andrey Butov <andreybutov@antair.com> (https://andreybutov.com)",
6
6
  "license": "MIT",