Skip to content

Commit

Permalink
Update README: getters/setters plugin configs 'keepWithAnnotations'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanlehua committed Jan 19, 2020
1 parent 039805d commit 3ef37c3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.ss.android.ugc.bytex.example;

public @interface CalledByNative {
}
5 changes: 5 additions & 0 deletions getter-setter-inline-plugin/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ getter_setter_inline {
enable true
enableInDebug false
logLevel "DEBUG"
// 跳过Proguard的Keep规则,强制内联这些包名下的类的getter/setter方法
shouldInline = [
"com/ss/android/ugc/bytex/example/getter_setter/"
]
// 除了可以通过Proguard的keep规则来避免一些方法被内联外,还可以自定义一些注解,标注到这些方法上
keepWithAnnotations = [
"com/ss/android/ugc/bytex/example/CalledByNative"
]
}
```

Expand Down
5 changes: 5 additions & 0 deletions getter-setter-inline-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ getter_setter_inline {
enable true
enableInDebug false
logLevel "DEBUG"
// Ignore the keep rules configuration of Proguard, force to inline the getters/setters of the classes in those packages.
shouldInline = [
"com/ss/android/ugc/bytex/example/getter_setter/"
]
// besides the keep rules of Proguard, we can customize some annotations to keep some getters/setters methods from being inlined.
keepWithAnnotations = [
"com/ss/android/ugc/bytex/example/CalledByNative"
]
}
```

Expand Down

0 comments on commit 3ef37c3

Please sign in to comment.