Skip to content

Commit

Permalink
Add @inherited support with Java 7. Closes #15.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fohlen committed Dec 2, 2019
1 parent 61eb9fb commit bdcd4f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Added
- Added scramble to the <rename> element, introducing randomized mapping
- Add documentation about <property> default values
- Added @Inherited annotation to `com.yworks.util.annotation.Obfuscation`

## Fixed
- Do not use `setComment` when comment is actually `null`. Achieves Android compatibility.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.yworks.util.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Target;

@Inherited
@Target(value = {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
public @interface Obfuscation {

Expand Down
2 changes: 1 addition & 1 deletion docs/task_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ public @interface Obfuscation {
}
```

This class is also the default annotation yGuard is looking for when obfuscating.
This class is also the default annotation yGuard is looking for when obfuscating. By default the `Obfuscation` annotation is inherited using the `@Inherited` trait. If this behaviour is undesirable, consider creating a custom obfuscation annotation.

The convention for annotation classes that yGuard understands as obfuscation controlling annotations requires two attributes:

Expand Down

0 comments on commit bdcd4f1

Please sign in to comment.