From 36aeb3637f58c45924d7f974ce763bcea64d970b Mon Sep 17 00:00:00 2001 From: lujingwei Date: Thu, 10 Jun 2021 15:26:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91=EF=BC=8C?= =?UTF-8?q?=E5=9F=BA=E7=BA=BF=E7=89=88=E6=9C=AC=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- app/src/main/config.json | 4 +-- .../main/resources/base/element/string.json | 8 ++++++ libphonenumber/build.gradle | 9 +----- .../libphonenumber/ohos/MetadataLoader.java | 2 +- .../libphonenumber/ohos/PhoneNumberUtil.java | 4 +-- library/build.gradle | 8 +----- library/gradle.properties | 28 +++++++------------ .../main/resources/base/element/dimens.json | 2 +- .../base/layout/layout_code_picker.xml | 4 +-- .../layout/layout_full_width_code_picker.xml | 4 +-- .../layout/layout_recycler_country_tile.xml | 4 +-- 12 files changed, 33 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index cd64ca8..f00dbb3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - 项目移植状态:主功能完成 - 调用差异:无 - 开发版本:sdk5,DevEco Studio2.1 beta3 -- 基线版本:tag v2.4.7 +- 基线版本:Release 2.4.7 #### 效果演示 ![输入图片说明](./image/CountryCodePickerProject.gif "gif") diff --git a/app/src/main/config.json b/app/src/main/config.json index 36a001e..d591570 100644 --- a/app/src/main/config.json +++ b/app/src/main/config.json @@ -47,7 +47,7 @@ "name": "in.hbb20.countrycodepickerproject.MainAbility", "icon": "$media:ic_ccp_launcher", "description": "$string:mainability_description", - "label": "CCP library features", + "label": "$string:CCPlibrary", "type": "page", "launchType": "standard" }, @@ -56,7 +56,7 @@ "name": "in.hbb20.countrycodepickerproject.ExampleAbility", "icon": "$media:icon", "description": "$string:exampleability_description", - "label": "entry", + "label": "$string:entry", "type": "page", "launchType": "standard" } diff --git a/app/src/main/resources/base/element/string.json b/app/src/main/resources/base/element/string.json index 1a47a70..9eb2218 100644 --- a/app/src/main/resources/base/element/string.json +++ b/app/src/main/resources/base/element/string.json @@ -15,6 +15,14 @@ { "name": "HelloWorld", "value": "Hello World" + }, + { + "name": "CCPlibrary", + "value": "CCP library features" + }, + { + "name": "entry", + "value": "entry" } ] } \ No newline at end of file diff --git a/libphonenumber/build.gradle b/libphonenumber/build.gradle index a8fec7b..fd13977 100644 --- a/libphonenumber/build.gradle +++ b/libphonenumber/build.gradle @@ -1,13 +1,6 @@ apply plugin: 'com.huawei.ohos.library' - //apply from: '../upload.gradle' -// -//rootProject.ext { -// CUSTOM_ARTIFACT = '' //是否指定上传的包,指定则填入包的路径,不指定填入空字符串即可。(annotationProcessor相关的jar包需要全依赖,但是通过components.java打出来的jar包默认只包含本模块的源码,因此需要使用自定义的jar包发布) -// DEFAULT_GROUP_ID = 'com.gitee.chinasoft_ohos' //固定 -// DEFAULT_ARTIFACT_ID = 'ohos_libphonenumber' //项目ID,默认填写项目名称。如果有多个模块需要发布,则填写模块名称 -// DEFAULT_VERSION = '0.0.1-SNAPSHOT' //版本号,发新版本时修改。未通过验收的需要发布SNAPSHOT版本,即在版本号末尾带上SNAPSHOT -//} + ohos { compileSdkVersion 5 diff --git a/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/MetadataLoader.java b/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/MetadataLoader.java index 62adc9e..cad6756 100644 --- a/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/MetadataLoader.java +++ b/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/MetadataLoader.java @@ -26,7 +26,7 @@ public interface MetadataLoader { * concurrently so implementations must be thread-safe. * * @param metadataFileName file name (including path) of metadata to load. File path is an - * absolute class path like /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto + * * @return the input stream for the metadata file. The library will close this stream * after it is done. Return null in case the metadata file could not be found */ diff --git a/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/PhoneNumberUtil.java b/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/PhoneNumberUtil.java index 28490b0..c88f469 100644 --- a/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/PhoneNumberUtil.java +++ b/libphonenumber/src/main/java/io/michaelrocks/libphonenumber/ohos/PhoneNumberUtil.java @@ -43,7 +43,7 @@ import ohos.app.Context; * validation. * *

If you use this library, and want to be notified about important changes, please sign up to - * our mailing list. + * *

