https://github.com/ivianuu/dusty
[DEPRECATED] Dusty - Clean up your classes with ease
https://github.com/ivianuu/dusty
android annotationprocessor cleaning cleanup fragment java
Last synced: 8 days ago
JSON representation
[DEPRECATED] Dusty - Clean up your classes with ease
- Host: GitHub
- URL: https://github.com/ivianuu/dusty
- Owner: IVIanuu
- Created: 2017-05-28T13:33:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-04T02:38:59.000Z (over 7 years ago)
- Last Synced: 2025-04-14T17:12:24.659Z (8 days ago)
- Topics: android, annotationprocessor, cleaning, cleanup, fragment, java
- Language: Java
- Homepage:
- Size: 169 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dusty
Dusty - Clean up your classes with ease## Introduction
This library will automatically clear your @Clear annotated references inside classes.## Download
```groovy
// in your root gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
``````groovy
// in your module
dependencies {
compile 'com.github.IVIanuu.Dusty:dusty:LATEST-VERSION'
annotationProcessor 'com.github.IVIanuu.Dusty:dusty-processor:LATEST-VERSION'
}
```
## UsageIn order to make dusty work you have to do two simple things.
First annotate your references that you want to be cleared.
Then in onCreate register the fragment by calling Dusty.register(this);
```java
public class MyClass {@Clear SampleAdapter sampleAdapter;
@Clear String title;
@Clear UpdateHelper updateHelper
public void release() {
Dusty.dust(this); // sets the annotated fields to null
}
...
}
```## License
```
Copyright 2017 Manuel WrageLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```