README.md |
---|
It is a gradle plugin that uses bytecode weaving technology to solve the click debounce problem of Android applications.
Safe, efficient, easy to use, support incremental build to avoid waste of build time.
I also wrote a blog to share my ideas to solve the click debounce.
Note: This repository is just a gradle plugin, responsible for bytecode weaving work, Android runtime library please move here.
- JDK 1.7 +
- Gradle 3.0.0 +
$ git clone [email protected]:SmartDengg/asm-clickdebounce.git
$ cd asm-clickdebounce/
$ ./gradlew build
Step 1. Add the JitPack repository and the plugin to your buildscript:
buildscript {
repositories {
...
maven { url 'https://jitpack.io' }
}
dependencies {
...
classpath 'com.github.SmartDengg.asm-clickdebounce:click-debounce-gradle-plugin:1.0.0'
}
}
Step 2. Apply it in your module:
It supports 'com.android.application', 'com.android.library' and 'com.android.feature'.
apply plugin: 'smartdengg.clickdebounce'
// or apply plugin: 'clickdebounce'
Step 3 (Optional). Enable logging by adding the following code to your build.gradle:
debounce.loggable = true
Will not intercept the touch event delivery, only intercepted in the callback of the click event, so that it will not be passed to the business logic.
Pure bytecode weaving without any reflections. No Proguard rules are required.
For bugs, feature requests, and discussion please use GitHub Issues. Or send email to [email protected].
❤️ Hope this article can help you. Support by clicking the ⭐, or share it with people around you. ❤️
email : [email protected]
blog : 小鄧子
weibo : -小鄧子-
See the LICENSE file for license rights and limitations (MIT).