diff --git a/CHANGELOG.md b/CHANGELOG.md index 30c13b81f..71831fe20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 24.7.2 +* Mitigated an issue in the upload plugin that prevented the upload of a symbol file + ## 24.7.1 * ! Minor breaking change ! Unsupported types for user properties will now be omitted, they won't be converted to strings. diff --git a/gradle.properties b/gradle.properties index db012571f..9e00f0cab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,7 +22,7 @@ org.gradle.configureondemand=true android.useAndroidX=true android.enableJetifier=true # RELEASE FIELD SECTION -VERSION_NAME=24.7.1 +VERSION_NAME=24.7.2 GROUP=ly.count.android POM_URL=https://github.com/Countly/countly-sdk-android POM_SCM_URL=https://github.com/Countly/countly-sdk-android diff --git a/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java b/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java index d317e9d8b..af6cce718 100644 --- a/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java +++ b/sdk/src/androidTest/java/ly/count/android/sdk/TestUtils.java @@ -42,7 +42,7 @@ public class TestUtils { public final static String commonAppKey = "appkey"; public final static String commonDeviceId = "1234"; public final static String SDK_NAME = "java-native-android"; - public final static String SDK_VERSION = "24.7.1"; + public final static String SDK_VERSION = "24.7.2"; public static final int MAX_THREAD_COUNT_PER_STACK_TRACE = 50; public static class Activity2 extends Activity { diff --git a/sdk/src/main/java/ly/count/android/sdk/Countly.java b/sdk/src/main/java/ly/count/android/sdk/Countly.java index 3aa917d00..4dc0f8714 100644 --- a/sdk/src/main/java/ly/count/android/sdk/Countly.java +++ b/sdk/src/main/java/ly/count/android/sdk/Countly.java @@ -47,7 +47,7 @@ of this software and associated documentation files (the "Software"), to deal */ public class Countly { - private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "24.7.1"; + private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "24.7.2"; /** * Used as request meta data on every request diff --git a/upload-plugin/src/main/groovy/ly/count/android/plugins/uploadSymbols.groovy b/upload-plugin/src/main/groovy/ly/count/android/plugins/uploadSymbols.groovy index 72f073859..3e0cdb1b6 100644 --- a/upload-plugin/src/main/groovy/ly/count/android/plugins/uploadSymbols.groovy +++ b/upload-plugin/src/main/groovy/ly/count/android/plugins/uploadSymbols.groovy @@ -36,7 +36,10 @@ class UploadSymbolsPlugin implements Plugin<Project> { throw new StopExecutionException("Please specify your server in countly block.") } String buildVersion = project.android.defaultConfig.versionName - String url = "${ext.server}/i/crash_symbols/upload_symbol" + String url = ext.server; + String path = "i/crash_symbols/upload_symbol"; + // Ensure there is exactly one "/" between the base URL and the path + url = url.endsWith("/") ? url + path : url + "/" + path; def filePath = "$project.buildDir/$ext.mappingFile" logger.debug("uploadJavaSymbols, Version name:[ {} ], Upload symbol url:[ {} ], Mapping file path:[ {} ]", buildVersion, url, filePath) File file = new File(filePath) @@ -55,17 +58,27 @@ class UploadSymbolsPlugin implements Plugin<Project> { .build() request = new Request.Builder().url(url).post(formBody).build() } - logger.debug("uploadJavaSymbols, Generated request: {}", request.body().toString()) doLast { if (request == null) { logger.error("Request not constructed") throw new StopActionException("Something happened while constructing the request. Please try again.") } + + if (request.body() != null) { + logger.debug("uploadJavaSymbols, Generated request: {}", request.body().toString()) + } else { + logger.error("uploadJavaSymbols, Request body is null which should not be the case") + } + client = new OkHttpClient() Response response = client.newCall(request).execute() if (response.code() != 200) { - logger.error("An error occurred while uploading the mapping file: {}", response.body().string()) + if (response.body() != null) { + logger.error("An error occurred while uploading the mapping file: {}", response.body().string()) + } else { + logger.error("An error occurred while uploading the mapping file, response body null") + } } else { logger.debug("File upload successful") }