From 1ad4cc032a5c20c11197f19948afbbb9cd475760 Mon Sep 17 00:00:00 2001 From: Csaba Ilonka <132446949+csaba-ilonka-rollbar@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:02:59 +0300 Subject: [PATCH 1/4] Install required Android platform. (#317) * Install required Android platform. * Remove `jcenter` repo * Bump patch version. --- .github/workflows/ci.yml | 14 ++++++++++++-- build.gradle | 1 - examples/rollbar-android/build.gradle | 1 - examples/rollbar-spring-webmvc/build.gradle | 2 +- examples/rollbar-struts2-spring/build.gradle | 2 +- examples/rollbar-struts2/build.gradle | 2 +- examples/rollbar-web/build.gradle | 2 +- gradle.properties | 2 +- rollbar-android/build.gradle | 3 +-- 9 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fd5b607..3e9ba2d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,11 +56,11 @@ jobs: - name: Environment info run: | ./gradlew --version - echo ANDROID_SDK_ROOT: ${ANDROID_SDK_ROOT} - ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager --version echo JAVA_HOME: ${JAVA_HOME} java -version javac -version + echo ANDROID_HOME: ${ANDROID_HOME} + echo ANDROID_SDK_ROOT: ${ANDROID_SDK_ROOT} - name: Build run: 'source ~/.jdk7_home && ./gradlew clean build' @@ -84,6 +84,16 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up Java 11 for the Android SDK Manager + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Install Android SDK + run: | + echo "Android SDK Manager version: `${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --version`" + ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "platforms;android-27" "build-tools;28.0.3" + - name: Set up Java 7 uses: actions/setup-java@v1 with: diff --git a/build.gradle b/build.gradle index 850d1cc2..6cfb41a3 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,6 @@ allprojects { repositories { google() mavenCentral() - jcenter() } } diff --git a/examples/rollbar-android/build.gradle b/examples/rollbar-android/build.gradle index 825993a1..83d5bb9f 100644 --- a/examples/rollbar-android/build.gradle +++ b/examples/rollbar-android/build.gradle @@ -2,7 +2,6 @@ buildscript { repositories { google() mavenCentral() - jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.6.2' diff --git a/examples/rollbar-spring-webmvc/build.gradle b/examples/rollbar-spring-webmvc/build.gradle index 9595f322..34337a90 100644 --- a/examples/rollbar-spring-webmvc/build.gradle +++ b/examples/rollbar-spring-webmvc/build.gradle @@ -1,6 +1,6 @@ buildscript { repositories { - jcenter() + mavenCentral() } dependencies { diff --git a/examples/rollbar-struts2-spring/build.gradle b/examples/rollbar-struts2-spring/build.gradle index b36b349d..f324e8b8 100755 --- a/examples/rollbar-struts2-spring/build.gradle +++ b/examples/rollbar-struts2-spring/build.gradle @@ -1,6 +1,6 @@ buildscript { repositories { - jcenter() + mavenCentral() } dependencies { diff --git a/examples/rollbar-struts2/build.gradle b/examples/rollbar-struts2/build.gradle index 0590ea86..caa90366 100755 --- a/examples/rollbar-struts2/build.gradle +++ b/examples/rollbar-struts2/build.gradle @@ -1,6 +1,6 @@ buildscript { repositories { - jcenter() + mavenCentral() } dependencies { diff --git a/examples/rollbar-web/build.gradle b/examples/rollbar-web/build.gradle index 8dead54f..ea6e8263 100755 --- a/examples/rollbar-web/build.gradle +++ b/examples/rollbar-web/build.gradle @@ -1,6 +1,6 @@ buildscript { repositories { - jcenter() + mavenCentral() } dependencies { diff --git a/gradle.properties b/gradle.properties index 16e928be..dd280c53 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1.10.1-SNAPSHOT +VERSION_NAME=1.10.2-SNAPSHOT GROUP=com.rollbar POM_DESCRIPTION=For connecting your applications built on the JVM to Rollbar for Error Reporting diff --git a/rollbar-android/build.gradle b/rollbar-android/build.gradle index 12e7a868..58f54cd8 100644 --- a/rollbar-android/build.gradle +++ b/rollbar-android/build.gradle @@ -2,7 +2,6 @@ buildscript { repositories { google() mavenCentral() - jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.6.2' @@ -11,7 +10,7 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } apply plugin: 'com.android.library' From a772ee2339b8acdc1b3ccf74c659d0cc37d77095 Mon Sep 17 00:00:00 2001 From: Christian Ricardo Buongarzoni <31810096+christianbuon@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:09:08 -0300 Subject: [PATCH 2/4] [rollbar-logback][build][SDK-315] Update dependency (#310) * build(logback): Update dependency set versions without vulnerabilities --- rollbar-logback/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rollbar-logback/build.gradle b/rollbar-logback/build.gradle index e0ba92d2..e0a9b24c 100644 --- a/rollbar-logback/build.gradle +++ b/rollbar-logback/build.gradle @@ -1,6 +1,6 @@ dependencies { api project(':rollbar-java') - api group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3' - api group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3' -} \ No newline at end of file + api group: 'ch.qos.logback', name: 'logback-classic', version: '1.3.14' + api group: 'ch.qos.logback', name: 'logback-core', version: '1.3.14' +} From 482b9c96c4f661dfcc9501e4694d7880c658ae72 Mon Sep 17 00:00:00 2001 From: Christian Ricardo Buongarzoni <31810096+christianbuon@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:58:34 -0300 Subject: [PATCH 3/4] [FIX][SDK-98] Crash creating folder (#318) * fix: log the error instead of throwing an exception * docs: add comment --- .../java/com/rollbar/notifier/sender/queue/DiskQueue.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rollbar-java/src/main/java/com/rollbar/notifier/sender/queue/DiskQueue.java b/rollbar-java/src/main/java/com/rollbar/notifier/sender/queue/DiskQueue.java index 01700471..74108d5e 100644 --- a/rollbar-java/src/main/java/com/rollbar/notifier/sender/queue/DiskQueue.java +++ b/rollbar-java/src/main/java/com/rollbar/notifier/sender/queue/DiskQueue.java @@ -41,14 +41,18 @@ private DiskQueue(Builder builder) { this.maxSize = builder.maxSize; this.queueFolder = builder.queueFolder; + /* + A RuntimeException can cause a silent crash, since the error would not be saved and in the next + session there would be no payload to send. So we just log the error. + */ if (!this.queueFolder.exists()) { if (!this.queueFolder.mkdirs()) { - throw new RuntimeException("Could not create folder: " + queueFolder); + LOGGER.error("Could not create folder: {}", queueFolder); } } if (!this.queueFolder.canRead() || !this.queueFolder.canWrite()) { - throw new RuntimeException("Not enough permissions folder: " + queueFolder); + LOGGER.error("Not enough permissions folder: {}", queueFolder); } } From 2f88e1e77cc4b4bfd78316b70b3ffb2125b8b889 Mon Sep 17 00:00:00 2001 From: Christian Ricardo Buongarzoni <31810096+christianbuon@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:00:13 -0300 Subject: [PATCH 4/4] Release 1.10.3 (#320) * docs: update changelog * bump version to 1.10.3 --- CHANGELOG.md | 9 +++++++++ gradle.properties | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26e41598..84c7fa82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +# 1.10.3 + +### rollbar-logback +- Update Logback to version 1.3.14 [#310](https://github.com/rollbar/rollbar-java/pull/310) + +### rollbar-java +- Fix: Log when the error reports folder can't be created instead of throwing an Exception, to +prevent silent crashes [#318](https://github.com/rollbar/rollbar-java/pull/318) + # 1.10.0 - Add support for Spring 6.x and Spring Boot 3.x. [#302](https://github.com/rollbar/rollbar-java/pull/302) diff --git a/gradle.properties b/gradle.properties index dd280c53..e977b663 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1.10.2-SNAPSHOT +VERSION_NAME=1.10.3 GROUP=com.rollbar POM_DESCRIPTION=For connecting your applications built on the JVM to Rollbar for Error Reporting