!10 【ylong_json】构建方式修正 && OAT.xml 屏蔽 png 文件

Merge pull request !10 from 王柄涵/master
This commit is contained in:
openharmony_ci 2023-08-29 03:54:41 +00:00 committed by Gitee
commit 9a04a31a52
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 36 additions and 21 deletions

View File

@ -1,11 +1,11 @@
[package]
name = "ylong_json"
version = "0.1.0"
edition = "2018"
version = "1.0.0"
edition = "2021"
description = "A JSON serialization file format"
#readme = "README.md"
license = "Apache-2.0"
repository = "https://open.codehub.huawei.com/innersource/Ylong_Rust/ylong_rs/files?ref=master&filePath=src%2Flib%2Fparser%2Fylong_json"
repository = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_json"
keywords = ["ylong", "json", "serialization", "deserialization"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -58,7 +58,7 @@ Note:If the text contains special characters, please escape them according to th
<oatconfig>
<filefilterlist>
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies" >
<filteritem type="filename" name=".*.pem" desc="Testing of API for HTTPS configuration certificates requires a certificate input"/>
<filteritem typr="filename" name=".*.png" desc="png for json"/>
</filefilter>
<filefilter name="defaultPolicyFilter" desc="Filters for compatibilitylicense header policies">
<filteritem type="filename" name=".*.toml" desc="toml treats as readme file"/>

View File

@ -48,17 +48,24 @@ ylong_json
```
## Build
`GN` is supported. User should add dependencies in `deps` of `BUILD.GN` to build this crate.
```gn
deps += ["//commonlibrary/rust/ylong_json:lib"]
```
`Cargo` is supported. User should add dependencies in ```Cargo.toml``` to build this crate.
### Use Cargo
1. Add `ylong_json` to the dependency of `Cargo.toml`
```toml
[dependencies]
ylong_json = { path = "/commonlibrary/rust/ylong_json" } # Uses path dependencies.
ylong_json = { git = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_json.git" }
```
### Use gn
1. Add `ylong_json` in `bundle.json`
```gn
“deps” {
“components”: ["ylong_json"]
}
```
2. Add `ylong_json:lib` in `BUILD.gn`
```gn
external_deps = ["ylong_json:lib"]
```
## User Guide

View File

@ -48,17 +48,25 @@ ylong_json
```
## 编译构建
若使用 GN 编译工具链, 在 BUILD.GN 的 deps 段下添加依赖。添加后使用 GN 进行编译和构建:
```gn
deps += ["//commonlibrary/rust/ylong_json:lib"]
```
若使用 Cargo 编译工具链, 在 ```Cargo.toml``` 下添加依赖。添加后使用 ```cargo``` 进行编译和构建:
### 使用 Cargo 编译
1. 在 `Cargo.toml` 的依赖中添加 `ylong_json`
```toml
[dependencies]
ylong_json = { path = "/commonlibrary/rust/ylong_json" } # 请使用路径依赖
ylong_json = { git = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_json.git" }
```
### 使用 GN 编译
1. 在 `bundle.json` 中添加 `ylong_json`
```gn
“deps” {
“components”: ["ylong_json"]
}
```
2. 在 `BUILD.gn` 中添加 `ylong_json:lib`
```gn
external_deps = ["ylong_json:lib"]
```
## 用户指南