* NOTE: A lot of methods in this class require Region Code strings. These must be provided using * CLDR two-letter region-code format. These should be in upper-case. The list of the codes @@ -527,7 +527,7 @@ public class PhoneNumberUtil { *

* Warning: This level might result in lower coverage especially for regions outside of country * code "+1". If you are not sure about which level to use, email the discussion group - * libphonenumber-discuss@googlegroups.com. + * */ STRICT_GROUPING { @Override diff --git a/library/build.gradle b/library/build.gradle index d06231c..cf7ce53 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,12 +1,6 @@ apply plugin: 'com.huawei.ohos.library' //apply from: '../upload.gradle' -// -//rootProject.ext { -// CUSTOM_ARTIFACT = '' //是否指定上传的包,指定则填入包的路径,不指定填入空字符串即可。(annotationProcessor相关的jar包需要全依赖,但是通过components.java打出来的jar包默认只包含本模块的源码,因此需要使用自定义的jar包发布) -// DEFAULT_GROUP_ID = 'com.gitee.chinasoft_ohos' //固定 -// DEFAULT_ARTIFACT_ID = 'country_code_picker' //项目ID,默认填写项目名称。如果有多个模块需要发布,则填写模块名称 -// DEFAULT_VERSION = '0.0.1-SNAPSHOT' //版本号,发新版本时修改。未通过验收的需要发布SNAPSHOT版本,即在版本号末尾带上SNAPSHOT -//} + ohos { compileSdkVersion 5 defaultConfig { diff --git a/library/gradle.properties b/library/gradle.properties index 64c5fc1..0daf183 100644 --- a/library/gradle.properties +++ b/library/gradle.properties @@ -1,18 +1,10 @@ -GROUP=com.hbb20 -POM_ARTIFACT_ID=ccp -VERSION_NAME=2.5.1 -POM_NAME=CountryCodePicker -POM_PACKAGING=aar -POM_DESCRIPTION=Country Code Picker (CCP) is an android library which provides an easy way to search and select international country code for the phone number. -POM_INCEPTION_YEAR=2021 -POM_URL=https://github.com/hbb20/CountryCodePickerProject -POM_SCM_URL=https://github.com/hbb20/CountryCodePickerProject -POM_SCM_CONNECTION=scm:git@github.com:hbb20/CountryCodePickerProject.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:hbb20/CountryCodePickerProject.git -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo -POM_DEVELOPER_ID=hbb20 -POM_DEVELOPER_NAME=Harsh Bhakta -POM_DEVELOPER_URL=https://github.com/hbb20 -# ./gradlew ccp:uploadArchives --no-daemon --no-parallel -i \ No newline at end of file +# Project-wide Gradle settings. +# IDE (e.g. DevEco Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# If the Chinese output is garbled, please configure the following parameter. +# org.gradle.jvmargs=-Dfile.encoding=GBK diff --git a/library/src/main/resources/base/element/dimens.json b/library/src/main/resources/base/element/dimens.json index 05eb366..ba19488 100644 --- a/library/src/main/resources/base/element/dimens.json +++ b/library/src/main/resources/base/element/dimens.json @@ -1,7 +1,7 @@ { "string": [ { - "name": "google_1x", + "name": "ohos_1x", "value": "8vp" }, { diff --git a/library/src/main/resources/base/layout/layout_code_picker.xml b/library/src/main/resources/base/layout/layout_code_picker.xml index 76618ca..f581edd 100644 --- a/library/src/main/resources/base/layout/layout_code_picker.xml +++ b/library/src/main/resources/base/layout/layout_code_picker.xml @@ -17,9 +17,9 @@ ohos:id="$+id:linear_flag_holder" ohos:height="match_content" ohos:width="match_content" - ohos:end_margin="$string:google_1x" + ohos:end_margin="$string:ohos_1x" ohos:orientation="vertical" - ohos:right_margin="$string:google_1x" + ohos:right_margin="$string:ohos_1x" ohos:vertical_center="true" > diff --git a/library/src/main/resources/base/layout/layout_full_width_code_picker.xml b/library/src/main/resources/base/layout/layout_full_width_code_picker.xml index f3933f4..80ae940 100644 --- a/library/src/main/resources/base/layout/layout_full_width_code_picker.xml +++ b/library/src/main/resources/base/layout/layout_full_width_code_picker.xml @@ -16,9 +16,9 @@ ohos:id="$+id:linear_flag_holder" ohos:height="match_content" ohos:width="match_content" - ohos:end_margin="$string:google_1x" + ohos:end_margin="$string:ohos_1x" ohos:orientation="vertical" - ohos:right_margin="$string:google_1x" + ohos:right_margin="$string:ohos_1x" ohos:vertical_center="true" > diff --git a/library/src/main/resources/base/layout/layout_recycler_country_tile.xml b/library/src/main/resources/base/layout/layout_recycler_country_tile.xml index 1163d56..1fa62f5 100644 --- a/library/src/main/resources/base/layout/layout_recycler_country_tile.xml +++ b/library/src/main/resources/base/layout/layout_recycler_country_tile.xml @@ -12,9 +12,9 @@ ohos:width="40vp" ohos:align_parent_left="true" ohos:alignment="center" - ohos:left_margin="$string:google_1x" + ohos:left_margin="$string:ohos_1x" ohos:orientation="vertical" - ohos:start_margin="$string:google_1x" + ohos:start_margin="$string:ohos_1x" ohos:visibility="hide" > -- Gitee