Skip to content

Commit

Permalink
version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yatatsu committed Jan 19, 2017
1 parent 92fd29b commit 9368bb2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@

AutoBundle generates boilerplate code for field binding with ``android.os.Bundle``.

1. Usage
2. Advanced
3. Example
4. Principle
5. Download
6. Props
7. License

## Usage

1. Generate builder method
2. Bind annotated fields
3. Store annotated fields

### 1. Generate builder method

In your class which has state from `Bundle`
Expand Down Expand Up @@ -165,6 +177,12 @@ public void onCreate(Bundle savedInstanceState) {

## Advanced

- custom key name
- required
- getter/setter
- converter
- use in library

### Set key name

``key`` is key for ``Bundle``. Default is field name.
Expand Down Expand Up @@ -260,7 +278,7 @@ which is generated by processor.

Set `autoBundleAsLibrary` option as following.

in annotationProcessor (in jack),
with annotationProcessor (in jack),

```groovy
android {
Expand All @@ -276,7 +294,7 @@ android {
}
```

with android-apt,
or with android-apt,

```groovy
apt {
Expand All @@ -299,6 +317,8 @@ annotationProcessorOptions {
}
```

## Example

For more information or usage, see the sample application!

(See `example/` and generated codes are under `example/build`.)
Expand All @@ -315,8 +335,8 @@ AutBundle provide this pattern as builder method instead of "createIntent".

```groovy
dependencies {
compile 'com.github.yatatsu:autobundle:4.0.0'
annotationProcessor 'com.github.yatatsu:autobundle-processor:4.0.0'
compile 'com.github.yatatsu:autobundle:4.1.0'
annotationProcessor 'com.github.yatatsu:autobundle-processor:4.1.0'
}
```

Expand All @@ -332,8 +352,8 @@ buildscript {
apply plugin: 'android-apt'
dependencies {
compile 'com.github.yatatsu:autobundle:4.0.0'
apt 'com.github.yatatsu:autobundle-processor:4.0.0'
compile 'com.github.yatatsu:autobundle:4.1.0'
apt 'com.github.yatatsu:autobundle-processor:4.1.0'
}
```

Expand Down
2 changes: 1 addition & 1 deletion metadata.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ext {
desc: 'AutoBundle generates boilerplate code for field binding with android.os.Bundle',
website: 'https://github.com/yatatsu/AutoBundle',
repository: 'git@github.com:yatatsu/AutoBundle.git',
version: '4.0.0',
version: '4.1.0',
licences: ['Apache-2.0']
]
}

0 comments on commit 9368bb2

Please sign in to comment.