Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject annotations before running ProGuard #162

Open
Noisyfox opened this issue Jan 19, 2022 · 2 comments
Open

Inject annotations before running ProGuard #162

Noisyfox opened this issue Jan 19, 2022 · 2 comments

Comments

@Noisyfox
Copy link
Member

This allows us to remove protocol interface methods in ProGuard, thus reduce the build time & binary size.


Currently we need to keep those interface methods in ProGuard because we need the @Selector annotations from those interface methods. However we actually do not use those annotations from interface methods directly, but use the one defined in the concrete class methods, which we copied the annotation from interface in class validator. So if we copy those annotations before running ProGuard, then we are allowed to remove those interface methods later.

@Noisyfox Noisyfox added this to the 2.0.0 milestone Jan 19, 2022
@Noisyfox Noisyfox self-assigned this Jan 19, 2022
@Noisyfox Noisyfox added this to To do in MOE 2.x Jan 19, 2022
Noisyfox added a commit to multi-os-engine/moe-plugin-gradle that referenced this issue Jan 19, 2022
Noisyfox added a commit to multi-os-engine/moe-tools-classvalidator that referenced this issue Jan 19, 2022
@Noisyfox Noisyfox moved this from To do to In progress in MOE 2.x Jan 19, 2022
Noisyfox added a commit to multi-os-engine/moe-plugin-gradle that referenced this issue Jan 21, 2022
Noisyfox added a commit to multi-os-engine/moe-plugin-gradle that referenced this issue Jan 21, 2022
Noisyfox added a commit to multi-os-engine/proguard-core that referenced this issue Jan 24, 2022
Noisyfox added a commit to multi-os-engine/moe-plugin-gradle that referenced this issue Jan 24, 2022
Noisyfox added a commit to multi-os-engine/moe-tools-classvalidator that referenced this issue Jan 24, 2022
Noisyfox added a commit to multi-os-engine/moe-core that referenced this issue Jan 29, 2022
Noisyfox added a commit to multi-os-engine/proguard that referenced this issue Jan 29, 2022
@Berstanio
Copy link

Berstanio commented Feb 6, 2022

https://github.com/multi-os-engine/moe-plugin-gradle/blob/fe4e25983e57272a7f6efca221326763d01a03bb/src/main/java/org/moe/gradle/tasks/ProGuard.java#L146-L150

In gradle 7 the internal annotation cannot be combined with the input annotation. Probably the input annotation is wrong here?

@Noisyfox
Copy link
Member Author

Noisyfox commented Feb 7, 2022

You're right, the internal annotation should be removed.

Noisyfox added a commit to multi-os-engine/moe-plugin-gradle that referenced this issue Feb 7, 2022
Noisyfox added a commit to multi-os-engine/moe-plugin-gradle that referenced this issue Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
MOE 2.x
In progress
Development

No branches or pull requests

2 participants