Skip to content

Commit 7d525a6

Browse files
Prepare for release 1.2.0
1 parent f16612b commit 7d525a6

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

README_CN.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English](https://github.com/DylanCaiCoding/ViewBindingKtx) | 中文
44

5-
[![Download](https://api.bintray.com/packages/dylancai/maven/viewbinding-ktx/images/download.svg)](https://bintray.com/dylancai/maven/viewbinding-ktx/_latestVersion) [![](https://img.shields.io/badge/License-Apache--2.0-green.svg)](https://github.com/DylanCaiCoding/ViewBindingKtx/blob/master/LICENSE)
5+
[![](https://www.jitpack.io/v/DylanCaiCoding/ViewBindingKTX.svg)](https://www.jitpack.io/#DylanCaiCoding/ViewBindingKTX) [![](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://github.com/DylanCaiCoding/ViewBindingKtx/blob/master/LICENSE)
66

77
[ViewBinding](https://developer.android.com/topic/libraries/view-binding) 相对于 Kotlin synthetics、ButterKnife、findViewById,能减少 id 写错或类型写错导致的异常,官方和 JakeWharton 都推荐使用。但是 ViewBinding 直接使用会有点繁琐,所以本库能**帮助你在各种使用场景用尽可能少的代码来使用 ViewBinding**
88

@@ -20,21 +20,32 @@
2020

2121
## Gradle
2222

23+
在根目录的 build.gradle 添加:
24+
25+
```groovy
26+
allprojects {
27+
repositories {
28+
...
29+
maven { url 'https://www.jitpack.io' }
30+
}
31+
}
32+
```
33+
2334
添加配置和依赖:
2435

2536
```groovy
2637
android {
27-
viewBinding {
28-
enabled = true
38+
buildFeatures {
39+
viewBinding = true
2940
}
3041
}
3142
3243
dependencies {
3344
// 以下都是可选,请根据需要进行添加
34-
implementation 'com.dylanc:viewbinding-ktx:1.1.2'
35-
implementation 'com.dylanc:viewbinding-nonreflection-ktx:1.1.2'
36-
implementation 'com.dylanc:viewbinding-base-ktx:1.1.2'
37-
implementation 'com.dylanc:viewbinding-brvah-ktx:1.1.2'
45+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-ktx:1.2.0'
46+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-nonreflection-ktx:1.2.0'
47+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-base:1.2.0'
48+
implementation 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-brvah:1.2.0'
3849
}
3950
```
4051

0 commit comments

Comments
 (0)