From c604d462245a4c6acd07ac12adc006419d35dcc7 Mon Sep 17 00:00:00 2001 From: JustinZhang <> Date: Thu, 7 Apr 2022 09:54:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E6=94=B9=E5=8F=98lib=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=BB=93=E6=9E=84=EF=BC=8C=E9=80=82=E5=BA=94=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E7=B3=BB=E7=BB=9F=202.=E4=BF=AE=E5=A4=8DForw?= =?UTF-8?q?ardingDrawable=E7=9A=84setBounds=203.=E6=94=B9=E5=8F=98string?= =?UTF-8?q?=E7=9A=84=E5=BC=95=E7=94=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- .../animated/giflite/draw/MovieDrawer.java | 1 + build.gradle | 18 ++++-- drawee/build.gradle | 7 +-- .../drawee/drawable/ForwardingDrawable.java | 12 +++- drawee_backends/build.gradle | 11 ++-- keyframes/build.gradle | 3 +- {keyframes/libs => libs}/gson-release.har | Bin sample_showcase/build.gradle | 10 +-- sample_showcase/src/main/config.json | 59 ++++++------------ .../main/resources/base/element/string.json | 54 +++++++++++++++- 11 files changed, 112 insertions(+), 66 deletions(-) rename {keyframes/libs => libs}/gson-release.har (100%) diff --git a/.gitignore b/.gitignore index ba7fcb28b..77bd54b1e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ Gemfile.lock _site/ run_comparison.py .clang-tidy -/.clang-tidy \ No newline at end of file +/.clang-tidy +./upload.gradle \ No newline at end of file diff --git a/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java b/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java index b057bda07..ced085f91 100644 --- a/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java +++ b/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java @@ -10,6 +10,7 @@ import com.oszc.bbhmlibrary.utils.CommonUtils; import com.oszc.bbhmlibrary.utils.LogUtil; import ohos.agp.render.Canvas; import ohos.agp.render.Paint; +import ohos.agp.render.PixelMapHolder; import ohos.agp.utils.RectFloat; import ohos.media.image.ImagePacker; import ohos.media.image.PixelMap; diff --git a/build.gradle b/build.gradle index 9b0fc931d..c5a5a0618 100644 --- a/build.gradle +++ b/build.gradle @@ -31,11 +31,17 @@ buildscript { jcenter() } dependencies { - classpath 'com.huawei.ohos:hap:2.4.2.7' - classpath 'com.huawei.ohos:decctest:1.0.0.6' + classpath 'com.huawei.ohos:hap:3.0.5.2' + classpath 'com.huawei.ohos:decctest:1.2.7.2' } } - +/* +legacyApkOptions{ + legacyApk ".\\build\\legacy_entry.apk" + legacyVersionCode "1" + legacyVersionName "1" +} + */ allprojects { repositories { maven { @@ -45,11 +51,15 @@ allprojects { url 'https://developer.huawei.com/repo/' } mavenCentral() + repositories { + flatDir { + dir '../libs' + } + } jcenter() } } -apply plugin: 'maven' apply plugin: 'maven-publish' def tagMap = [ui : "UI", animation: "Animation", security: "Security", tool: "Tool", diff --git a/drawee/build.gradle b/drawee/build.gradle index 32a4f8773..899d97d80 100644 --- a/drawee/build.gradle +++ b/drawee/build.gradle @@ -6,7 +6,7 @@ if (file("../upload.gradle").exists()) { rootProject.ext{ DEFAULT_GROUP_ID = 'io.openharmony.tpc.thirdlib' DEFAULT_ARTIFACT_ID = 'drawee' - DEFAULT_VERSION = '1.0.1' + DEFAULT_VERSION = '1.0.3' } ohos { @@ -16,7 +16,6 @@ ohos { } } - dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) testCompile'junit:junit:4.12' @@ -24,6 +23,7 @@ dependencies { compileOnly 'javax.annotation:javax.annotation-api:1.2' compileOnly 'com.facebook.infer.annotation:infer-annotation:0.18.0' + /* implementation project(':fbcore') implementation project(':imagepipeline') implementation project(':imagepipeline_native') @@ -33,8 +33,8 @@ dependencies { implementation project(':ui_common') implementation project(':middleware') implementation project(':bbhmlibrary') + */ - /* implementation ('io.openharmony.tpc.thirdlib:fbcore:1.0.2') implementation ('io.openharmony.tpc.thirdlib:imagepipeline:1.0.2') implementation ('io.openharmony.tpc.thirdlib:imagepipeline_native:1.0.1') @@ -44,5 +44,4 @@ dependencies { implementation ('io.openharmony.tpc.thirdlib:ui_common:1.0.1') implementation ('io.openharmony.tpc.thirdlib:middleware:1.0.1') implementation ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') - */ } \ No newline at end of file diff --git a/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java b/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java index 32307bca3..4c0299d19 100644 --- a/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java +++ b/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java @@ -38,8 +38,16 @@ public class ForwardingDrawable extends RootShapeElement @Override public void setBounds(int left, int top, int right, int bottom) { - super.setBounds(left, top, right, bottom); - mBouns = new Rect(left, top, right, bottom); + //super.setBounds(left, top, right, bottom); + if(mBouns == null){ + mBouns = new Rect(left, top, right, bottom); + }else{ + mBouns.left = left; + mBouns.top = top; + mBouns.right = right; + mBouns.bottom = bottom; + } + setBounds(mBouns); } private @Nullable Element mCurrentDelegate; diff --git a/drawee_backends/build.gradle b/drawee_backends/build.gradle index 0eddab540..499699f08 100644 --- a/drawee_backends/build.gradle +++ b/drawee_backends/build.gradle @@ -7,11 +7,9 @@ if (file("../upload.gradle").exists()) { rootProject.ext{ DEFAULT_GROUP_ID = 'io.openharmony.tpc.thirdlib' DEFAULT_ARTIFACT_ID = 'fresco' - DEFAULT_VERSION = '1.0.1' + DEFAULT_VERSION = '1.0.3' } - - ohos { compileSdkVersion rootProject.ext.compileVersion defaultConfig { @@ -26,6 +24,7 @@ dependencies { implementation "com.facebook.soloader:nativeloader:0.9.0" + /* implementation project(':ui_common') api project(':fbcore') api project(':drawee') @@ -37,12 +36,11 @@ dependencies { api project(':native_filters') api project(':native_imagetranscoder') api project(':bbhmlibrary') + */ - /* implementation ('io.openharmony.tpc.thirdlib:ui_common:1.0.1') - implementation ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') api ('io.openharmony.tpc.thirdlib:fbcore:1.0.2') - api ('io.openharmony.tpc.thirdlib:drawee:1.0.1') + api ('io.openharmony.tpc.thirdlib:drawee:1.0.3') api ('io.openharmony.tpc.thirdlib:imagepipeline:1.0.2') api ('io.openharmony.tpc.thirdlib:imagepipeline_native:1.0.1') api ('io.openharmony.tpc.thirdlib:memory_types_ashmem:1.0.1') @@ -51,6 +49,5 @@ dependencies { api ('io.openharmony.tpc.thirdlib:native_filters:1.0.1') api ('io.openharmony.tpc.thirdlib:native_imagetranscoder:1.0.2') api ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') - */ testCompile'junit:junit:4.12' } \ No newline at end of file diff --git a/keyframes/build.gradle b/keyframes/build.gradle index 007f09946..c1f8b5f50 100644 --- a/keyframes/build.gradle +++ b/keyframes/build.gradle @@ -17,6 +17,7 @@ ohos { } dependencies { - implementation fileTree(dir: 'libs', include: ['*.har','*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation(name:'gson-release', ext:'har') testCompile 'junit:junit:4.12' } diff --git a/keyframes/libs/gson-release.har b/libs/gson-release.har similarity index 100% rename from keyframes/libs/gson-release.har rename to libs/gson-release.har diff --git a/sample_showcase/build.gradle b/sample_showcase/build.gradle index 411a9ffee..4b1ac8a36 100644 --- a/sample_showcase/build.gradle +++ b/sample_showcase/build.gradle @@ -13,6 +13,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) + /* implementation project(':drawee_backends') implementation project(':imagepipeline_native') implementation project(':memory_types_nativememory') @@ -22,14 +23,13 @@ dependencies { implementation project(':keyframes') compile project(path: ':animated_gif_lite') compile project(path: ':gif') + */ + - /* implementation project(':matisselib') - implementation ('io.openharmony.tpc.thirdlib:fresco:1.0.0') + implementation ('io.openharmony.tpc.thirdlib:fresco:1.0.3') implementation('io.openharmony.tpc.thirdlib:animated_gif_lite:1.0.1') implementation('io.openharmony.tpc.thirdlib:Keyframes:1.0.0') - //implementation('io.openharmony.tpc.thirdlib:Matisse:1.0.0') - implementation('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.0') - */ + implementation('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') } diff --git a/sample_showcase/src/main/config.json b/sample_showcase/src/main/config.json index a40f97ca7..6fa36712b 100644 --- a/sample_showcase/src/main/config.json +++ b/sample_showcase/src/main/config.json @@ -103,7 +103,8 @@ "distro": { "deliveryWithInstall": true, "moduleName": "sample_showcase", - "moduleType": "entry" + "moduleType": "entry", + "installationFree": true }, "abilities": [ { @@ -118,40 +119,36 @@ } ], "orientation": "unspecified", - "formEnabled": false, "name": ".MainAbility", "visible": true, "icon": "$media:icon", "description": "$string:mainability_description", - "label": "fresco", + "label": "$string:fresco", "type": "page", "launchType": "standard" }, { "orientation": "unspecified", "visible": false, - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeSimpleAbility", "icon": "$media:icon", "description": "DrawweeSimpleAbility", - "label": "DrawweeSimpleAbility", + "label": "$string:DrawweeSimpleAbility", "type": "page", "launchType": "standard" }, { "orientation": "unspecified", "visible": false, - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeMediaPickerAbility", "icon": "$media:icon", "description": "DraweeMediaPickerAbility", - "label": "DraweeMediaPickerAbility", + "label": "$string:DraweeMediaPickerAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "visible": false, "name": "com.zhihu.matisse.library.MatisseAbility", "icon": "$media:icon", @@ -163,17 +160,16 @@ ] } ], - "label": "", + "label": "$string:matisseAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.AlbumPreviewAbility", "icon": "$media:icon", "description": "matisseability_description", - "label": "", + "label": "$string:albumPreviewAbility", "type": "page", "skills": [ { @@ -186,11 +182,10 @@ }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.SelectPreviewAbility", "icon": "$media:icon", "description": "matisseability_description", - "label": "", + "label": "$string:selectPreviewAbility", "skills": [ { "actions": [ @@ -203,7 +198,6 @@ }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.CameraAbility", "icon": "$media:icon", "description": "matisseability_description", @@ -214,100 +208,83 @@ ] } ], - "label": "", + "label": "$string:cameraAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeHierarchyAbility", "icon": "$media:icon", "description": "DraweeHierarchyAbility", - "label": "DraweeHierarchyAbility", + "label": "$string:DraweeHierarchyAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeScaleTypeAbility", "icon": "$media:icon", "description": "DraweeScaleTypeAbility", - "label": "DraweeScaleTypeAbility", + "label": "$string:draweeScaleTypeAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeRotationAbility", "icon": "$media:icon", "description": "DraweeRotationAbility", - "label": "DraweeRotationAbility", + "label": "$string:draweeRotationAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeRoundedCornerAbility", "icon": "$media:icon", "description": "DraweeRoundedCorner", - "label": "DraweeRoundedCorner", + "label": "$string:draweeRoundedCorner", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imageformat.ImageFormatGifAbility", "icon": "$media:icon", "description": "DraweeRoundedCorner", - "label": "DraweeRoundedCorner", + "label": "$string:draweeRoundedCorner", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.MultiUriAbility", "icon": "$media:icon", "description": "MultiUriAbility", - "label": "MultiUriAbility", + "label": "$string:multiUriAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imagepipeline.ImagePipelineRegionDecodingAbility", "icon": "$media:icon", "description": "ImagePipelineRegionDecodingAbility", - "label": "ImagePipelineRegionDecodingAbility", + "label": "$string:imagePipelineRegionDecodingAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imagepipeline.ImagePipelineResizingAbility", "icon": "$media:icon", "description": "ImagePipelineRegionDecodingAbility", - "label": "ImagePipelineRegionDecodingAbility", - "type": "page", - "launchType": "standard" - }, - { - "orientation": "portrait", - "formEnabled": false, - "name": "com.facebook.fresco.samples.showcase.imageformat.ImageFormatGifAbility", - "icon": "$media:icon", - "description": "ImageFormatGifAbility", - "label": "ImageFormatGifAbility", + "label": "$string:imagePipelineRegionDecodingAbility", "type": "page", "launchType": "standard" }, + { "icon": "$media:icon", "name": "com.facebook.fresco.samples.showcase.list.ListViewAbility", diff --git a/sample_showcase/src/main/resources/base/element/string.json b/sample_showcase/src/main/resources/base/element/string.json index 17d737b81..02b4bd2e0 100644 --- a/sample_showcase/src/main/resources/base/element/string.json +++ b/sample_showcase/src/main/resources/base/element/string.json @@ -794,7 +794,59 @@ { "name": "drawee_media_picker_button_set_resource_file", "value": "SET RESOURCE FILE" - } + }, + { + "name": "fresco", + "value": "fresco" + }, + { + "name": "DrawweeSimpleAbility", + "value": "fresco" + }, + { + "name": "DraweeMediaPickerAbility", + "value": "DraweeMediaPickerAbility" + }, + { + "name": "DraweeHierarchyAbility", + "value": "DraweeHierarchyAbility" + }, + { + "name": "draweeScaleTypeAbility", + "value": "DraweeScaleTypeAbility" + }, + { + "name": "draweeRotationAbility", + "value": "DraweeRotationAbility" + }, + { + "name": "draweeRoundedCorner", + "value": "DraweeRoundedCorner" + }, + { + "name": "multiUriAbility", + "value": "MultiUriAbility" + }, + { + "name": "imagePipelineRegionDecodingAbility", + "value": "ImagePipelineRegionDecodingAbility" + }, + { + "name": "matisseAbility", + "value": "MatisseAbility" + }, + { + "name": "albumPreviewAbility", + "value": "AlbumPreviewAbility" + }, + { + "name": "selectPreviewAbility", + "value": "SelectPreviewAbility" + }, + { + "name": "cameraAbility", + "value": "CameraAbility" + } ] } \ No newline at end of file -- Gitee From f20d26ff742d00b72cd47a6cfec7ae23a0f70058 Mon Sep 17 00:00:00 2001 From: JustinZhang <> Date: Thu, 7 Apr 2022 09:54:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.=E6=94=B9=E5=8F=98lib=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=BB=93=E6=9E=84=EF=BC=8C=E9=80=82=E5=BA=94=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E7=B3=BB=E7=BB=9F=202.=E4=BF=AE=E5=A4=8DForw?= =?UTF-8?q?ardingDrawable=E7=9A=84setBounds=203.=E6=94=B9=E5=8F=98string?= =?UTF-8?q?=E7=9A=84=E5=BC=95=E7=94=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- .../animated/giflite/draw/MovieDrawer.java | 1 + build.gradle | 11 ++-- drawee/build.gradle | 7 +-- .../drawee/drawable/ForwardingDrawable.java | 12 +++- drawee_backends/build.gradle | 11 ++-- keyframes/build.gradle | 3 +- {keyframes/libs => libs}/gson-release.har | Bin sample_showcase/build.gradle | 10 +-- sample_showcase/src/main/config.json | 59 ++++++------------ .../main/resources/base/element/string.json | 54 +++++++++++++++- 11 files changed, 105 insertions(+), 66 deletions(-) rename {keyframes/libs => libs}/gson-release.har (100%) diff --git a/.gitignore b/.gitignore index ba7fcb28b..77bd54b1e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ Gemfile.lock _site/ run_comparison.py .clang-tidy -/.clang-tidy \ No newline at end of file +/.clang-tidy +./upload.gradle \ No newline at end of file diff --git a/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java b/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java index b057bda07..ced085f91 100644 --- a/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java +++ b/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java @@ -10,6 +10,7 @@ import com.oszc.bbhmlibrary.utils.CommonUtils; import com.oszc.bbhmlibrary.utils.LogUtil; import ohos.agp.render.Canvas; import ohos.agp.render.Paint; +import ohos.agp.render.PixelMapHolder; import ohos.agp.utils.RectFloat; import ohos.media.image.ImagePacker; import ohos.media.image.PixelMap; diff --git a/build.gradle b/build.gradle index 9b0fc931d..e8e0570c2 100644 --- a/build.gradle +++ b/build.gradle @@ -31,11 +31,10 @@ buildscript { jcenter() } dependencies { - classpath 'com.huawei.ohos:hap:2.4.2.7' - classpath 'com.huawei.ohos:decctest:1.0.0.6' + classpath 'com.huawei.ohos:hap:3.0.5.2' + classpath 'com.huawei.ohos:decctest:1.2.7.2' } } - allprojects { repositories { maven { @@ -45,11 +44,15 @@ allprojects { url 'https://developer.huawei.com/repo/' } mavenCentral() + repositories { + flatDir { + dir '../libs' + } + } jcenter() } } -apply plugin: 'maven' apply plugin: 'maven-publish' def tagMap = [ui : "UI", animation: "Animation", security: "Security", tool: "Tool", diff --git a/drawee/build.gradle b/drawee/build.gradle index 32a4f8773..899d97d80 100644 --- a/drawee/build.gradle +++ b/drawee/build.gradle @@ -6,7 +6,7 @@ if (file("../upload.gradle").exists()) { rootProject.ext{ DEFAULT_GROUP_ID = 'io.openharmony.tpc.thirdlib' DEFAULT_ARTIFACT_ID = 'drawee' - DEFAULT_VERSION = '1.0.1' + DEFAULT_VERSION = '1.0.3' } ohos { @@ -16,7 +16,6 @@ ohos { } } - dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) testCompile'junit:junit:4.12' @@ -24,6 +23,7 @@ dependencies { compileOnly 'javax.annotation:javax.annotation-api:1.2' compileOnly 'com.facebook.infer.annotation:infer-annotation:0.18.0' + /* implementation project(':fbcore') implementation project(':imagepipeline') implementation project(':imagepipeline_native') @@ -33,8 +33,8 @@ dependencies { implementation project(':ui_common') implementation project(':middleware') implementation project(':bbhmlibrary') + */ - /* implementation ('io.openharmony.tpc.thirdlib:fbcore:1.0.2') implementation ('io.openharmony.tpc.thirdlib:imagepipeline:1.0.2') implementation ('io.openharmony.tpc.thirdlib:imagepipeline_native:1.0.1') @@ -44,5 +44,4 @@ dependencies { implementation ('io.openharmony.tpc.thirdlib:ui_common:1.0.1') implementation ('io.openharmony.tpc.thirdlib:middleware:1.0.1') implementation ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') - */ } \ No newline at end of file diff --git a/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java b/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java index 32307bca3..4c0299d19 100644 --- a/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java +++ b/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java @@ -38,8 +38,16 @@ public class ForwardingDrawable extends RootShapeElement @Override public void setBounds(int left, int top, int right, int bottom) { - super.setBounds(left, top, right, bottom); - mBouns = new Rect(left, top, right, bottom); + //super.setBounds(left, top, right, bottom); + if(mBouns == null){ + mBouns = new Rect(left, top, right, bottom); + }else{ + mBouns.left = left; + mBouns.top = top; + mBouns.right = right; + mBouns.bottom = bottom; + } + setBounds(mBouns); } private @Nullable Element mCurrentDelegate; diff --git a/drawee_backends/build.gradle b/drawee_backends/build.gradle index 0eddab540..499699f08 100644 --- a/drawee_backends/build.gradle +++ b/drawee_backends/build.gradle @@ -7,11 +7,9 @@ if (file("../upload.gradle").exists()) { rootProject.ext{ DEFAULT_GROUP_ID = 'io.openharmony.tpc.thirdlib' DEFAULT_ARTIFACT_ID = 'fresco' - DEFAULT_VERSION = '1.0.1' + DEFAULT_VERSION = '1.0.3' } - - ohos { compileSdkVersion rootProject.ext.compileVersion defaultConfig { @@ -26,6 +24,7 @@ dependencies { implementation "com.facebook.soloader:nativeloader:0.9.0" + /* implementation project(':ui_common') api project(':fbcore') api project(':drawee') @@ -37,12 +36,11 @@ dependencies { api project(':native_filters') api project(':native_imagetranscoder') api project(':bbhmlibrary') + */ - /* implementation ('io.openharmony.tpc.thirdlib:ui_common:1.0.1') - implementation ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') api ('io.openharmony.tpc.thirdlib:fbcore:1.0.2') - api ('io.openharmony.tpc.thirdlib:drawee:1.0.1') + api ('io.openharmony.tpc.thirdlib:drawee:1.0.3') api ('io.openharmony.tpc.thirdlib:imagepipeline:1.0.2') api ('io.openharmony.tpc.thirdlib:imagepipeline_native:1.0.1') api ('io.openharmony.tpc.thirdlib:memory_types_ashmem:1.0.1') @@ -51,6 +49,5 @@ dependencies { api ('io.openharmony.tpc.thirdlib:native_filters:1.0.1') api ('io.openharmony.tpc.thirdlib:native_imagetranscoder:1.0.2') api ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') - */ testCompile'junit:junit:4.12' } \ No newline at end of file diff --git a/keyframes/build.gradle b/keyframes/build.gradle index 007f09946..c1f8b5f50 100644 --- a/keyframes/build.gradle +++ b/keyframes/build.gradle @@ -17,6 +17,7 @@ ohos { } dependencies { - implementation fileTree(dir: 'libs', include: ['*.har','*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation(name:'gson-release', ext:'har') testCompile 'junit:junit:4.12' } diff --git a/keyframes/libs/gson-release.har b/libs/gson-release.har similarity index 100% rename from keyframes/libs/gson-release.har rename to libs/gson-release.har diff --git a/sample_showcase/build.gradle b/sample_showcase/build.gradle index 411a9ffee..4b1ac8a36 100644 --- a/sample_showcase/build.gradle +++ b/sample_showcase/build.gradle @@ -13,6 +13,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) + /* implementation project(':drawee_backends') implementation project(':imagepipeline_native') implementation project(':memory_types_nativememory') @@ -22,14 +23,13 @@ dependencies { implementation project(':keyframes') compile project(path: ':animated_gif_lite') compile project(path: ':gif') + */ + - /* implementation project(':matisselib') - implementation ('io.openharmony.tpc.thirdlib:fresco:1.0.0') + implementation ('io.openharmony.tpc.thirdlib:fresco:1.0.3') implementation('io.openharmony.tpc.thirdlib:animated_gif_lite:1.0.1') implementation('io.openharmony.tpc.thirdlib:Keyframes:1.0.0') - //implementation('io.openharmony.tpc.thirdlib:Matisse:1.0.0') - implementation('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.0') - */ + implementation('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') } diff --git a/sample_showcase/src/main/config.json b/sample_showcase/src/main/config.json index a40f97ca7..6fa36712b 100644 --- a/sample_showcase/src/main/config.json +++ b/sample_showcase/src/main/config.json @@ -103,7 +103,8 @@ "distro": { "deliveryWithInstall": true, "moduleName": "sample_showcase", - "moduleType": "entry" + "moduleType": "entry", + "installationFree": true }, "abilities": [ { @@ -118,40 +119,36 @@ } ], "orientation": "unspecified", - "formEnabled": false, "name": ".MainAbility", "visible": true, "icon": "$media:icon", "description": "$string:mainability_description", - "label": "fresco", + "label": "$string:fresco", "type": "page", "launchType": "standard" }, { "orientation": "unspecified", "visible": false, - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeSimpleAbility", "icon": "$media:icon", "description": "DrawweeSimpleAbility", - "label": "DrawweeSimpleAbility", + "label": "$string:DrawweeSimpleAbility", "type": "page", "launchType": "standard" }, { "orientation": "unspecified", "visible": false, - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeMediaPickerAbility", "icon": "$media:icon", "description": "DraweeMediaPickerAbility", - "label": "DraweeMediaPickerAbility", + "label": "$string:DraweeMediaPickerAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "visible": false, "name": "com.zhihu.matisse.library.MatisseAbility", "icon": "$media:icon", @@ -163,17 +160,16 @@ ] } ], - "label": "", + "label": "$string:matisseAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.AlbumPreviewAbility", "icon": "$media:icon", "description": "matisseability_description", - "label": "", + "label": "$string:albumPreviewAbility", "type": "page", "skills": [ { @@ -186,11 +182,10 @@ }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.SelectPreviewAbility", "icon": "$media:icon", "description": "matisseability_description", - "label": "", + "label": "$string:selectPreviewAbility", "skills": [ { "actions": [ @@ -203,7 +198,6 @@ }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.CameraAbility", "icon": "$media:icon", "description": "matisseability_description", @@ -214,100 +208,83 @@ ] } ], - "label": "", + "label": "$string:cameraAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeHierarchyAbility", "icon": "$media:icon", "description": "DraweeHierarchyAbility", - "label": "DraweeHierarchyAbility", + "label": "$string:DraweeHierarchyAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeScaleTypeAbility", "icon": "$media:icon", "description": "DraweeScaleTypeAbility", - "label": "DraweeScaleTypeAbility", + "label": "$string:draweeScaleTypeAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeRotationAbility", "icon": "$media:icon", "description": "DraweeRotationAbility", - "label": "DraweeRotationAbility", + "label": "$string:draweeRotationAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeRoundedCornerAbility", "icon": "$media:icon", "description": "DraweeRoundedCorner", - "label": "DraweeRoundedCorner", + "label": "$string:draweeRoundedCorner", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imageformat.ImageFormatGifAbility", "icon": "$media:icon", "description": "DraweeRoundedCorner", - "label": "DraweeRoundedCorner", + "label": "$string:draweeRoundedCorner", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.MultiUriAbility", "icon": "$media:icon", "description": "MultiUriAbility", - "label": "MultiUriAbility", + "label": "$string:multiUriAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imagepipeline.ImagePipelineRegionDecodingAbility", "icon": "$media:icon", "description": "ImagePipelineRegionDecodingAbility", - "label": "ImagePipelineRegionDecodingAbility", + "label": "$string:imagePipelineRegionDecodingAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imagepipeline.ImagePipelineResizingAbility", "icon": "$media:icon", "description": "ImagePipelineRegionDecodingAbility", - "label": "ImagePipelineRegionDecodingAbility", - "type": "page", - "launchType": "standard" - }, - { - "orientation": "portrait", - "formEnabled": false, - "name": "com.facebook.fresco.samples.showcase.imageformat.ImageFormatGifAbility", - "icon": "$media:icon", - "description": "ImageFormatGifAbility", - "label": "ImageFormatGifAbility", + "label": "$string:imagePipelineRegionDecodingAbility", "type": "page", "launchType": "standard" }, + { "icon": "$media:icon", "name": "com.facebook.fresco.samples.showcase.list.ListViewAbility", diff --git a/sample_showcase/src/main/resources/base/element/string.json b/sample_showcase/src/main/resources/base/element/string.json index 17d737b81..02b4bd2e0 100644 --- a/sample_showcase/src/main/resources/base/element/string.json +++ b/sample_showcase/src/main/resources/base/element/string.json @@ -794,7 +794,59 @@ { "name": "drawee_media_picker_button_set_resource_file", "value": "SET RESOURCE FILE" - } + }, + { + "name": "fresco", + "value": "fresco" + }, + { + "name": "DrawweeSimpleAbility", + "value": "fresco" + }, + { + "name": "DraweeMediaPickerAbility", + "value": "DraweeMediaPickerAbility" + }, + { + "name": "DraweeHierarchyAbility", + "value": "DraweeHierarchyAbility" + }, + { + "name": "draweeScaleTypeAbility", + "value": "DraweeScaleTypeAbility" + }, + { + "name": "draweeRotationAbility", + "value": "DraweeRotationAbility" + }, + { + "name": "draweeRoundedCorner", + "value": "DraweeRoundedCorner" + }, + { + "name": "multiUriAbility", + "value": "MultiUriAbility" + }, + { + "name": "imagePipelineRegionDecodingAbility", + "value": "ImagePipelineRegionDecodingAbility" + }, + { + "name": "matisseAbility", + "value": "MatisseAbility" + }, + { + "name": "albumPreviewAbility", + "value": "AlbumPreviewAbility" + }, + { + "name": "selectPreviewAbility", + "value": "SelectPreviewAbility" + }, + { + "name": "cameraAbility", + "value": "CameraAbility" + } ] } \ No newline at end of file -- Gitee