Skip to content

Commit 32cccb0

Browse files
author
jordanqin
committed
update qcloud sdk to 5.9.9
1 parent dcbb2f1 commit 32cccb0

File tree

794 files changed

+1560
-5515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

794 files changed

+1560
-5515
lines changed

QCloudCosXml/cos-android-base/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ android {
6363

6464
dependencies {
6565
compileOnly 'androidx.appcompat:appcompat:1.2.0'
66-
testCompileOnly 'junit:junit:4.13'
66+
testCompileOnly 'junit:junit:4.13.2'
6767

6868
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
6969
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

QCloudCosXml/cos-android-base/local.properties

Lines changed: 0 additions & 8 deletions
This file was deleted.

QCloudCosXml/cos-android-ktx/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dependencies {
5151
compileOnly 'xerces:xercesImpl:2.12.0'
5252

5353

54-
androidTestImplementation 'junit:junit:4.13'
54+
androidTestImplementation 'junit:junit:4.13.2'
5555
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.4"
5656
androidTestImplementation 'androidx.test:runner:1.2.0'
5757
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

QCloudCosXml/cos-android-tiny/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ android {
8282
dependencies {
8383

8484
compileOnly 'androidx.appcompat:appcompat:1.2.0'
85-
testCompileOnly 'junit:junit:4.13'
85+
testCompileOnly 'junit:junit:4.13.2'
8686
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
8787
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
8888
androidTestImplementation 'com.android.support.test:rules:1.0.2'

QCloudCosXml/cos-android/build.gradle

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ android {
3434
consumerProguardFiles 'proguard-rules.pro'
3535
}
3636

37-
37+
testOptions {
38+
unitTests.all {
39+
setIgnoreFailures(true)
40+
}
41+
}
3842

3943
buildTypes {
4044

@@ -91,7 +95,6 @@ android {
9195
targetCompatibility = JavaVersion.VERSION_1_7
9296
}
9397
buildToolsVersion = '28.0.2'
94-
9598
}
9699

97100
fataar {
@@ -107,14 +110,18 @@ fataar {
107110

108111
dependencies {
109112
compileOnly 'androidx.appcompat:appcompat:1.2.0'
110-
testCompileOnly 'junit:junit:4.13'
113+
testCompileOnly 'junit:junit:4.13.2'
111114

112115
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
113116
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
114117
androidTestImplementation 'com.android.support.test:rules:1.0.2'
118+
androidTestImplementation 'androidx.core:core:1.0.0'
115119

116120
androidTestCompileOnly project(path: ':cos-android')
117121
androidTestCompileOnly project(path: ':cos-android-base')
122+
// kms 加密
123+
androidTestImplementation 'com.tencentcloudapi:tencentcloud-sdk-java-kms:3.1.213'
124+
androidTestImplementation 'xerces:xercesImpl:2.12.0'
118125

119126
// if (compileQuic() && false) {
120127
// api project(path: ':quic')

QCloudCosXml/cos-android/jacoco.gradle

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jacoco {
2828
}
2929

3030
task jacocoCreateNormalDebugCoverageReport(type: JacocoReport, dependsOn: 'connectedNormalDebugAndroidTest') {
31+
//跑过单测后 可以直接执行,不依赖connectedNormalDebugAndroidTest 否则会又跑一次
3132
//task jacocoCreateNormalDebugCoverageReport(type: JacocoReport) {
3233
group = "verification"
3334
reports {
@@ -36,15 +37,23 @@ task jacocoCreateNormalDebugCoverageReport(type: JacocoReport, dependsOn: 'conne
3637
}
3738

3839
def classTree = fileTree(dir: "${buildDir}/intermediates/javac/normalDebug/compileNormalDebugJavaWithJavac/classes",
39-
excludes: ['com/tencent/cos/xml/transfer/UploadService*',
40-
'com/tencent/cos/xml/transfer/Downloader*',
41-
'com/tencent/cos/xml/transfer/CopyObjectService*',
42-
'com/tencent/cos/xml/BeaconService.class',
43-
'com/tencent/cos/xml/model/tag/eventstreaming/**',
44-
'com/tencent/cos/xml/s3',
45-
'com/tencent/cos/xml/utils',
46-
'**/*$$XmlAdapter.class',
47-
"**/*ChildElementBinder*"])
40+
excludes: [
41+
'com/tencent/qmsp/**',
42+
'com/tencent/qimei/**',
43+
'com/tencent/beacon/**',
44+
// 'com/tencent/cos/xml/crypto/**',
45+
'com/tencent/cos/xml/transfer/UploadService*',
46+
'com/tencent/cos/xml/transfer/Downloader*',
47+
'com/tencent/cos/xml/transfer/CopyObjectService*',
48+
// 'com/tencent/cos/xml/BeaconService.class',
49+
// 'com/tencent/cos/xml/model/tag/eventstreaming/**',
50+
// 'com/tencent/cos/xml/s3',
51+
// 'com/tencent/cos/xml/utils',
52+
'**/*BuildConfig.class',
53+
// '**/*$$XmlAdapter.*',
54+
// '**/*$$XmlAdapter$*.*',
55+
// "**/*ChildElementBinder*"
56+
])
4857
classDirectories.setFrom(files([classTree]))
4958

5059
def executionTree = fileTree(dir: "${buildDir}/outputs/code_coverage/normalDebugAndroidTest/connected/")

QCloudCosXml/cos-android/local.properties

Lines changed: 0 additions & 8 deletions
This file was deleted.

QCloudCosXml/cos-android/src/androidTest/AndroidManifest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232
android:networkSecurityConfig="@xml/network_security_config"
3333
android:supportsRtl="true">
3434

35+
<provider
36+
android:name="androidx.core.content.FileProvider"
37+
android:authorities="${applicationId}.fileProvider"
38+
android:exported="false"
39+
android:grantUriPermissions="true">
40+
<meta-data
41+
android:name="android.support.FILE_PROVIDER_PATHS"
42+
android:resource="@xml/file_paths"/>
43+
</provider>
3544
</application>
3645

3746
</manifest>

QCloudCosXml/cos-android/src/androidTest/java/com/tencent/cos/xml/cdn/CdnDownloadTest.java

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ private String cdnSign(String path, long timestamp, String rand, String key) {
5656
return "";
5757
}
5858

59-
@Test
60-
public void testMd5() {
61-
62-
String str = "/test.jpg-1595236205-c2iglbgtdni-0-b8ejrafcq7ax6y1pn1iw84cgu6";
63-
try {
64-
Assert.assertEquals("d36876815a07df86a37176b2a15289e6", TestUtils.getMD5(str));
65-
} catch (Exception e) {
66-
e.printStackTrace();
67-
Assert.fail(e.getMessage());
68-
}
69-
}
70-
7159
@Test
7260
public void testHeadObject() {
7361
if (!testCdn) {
@@ -85,7 +73,7 @@ public void testHeadObject() {
8573
String key = TestConst.PERSIST_BUCKET_CDN_SIGN;
8674

8775
Map<String, String> paras = new HashMap<>();
88-
String sign = cdnSign(path, timestamp, rand, key);
76+
String sign = cdnSign("/"+path, timestamp, rand, key);
8977
paras.put("sign", String.format("%d-%s-0-%s", timestamp, rand, sign));
9078
headObjectRequest.setQueryParameters(paras);
9179

@@ -116,7 +104,6 @@ public void testHeadObject() {
116104

117105
CosXmlSimpleService cosXmlService = ServiceFactory.INSTANCE.newCDNService();
118106

119-
String bucket = TestConst.PERSIST_BUCKET;
120107
String path = TestConst.PERSIST_BUCKET_PIC_PATH;
121108

122109
///String path = TestConst.PERSIST_BUCKET_SMALL_OBJECT_PATH;
@@ -130,7 +117,7 @@ public void testHeadObject() {
130117

131118

132119
Map<String, String> paras = new HashMap<>();
133-
String sign = cdnSign(path, timestamp, rand, key);
120+
String sign = cdnSign("/"+path, timestamp, rand, key);
134121
paras.put("sign", String.format("%d-%s-0-%s", timestamp, rand, sign));
135122
getObjectRequest.setQueryParameters(paras);
136123

@@ -172,7 +159,7 @@ public void testHeadObject() {
172159

173160

174161
Map<String, String> paras = new HashMap<>();
175-
String sign = cdnSign(path, timestamp, rand, key);
162+
String sign = cdnSign("/"+path, timestamp, rand, key);
176163
paras.put("sign", String.format("%d-%s-0-%s", timestamp, rand, sign));
177164
getObjectRequest.setQueryParameters(paras);
178165
COSXMLDownloadTask downloadTask = transferManager.download(TestUtils.getContext(), getObjectRequest);

QCloudCosXml/cos-android/src/androidTest/java/com/tencent/cos/xml/core/TestConst.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public class TestConst {
2626
public static final String PERSIST_BUCKET_SELECT_JSON_PATH = "do_not_remove/select.json";
2727
public static final String PERSIST_BUCKET_SELECT_CSV_PATH = "do_not_remove/select.csv";
2828
public static final String PERSIST_BUCKET_DOCUMENT_PATH = "do_not_remove/document.docx";
29+
public static final String PERSIST_BUCKET_DOCUMENT_XLSX_PATH = "do_not_remove/document.xlsx";
30+
public static final String PERSIST_BUCKET_DOCUMENT_TXT_PATH = "do_not_remove/document.txt";
2931
public static final String PERSIST_BUCKET_POST_OBJECT_PATH = "do_not_remove/post_object";
3032
public static final String PERSIST_BUCKET_APPEND_OBJECT_PATH = "do_not_remove/append_object";
3133
public static final String PERSIST_BUCKET_COPY_OBJECT_DST_PATH = "do_not_remove/copy_dst_object";
@@ -53,25 +55,11 @@ public class TestConst {
5355
public static final String ASR_OBJECT_GS_2C = "asr/gs-16b-2c-44100hz.aac";
5456
public static final String ASR_OBJECT_LONG = "asr/aaa.m4a";
5557
public static final String ASR_OBJECT_OUTPUT = "asr/output.txt";
56-
public static final String ASR_QUEUE_ID = "p74b5265ab1df455782b7b355007d0dfc";
57-
58-
//声音识别(极速识别)
59-
public static final String ASR_FLASH_BUCKET_REGION = "ap-chongqing";
60-
public static final String ASR_FLASH_BUCKET = "tinna-media-1253960454";
61-
public static final String ASR_FLASH_OBJECT_FF_1C = "asr/ff-16b-1c-44100hz.aac";
62-
public static final String ASR_FLASH_OBJECT_FF_2C = "asr/ff-16b-2c-44100hz.aac";
63-
public static final String ASR_FLASH_OBJECT_GS_1C = "asr/gs-16b-1c-8000hz.amr";
64-
public static final String ASR_FLASH_OBJECT_GS_2C = "asr/gs-16b-2c-44100hz.aac";
65-
public static final String ASR_FLASH_OBJECT_LONG = "asr/aaa.m4a";
66-
public static final String ASR_FLASH_OBJECT_OUTPUT = "asr/output.txt";
67-
public static final String ASR_FLASH_QUEUE_ID = "pf4bb837618c84b5b905a1df5c8a56d20";
6858

6959
//分词
7060
public static final String WORDS_GENERALIZE_BUCKET_REGION = "ap-chongqing";
7161
public static final String WORDS_GENERALIZE_BUCKET = "tinna-media-1253960454";
72-
public static final String WORDS_GENERALIZE_QUEUE_ID = "p4c62b2f626f347d982d1166695766d26";
7362
public static final String WORDS_GENERALIZE_OBJECT = "test.txt";
74-
public static final String WORDS_GENERALIZE_JOB_ID = "af77abe4a239a11eda0c10f20b65ba637";
7563

7664
public static final long PERSIST_BUCKET_SMALL_OBJECT_SIZE = 1024 * 1024;
7765
public static final long PERSIST_BUCKET_BIG_OBJECT_SIZE = 10 * 1024 * 1024;

0 commit comments

Comments
 (0)