From ef8169fa3c351ddf40e49e2c964796ca18d7f5cb Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Wed, 19 Jul 2023 15:27:15 +0800 Subject: [PATCH 01/40] change uc query retry host order --- .../src/main/java/com/qiniu/android/common/Config.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/src/main/java/com/qiniu/android/common/Config.java b/library/src/main/java/com/qiniu/android/common/Config.java index ced13da2..d5c1e53c 100644 --- a/library/src/main/java/com/qiniu/android/common/Config.java +++ b/library/src/main/java/com/qiniu/android/common/Config.java @@ -68,12 +68,12 @@ public final class Config { /** * preQuery host */ - public static String preQueryHost00 = "uc.qbox.me"; - public static String preQueryHost01 = "api.qiniu.com"; - public static String preQueryHost02 = "kodo-config.qiniuapi.com"; + public static String preQueryHost00 = "kodo-config.qiniuapi.com"; + public static String preQueryHost01 = "uc.qbox.me"; + public static String preQueryHost02 = "api.qiniu.com"; public static String[] preQueryHosts() { - return new String[]{preQueryHost00, preQueryHost02, preQueryHost01}; + return new String[]{preQueryHost00, preQueryHost01, preQueryHost02}; } /** From 112ff06a1b43f0f20ffe1f5d0c20408bb24da909 Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Fri, 21 Jul 2023 14:20:23 +0800 Subject: [PATCH 02/40] change test case --- .../src/androidTest/java/com/qiniu/android/http/HttpTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java b/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java index 923826b4..c679c0b7 100644 --- a/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java +++ b/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java @@ -164,7 +164,6 @@ public boolean shouldWait() { }, 60); assertTrue("status code:" + info.statusCode, info.statusCode == 418 || info.statusCode % 100 == 5); - assertEquals(418, info.statusCode); assertNotNull(info.error); } From 8193846db4d1371db522ac1804217e6c5a5837d0 Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Mon, 24 Jul 2023 10:03:34 +0800 Subject: [PATCH 03/40] change test case --- .../src/androidTest/java/com/qiniu/android/http/HttpTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java b/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java index c679c0b7..e8dc387c 100644 --- a/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java +++ b/library/src/androidTest/java/com/qiniu/android/http/HttpTest.java @@ -163,7 +163,7 @@ public boolean shouldWait() { } }, 60); - assertTrue("status code:" + info.statusCode, info.statusCode == 418 || info.statusCode % 100 == 5); + assertTrue("status code:" + info.statusCode, info.statusCode == 418 || (info.statusCode / 100 == 5)); assertNotNull(info.error); } From 027d9ba3bf6aff479f11cf1283a28b739c3617cf Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Mon, 31 Jul 2023 15:36:08 +0800 Subject: [PATCH 04/40] change mvn_push --- build.gradle | 2 +- library/build.gradle | 8 ++++---- mvn_push.gradle | 19 +++++++++---------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 86191e7d..4a0e54b4 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.4' + classpath 'com.android.tools.build:gradle:7.1.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/library/build.gradle b/library/build.gradle index 74af114b..70cf2362 100755 --- a/library/build.gradle +++ b/library/build.gradle @@ -20,12 +20,12 @@ String version = versionName() int code = versionNameToCode(version) android { - compileSdkVersion 30 - buildToolsVersion '29.0.3' + compileSdkVersion 33 +// buildToolsVersion '29.0.3' defaultConfig { //applicationId "com.qiniu.android" minSdkVersion 14 - targetSdkVersion 30 + targetSdkVersion 33 versionCode code versionName version @@ -82,7 +82,7 @@ dependencies { task releaseJar(type: Jar, dependsOn: 'build') { //指定生成的jar名 - baseName 'qiniu-android-sdk-' + version + baseName('qiniu-android-sdk-' + version) //从哪里打包class文件 // from('build/intermediates/classes/release/com/qiniu/android/dns/') //打包到jar后的目录结构 diff --git a/mvn_push.gradle b/mvn_push.gradle index 75045545..ea28ad91 100644 --- a/mvn_push.gradle +++ b/mvn_push.gradle @@ -48,29 +48,28 @@ task androidJavadocs(type: Javadoc) { } task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - classifier = 'javadoc' + archiveClassifier.set('javadoc') from androidJavadocs.destinationDir } task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.sourceFiles + archiveClassifier.set('sources') + from android.sourceSets.main.java.srcDirs } publishing { - publications{ - mavenJava(MavenPublication){ + publications { + mavenJava(MavenPublication) { groupId = GROUP artifactId = POM_ARTIFACT_ID version = VERSION_NAME - artifact androidSourcesJar { - classifier = 'sources' + afterEvaluate { + from components.release } - artifact androidJavadocsJar { - classifier "javadoc" - } + artifact(androidSourcesJar) + artifact(androidJavadocsJar) pom { name = POM_NAME From 47f87a6a8781764157fc7590cc7d272ddcf953b5 Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Mon, 31 Jul 2023 18:32:53 +0800 Subject: [PATCH 05/40] update test token --- .../java/com/qiniu/android/TestConfig.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/src/androidTest/java/com/qiniu/android/TestConfig.java b/library/src/androidTest/java/com/qiniu/android/TestConfig.java index 07da1c3c..d003be92 100644 --- a/library/src/androidTest/java/com/qiniu/android/TestConfig.java +++ b/library/src/androidTest/java/com/qiniu/android/TestConfig.java @@ -10,24 +10,24 @@ public final class TestConfig { // TODO: 2020-05-09 bad token for testPutBytesWithFixedZoneUseBackupDomains // 华东上传凭证 public static final String bucket_z0 = "kodo-phone-zone0-space"; - public static final String token_z0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:tDBTUFicqlZuIh5_Qp0LJeVir7k=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTAtc3BhY2UiLCJkZWFkbGluZSI6MTY5MDc3MzI0NywgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; + public static final String token_z0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:c_5jTva3_WOScZi9vMK9biAV7os=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTAtc3BhY2UiLCJkZWFkbGluZSI6MTY5NTk4MDM2MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; // 华北上传凭证 public static final String bucket_z1 = "kodo-phone-zone1-space"; - public static final String token_z1 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:2dMDOhb4sL3CArNCGDJ_0qCKBMM=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTEtc3BhY2UiLCJkZWFkbGluZSI6MTY5MDc3MzI0NywgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; + public static final String token_z1 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:ydDfsf5x2jWb8eX165DuAMfHH4A=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTEtc3BhY2UiLCJkZWFkbGluZSI6MTY5NTk4MDM2MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; // 华南上传凭证 public static final String bucket_z2 = "kodo-phone-zone2-space"; - public static final String token_z2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:HPoYQEVZai_Cylt4SmPH8i8sDG0=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTItc3BhY2UiLCJkZWFkbGluZSI6MTY5MDc3MzI0NywgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; + public static final String token_z2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:R2JsVQBaOh7pREK453aIH5hmOo8=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZTItc3BhY2UiLCJkZWFkbGluZSI6MTY5NTk4MDM2MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; // 北美上传凭证 public static final String bucket_na0 = "kodo-phone-zone-na0-space"; - public static final String token_na0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:BIfK7vFJcfokzbCYzJd6tTjbALs=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1uYTAtc3BhY2UiLCJkZWFkbGluZSI6MTY5MDc3MzI0NywgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; + public static final String token_na0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:oxJPDRhheBnMHbXxIZwOn0nEH0U=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1uYTAtc3BhY2UiLCJkZWFkbGluZSI6MTY5NTk4MDM2MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; // 东南亚上传凭证 public static final String bucket_as0 = "kodo-phone-zone-as0-space"; - public static final String token_as0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:bqaQECyt5IqXEHm54cv_lZl0U-A=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1hczAtc3BhY2UiLCJkZWFkbGluZSI6MTY5MDc3MzI0NywgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; + public static final String token_as0 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:tApkgqOaYzs2WWaJKfJIsDhv_CE=:eyJzY29wZSI6ImtvZG8tcGhvbmUtem9uZS1hczAtc3BhY2UiLCJkZWFkbGluZSI6MTY5NTk4MDM2MiwgInJldHVybkJvZHkiOiJ7XCJmb29cIjokKHg6Zm9vKSwgXCJiYXJcIjokKHg6YmFyKSwgXCJtaW1lVHlwZVwiOiQobWltZVR5cGUpLCBcImhhc2hcIjokKGV0YWcpLCBcImtleVwiOiQoa2V5KSwgXCJmbmFtZVwiOiQoZm5hbWUpLCBcImZzaXplXCI6JChmc2l6ZSl9In0="; // 华北浙江2上传凭证 public static final String bucket_cn_east_2 = "kodo-phone-cn-east-2"; - public static final String token_cn_east_2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:a_z-7Ik-iwr9EOErAFmYzevmlfw=:eyJzY29wZSI6ImtvZG8tcGhvbmUtY24tZWFzdC0yIiwiZGVhZGxpbmUiOjE2OTA3NzMyNDcsICJyZXR1cm5Cb2R5Ijoie1wiZm9vXCI6JCh4OmZvbyksIFwiYmFyXCI6JCh4OmJhciksIFwibWltZVR5cGVcIjokKG1pbWVUeXBlKSwgXCJoYXNoXCI6JChldGFnKSwgXCJrZXlcIjokKGtleSksIFwiZm5hbWVcIjokKGZuYW1lKSwgXCJmc2l6ZVwiOiQoZnNpemUpfSJ9"; - public static final String invalidBucketToken = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:h9Ws_jPrgYhFGgz9LmIai8FB4-c=:eyJzY29wZSI6InpvbmVfaW52YWxpZCIsImRlYWRsaW5lIjoxNjkwNzczMjQ3LCAicmV0dXJuQm9keSI6IntcImZvb1wiOiQoeDpmb28pLCBcImJhclwiOiQoeDpiYXIpLCBcIm1pbWVUeXBlXCI6JChtaW1lVHlwZSksIFwiaGFzaFwiOiQoZXRhZyksIFwia2V5XCI6JChrZXkpLCBcImZuYW1lXCI6JChmbmFtZSksIFwiZnNpemVcIjokKGZzaXplKX0ifQ=="; - + public static final String token_cn_east_2 = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:7DoLnAmoeZQZw0NnF7221j_ro-s=:eyJzY29wZSI6ImtvZG8tcGhvbmUtY24tZWFzdC0yIiwiZGVhZGxpbmUiOjE2OTU5ODAzNjIsICJyZXR1cm5Cb2R5Ijoie1wiZm9vXCI6JCh4OmZvbyksIFwiYmFyXCI6JCh4OmJhciksIFwibWltZVR5cGVcIjokKG1pbWVUeXBlKSwgXCJoYXNoXCI6JChldGFnKSwgXCJrZXlcIjokKGtleSksIFwiZm5hbWVcIjokKGZuYW1lKSwgXCJmc2l6ZVwiOiQoZnNpemUpfSJ9"; + public static final String invalidBucketToken = "dxVQk8gyk3WswArbNhdKIwmwibJ9nFsQhMNUmtIM:GmHSNf0RubeaWvjc4P7fTHWzBmI=:eyJzY29wZSI6InpvbmVfaW52YWxpZCIsImRlYWRsaW5lIjoxNjk1OTgwMzYyLCAicmV0dXJuQm9keSI6IntcImZvb1wiOiQoeDpmb28pLCBcImJhclwiOiQoeDpiYXIpLCBcIm1pbWVUeXBlXCI6JChtaW1lVHlwZSksIFwiaGFzaFwiOiQoZXRhZyksIFwia2V5XCI6JChrZXkpLCBcImZuYW1lXCI6JChmbmFtZSksIFwiZnNpemVcIjokKGZzaXplKX0ifQ=="; + // ----------- public static final String ak = "bjtWBQXrcxgo7HWwlC_bgHg81j352_GhgBGZPeOW"; From 21fff2478465f0e46bbadd071582e7fcc242c065 Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Tue, 1 Aug 2023 18:36:38 +0800 Subject: [PATCH 06/40] change gradle.properties: config jvm --- library/gradle.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/gradle.properties b/library/gradle.properties index 6ea37a46..a772ef80 100755 --- a/library/gradle.properties +++ b/library/gradle.properties @@ -2,4 +2,5 @@ POM_NAME=qiniu-android-sdk-library POM_ARTIFACT_ID=qiniu-android-sdk POM_PACKAGING=aar android.debug.obsoleteApi=true -android.enableAapt2=false \ No newline at end of file +android.enableAapt2=false +org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 \ No newline at end of file From 5f060f7504a962fb9b1854d6eaa0509886b1a6ae Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Wed, 2 Aug 2023 10:41:39 +0800 Subject: [PATCH 07/40] change test case --- .../java/com/qiniu/android/storage/UploadBaseTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/androidTest/java/com/qiniu/android/storage/UploadBaseTest.java b/library/src/androidTest/java/com/qiniu/android/storage/UploadBaseTest.java index c54e62c6..61da3f27 100644 --- a/library/src/androidTest/java/com/qiniu/android/storage/UploadBaseTest.java +++ b/library/src/androidTest/java/com/qiniu/android/storage/UploadBaseTest.java @@ -171,7 +171,7 @@ public boolean shouldWait() { LogUtil.d("=== upload file type:" + file.type() + " response key:" + (key != null ? key : "") + " response:" + completeInfo.responseInfo); assertTrue(completeInfo.responseInfo.toString(), completeInfo.responseInfo != null); assertTrue(completeInfo.responseInfo.toString(), completeInfo.responseInfo.statusCode == statusCode); - assertTrue(completeInfo.responseInfo.toString(), verifyUploadKey(key, completeInfo.key)); + assertEquals(completeInfo.responseInfo.toString(), key, completeInfo.key); // 成功验证 etag if (statusCode == ResponseInfo.RequestSuccess) { From 13ba1e50edb0f0810d19bd6dc3222cf6e17083f6 Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Wed, 2 Aug 2023 11:03:56 +0800 Subject: [PATCH 08/40] update mvn_push.gradle --- mvn_push.gradle | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mvn_push.gradle b/mvn_push.gradle index ac717d8a..ea28ad91 100644 --- a/mvn_push.gradle +++ b/mvn_push.gradle @@ -71,10 +71,6 @@ publishing { artifact(androidSourcesJar) artifact(androidJavadocsJar) - afterEvaluate { - from components.release - } - pom { name = POM_NAME description = POM_DESCRIPTION From 8608aa233baffe9df402ca02f24d3a95950225a5 Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Wed, 2 Aug 2023 16:27:11 +0800 Subject: [PATCH 09/40] update test case --- .../storage/ComplexUploadSceneTest.java | 8 ++++---- .../storage/ConcurrentResumeUploadTest.java | 12 ++++++------ .../qiniu/android/storage/FormUploadTest.java | 8 ++++---- .../android/storage/ResumeUploadTest.java | 18 +++++++++--------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/library/src/androidTest/java/com/qiniu/android/storage/ComplexUploadSceneTest.java b/library/src/androidTest/java/com/qiniu/android/storage/ComplexUploadSceneTest.java index 3b1c6407..93036dfa 100644 --- a/library/src/androidTest/java/com/qiniu/android/storage/ComplexUploadSceneTest.java +++ b/library/src/androidTest/java/com/qiniu/android/storage/ComplexUploadSceneTest.java @@ -23,13 +23,13 @@ public class ComplexUploadSceneTest extends UploadBaseTest { @Test public void testMutiUploadV1() { - final int maxCount = 40; + final int maxCount = 8; final TestParam param = new TestParam(); param.completeCount = 0; param.successCount = 0; - final int start = 37; + final int start = 1; for (int i = start; i < maxCount; i++) { Configuration config = new Configuration.Builder() .resumeUploadVersion(Configuration.RESUME_UPLOAD_VERSION_V1) @@ -78,13 +78,13 @@ public void complete(String key, ResponseInfo info, JSONObject response) { @Test public void testMutiUploadV2() { - final int maxCount = 40; + final int maxCount = 8; final TestParam param = new TestParam(); param.completeCount = 0; param.successCount = 0; - final int start = 37; + final int start = 1; for (int i = start; i < maxCount; i++) { Configuration config = new Configuration.Builder() .resumeUploadVersion(Configuration.RESUME_UPLOAD_VERSION_V2) diff --git a/library/src/androidTest/java/com/qiniu/android/storage/ConcurrentResumeUploadTest.java b/library/src/androidTest/java/com/qiniu/android/storage/ConcurrentResumeUploadTest.java index 7576d200..7e8cad9e 100644 --- a/library/src/androidTest/java/com/qiniu/android/storage/ConcurrentResumeUploadTest.java +++ b/library/src/androidTest/java/com/qiniu/android/storage/ConcurrentResumeUploadTest.java @@ -66,7 +66,7 @@ public void testHttpV1() { .resumeUploadVersion(Configuration.RESUME_UPLOAD_VERSION_V1) .useConcurrentResumeUpload(true) .build(); - int[] sizeArray = {500, 1000, 3000, 4000, 5000, 8000, 10000, 20000}; + int[] sizeArray = {500, 4000, 8000, 20000}; for (int size : sizeArray) { String key = "android_concurrent_resume_http_v1_new_" + size + "k"; try { @@ -86,7 +86,7 @@ public void testHttpsV1() { .useConcurrentResumeUpload(true) .useHttps(true) .build(); - int[] sizeArray = {500, 1000, 3000, 4000, 5000, 8000, 10000, 20000}; + int[] sizeArray = {10000}; for (int size : sizeArray) { String key = "android_concurrent_resume_https_v1_new_" + size + "k"; try { @@ -107,7 +107,7 @@ public void testReuploadV1() { .useHttps(true) .chunkSize(1024 * 1024) .build(); - int[] sizeArray = {30000}; + int[] sizeArray = {20000}; for (int size : sizeArray) { String key = "android_concurrent_resume_reupload_v1_" + size + "k"; try { @@ -182,7 +182,7 @@ public void testSwitchRegionV2() { .chunkSize(4 * 1024 * 1024) .useHttps(true) .build(); - int[] sizeArray = {5000, 8000, 10000, 20000}; + int[] sizeArray = {20000}; for (int size : sizeArray) { String key = "android_concurrent_resume_switch_region_v2_" + size + "k"; try { @@ -224,7 +224,7 @@ public void testHttpV2() { .useConcurrentResumeUpload(true) .chunkSize(4 * 1024 * 1024) .build(); - int[] sizeArray = {500, 2000, 4000, 5000, 8000, 20000}; + int[] sizeArray = {20000}; long timestamp = new Date().getTime(); for (int size : sizeArray) { String key = "android_concurrent_resume_http_v2_" + timestamp + "_" + size + "k"; @@ -246,7 +246,7 @@ public void testHttpsV2() { .useHttps(true) .chunkSize(4 * 1024 * 1024) .build(); - int[] sizeArray = {500, 2000, 4000, 5000, 8000, 20000}; + int[] sizeArray = {20000}; for (int size : sizeArray) { String key = "android_concurrent_resume_https_v2_" + size + "k"; try { diff --git a/library/src/androidTest/java/com/qiniu/android/storage/FormUploadTest.java b/library/src/androidTest/java/com/qiniu/android/storage/FormUploadTest.java index b4501910..b35c408e 100644 --- a/library/src/androidTest/java/com/qiniu/android/storage/FormUploadTest.java +++ b/library/src/androidTest/java/com/qiniu/android/storage/FormUploadTest.java @@ -26,7 +26,7 @@ public void testSwitchRegion() { .useConcurrentResumeUpload(false) .useHttps(true) .build(); - int[] sizeArray = {5, 50, 200, 500, 800, 1000, 2000, 3000, 4000}; + int[] sizeArray = {5, 50, 200, 800, 2000, 4000}; for (int size : sizeArray) { String key = "android_Form_switch_region_" + size + "k"; File file = null; @@ -51,7 +51,7 @@ public void testCancel() { .useConcurrentResumeUpload(false) .useHttps(true) .build(); - int[] sizeArray = {2000, 3000, 4000}; + int[] sizeArray = {2000, 4000}; for (int size : sizeArray) { String key = "android_form_cancel_" + size + "k"; File file = null; @@ -70,7 +70,7 @@ public void testHttp() { .resumeUploadVersion(Configuration.RESUME_UPLOAD_VERSION_V1) .useConcurrentResumeUpload(true) .build(); - int[] sizeArray = {500, 1000, 3000, 4000, 5000, 8000, 10000, 20000}; + int[] sizeArray = {500, 3000, 4000}; for (int size : sizeArray) { String key = "android_form_http" + size + "k"; File file = null; @@ -90,7 +90,7 @@ public void testHttps() { .useConcurrentResumeUpload(true) .useHttps(true) .build(); - int[] sizeArray = {500, 1000, 3000, 4000, 5000, 8000, 10000, 20000}; + int[] sizeArray = {500, 1000, 3000, 4000}; for (int size : sizeArray) { String key = "android_form_https" + size + "k"; File file = null; diff --git a/library/src/androidTest/java/com/qiniu/android/storage/ResumeUploadTest.java b/library/src/androidTest/java/com/qiniu/android/storage/ResumeUploadTest.java index b412676a..2bcff02f 100644 --- a/library/src/androidTest/java/com/qiniu/android/storage/ResumeUploadTest.java +++ b/library/src/androidTest/java/com/qiniu/android/storage/ResumeUploadTest.java @@ -44,7 +44,7 @@ public void testCancelV1() { .useConcurrentResumeUpload(false) .useHttps(true) .build(); - int[] sizeArray = {10000, 20000}; + int[] sizeArray = {10000}; for (int size : sizeArray) { String key = "android_resume_cancel_v1_" + size + "k"; try { @@ -63,7 +63,7 @@ public void testHttpV1() { .resumeUploadVersion(Configuration.RESUME_UPLOAD_VERSION_V1) .useConcurrentResumeUpload(false) .build(); - int[] sizeArray = {500, 1000, 3000, 4000, 5000, 8000, 10000, 20000}; + int[] sizeArray = {10000}; for (int size : sizeArray) { String key = "android_resume_http_v1_" + size + "k"; try { @@ -83,7 +83,7 @@ public void testHttpsV1() { .useConcurrentResumeUpload(false) .useHttps(true) .build(); - int[] sizeArray = {500, 3000, 4000, 7000, 10000, 20000}; + int[] sizeArray = {20000}; for (int size : sizeArray) { String key = "android_resume_https_v1_" + size + "k"; try { @@ -103,7 +103,7 @@ public void testReuploadV1() { .useConcurrentResumeUpload(false) .chunkSize(1024 * 1024) .build(); - int[] sizeArray = {30000}; + int[] sizeArray = {20000}; for (int size : sizeArray) { String key = "android_resume_reupload_v1_" + size + "k"; try { @@ -209,7 +209,7 @@ public void testSwitchRegionV2() { .chunkSize(4 * 1024 * 1024) .useHttps(true) .build(); - int[] sizeArray = {5000, 8000, 10000, 20000}; + int[] sizeArray = {10000}; for (int size : sizeArray) { String key = "android_resume_switch_region_v2_" + size + "k"; try { @@ -231,7 +231,7 @@ public void testCancelV2() { .chunkSize(4 * 1024 * 1024) .useHttps(true) .build(); - int[] sizeArray = {10000, 20000}; + int[] sizeArray = {10000}; for (int size : sizeArray) { String key = "android_resume_cancel_v2_" + size + "k"; try { @@ -251,7 +251,7 @@ public void testHttpV2() { .useConcurrentResumeUpload(false) .chunkSize(4 * 1024 * 1024) .build(); - int[] sizeArray = {500, 1000, 3000, 4000, 5000, 8000, 10000, 20000}; + int[] sizeArray = {10000}; for (int size : sizeArray) { String key = "android_resume_http_v2_" + size + "k"; try { @@ -272,7 +272,7 @@ public void testHttpsV2() { .chunkSize(4 * 1024 * 1024) .useHttps(true) .build(); - int[] sizeArray = {500, 3000, 4000, 7000, 10000, 20000}; + int[] sizeArray = {10000}; for (int size : sizeArray) { String key = "android_resume_https_v2_" + size + "k"; try { @@ -292,7 +292,7 @@ public void testReuploadV2() { .useConcurrentResumeUpload(false) .chunkSize(4 * 1024 * 1024) .build(); - int[] sizeArray = {30000}; + int[] sizeArray = {20000}; for (int size : sizeArray) { String key = "android_resume_reupload_v2_" + size + "k"; try { From 5d734457c1dd0c70d718fc4ff27d841ee477edff Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Mon, 7 Aug 2023 11:25:55 +0800 Subject: [PATCH 10/40] version to 8.6.0 --- CHANGELOG.md | 7 +++ README.md | 43 ++++++++++--------- .../com/qiniu/android/common/Constants.java | 2 +- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 395c29c7..ca5c4679 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ #Changelog +## 8.6.0(2023-08-07) +* 调整: + * 调整在根据 Bucket 获取其所在区域信息时的主备域名顺序 + * 移除亚太-首尔区域 +* 修复: + * 处理 v8.5.3 引用问题 + ## 8.5.3(2023-06-26) * 优化: * 对 Dns 预解析和网络检测中的默认域名进行 Base64 处理 diff --git a/README.md b/README.md index 3e0ca773..7396df93 100644 --- a/README.md +++ b/README.md @@ -14,27 +14,28 @@ https://github.com/qiniudemo/qiniu-lab-android ### 运行环境 | Qiniu SDK 版本 | 最低 Android版本 | 依赖库版本 | -|------------ |-----------------|------------------------| -| 8.5.x | Android 4.0+ | okhttp 4+ | -| 8.4.x | Android 4.0+ | okhttp 4+ | -| 8.3.2 | Android 4.0+ | okhttp 4+ | -| 8.3.1 | Android 4.0+ | okhttp 4+ | -| 8.3.0 | Android 5.0+ | okhttp 4+ | -| 8.2.x | Android 5.0+ | okhttp 4+ | -| 8.1.x | Android 5.0+ | okhttp 4+ | -| 8.0.x | Android 5.0+ | okhttp 4+ | -| 7.7.x | Android 5.0+ | okhttp 4+ | -| 7.6.x | Android 5.0+ | okhttp 4+ | -| 7.5.x | Android 5.0+ | okhttp 4+ | -| 7.4.6 | Android 4.0+ | okhttp 3.12.6 | -| 7.3.x | Android 2.3+ | okhttp 3.11.0 | -| 7.2.x | Android 2.3+ | okhttp 3+ | -| 7.1.x | Android 2.3+ | okhttp 2.6+ | -| 7.0.8,7.0.9 | Android 2.2+ | android-async-http 1.4.9 | -| 7.0.7 | Android 2.2+ | android-async-http 1.4.8 | +|--------------|-----------------|------------------------| +| 8.6.x | Android 4.0+ | okhttp 4+ | +| 8.5.x | Android 4.0+ | okhttp 4+ | +| 8.4.x | Android 4.0+ | okhttp 4+ | +| 8.3.2 | Android 4.0+ | okhttp 4+ | +| 8.3.1 | Android 4.0+ | okhttp 4+ | +| 8.3.0 | Android 5.0+ | okhttp 4+ | +| 8.2.x | Android 5.0+ | okhttp 4+ | +| 8.1.x | Android 5.0+ | okhttp 4+ | +| 8.0.x | Android 5.0+ | okhttp 4+ | +| 7.7.x | Android 5.0+ | okhttp 4+ | +| 7.6.x | Android 5.0+ | okhttp 4+ | +| 7.5.x | Android 5.0+ | okhttp 4+ | +| 7.4.6 | Android 4.0+ | okhttp 3.12.6 | +| 7.3.x | Android 2.3+ | okhttp 3.11.0 | +| 7.2.x | Android 2.3+ | okhttp 3+ | +| 7.1.x | Android 2.3+ | okhttp 2.6+ | +| 7.0.8,7.0.9 | Android 2.2+ | android-async-http 1.4.9 | +| 7.0.7 | Android 2.2+ | android-async-http 1.4.8 | ### 注意 -* 推荐使用最新版:8.5.3 +* 推荐使用最新版:8.6.0 * 7.6.2 ~ 8.3.2 AndroidNetwork.getMobileDbm()可以获取手机信号强度,需要如下权限(API>=18时生效) ``` @@ -53,10 +54,10 @@ https://github.com/qiniudemo/qiniu-lab-android * Android Studio中添加dependencies 或者 在项目中添加maven依赖 ``` // 1. 直接导入 -implementation 'com.qiniu:qiniu-android-sdk:8.5.+' +implementation 'com.qiniu:qiniu-android-sdk:8.6.+' // 2. 如果要修改okhttp依赖的版本,可采用以下方式(强烈建议使用七牛库依赖的okhttp版本) -implementation ('com.qiniu:qiniu-android-sdk:8.5.+'){ +implementation ('com.qiniu:qiniu-android-sdk:8.6.+'){ exclude (group: 'com.squareup.okhttp3', module: 'okhttp') } implementation 'com.squareup.okhttp3:okhttp:4.9.1' diff --git a/library/src/main/java/com/qiniu/android/common/Constants.java b/library/src/main/java/com/qiniu/android/common/Constants.java index 787afc7b..73d0fd2d 100644 --- a/library/src/main/java/com/qiniu/android/common/Constants.java +++ b/library/src/main/java/com/qiniu/android/common/Constants.java @@ -2,7 +2,7 @@ public final class Constants { - public static final String VERSION = "8.5.3.1"; + public static final String VERSION = "8.6.0"; public static final String UTF_8 = "utf-8"; } From 0f28b16e1243ce84ea07e62d650939557eecb594 Mon Sep 17 00:00:00 2001 From: YangSen-qn Date: Mon, 9 Oct 2023 16:31:40 +0800 Subject: [PATCH 11/40] change publish --- .idea/gradle.xml | 2 +- .idea/misc.xml | 3 +-- library/build.gradle | 3 +-- mvn_push.gradle | 32 +++++++++++++++++++++++--------- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 0bd91d96..78c5d9c8 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -7,7 +7,7 @@