Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8225685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:29:50+00:00 2026-06-07T15:29:50+00:00

ProGuard defines it’s keep syntax here . [@annotationtype] [[!]public|final|abstract|@ …] [!]interface|class|enum classname [extends|implements [@annotationtype]

  • 0

ProGuard defines it’s “keep” syntax here.

[@annotationtype] [[!]public|final|abstract|@ ...] [!]interface|class|enum classname
    [extends|implements [@annotationtype] classname]
[{
    [@annotationtype] [[!]public|private|protected|static|volatile|transient ...] <fields> |
                                                                      (fieldtype fieldname);
    [@annotationtype] [[!]public|private|protected|static|synchronized|native|abstract|strictfp ...] <methods> |
                                                                                           <init>(argumenttype,...) |
                                                                                           classname(argumenttype,...) |
                                                                                           (returntype methodname(argumenttype,...));
    [@annotationtype] [[!]public|private|protected|static ... ] *;
    ...
}]

Is it possible to keep use generalized modifiers and types?
For example -keep * * my.package.MySomething { *; }
The 1st * would mean anything from this part: [!]public|final|abstract|@ ...], and
the 2nd * would mean anything from this part: [!]interface|class|enum.

In bit more depth, I am trying to generate ProGuard arguments dynamically and I do NOT know whether my.package.MySomething is an abstract class or public enum or anything else.

Is there a way, an option in ProGuard that could help me accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:29:51+00:00Added an answer on June 7, 2026 at 3:29 pm

    The configuration

    -keep class my.package.MySomething { *; }
    

    does what you want. You’d only add access modifiers if you’d want to further constrain the matches (e.g. public; or interface instead of class).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed that the template proguard.cfg always contains the following: -keep public class *
How should I use proguard with ormlite library on Android? Trying this: -keep class
I can't seem to find the proper syntax for Proguard to filter out a
What syntax is used to comment out a proguard rule inside Proguard.cfg? Thanks
In other words: what -keep commands should I use to tell Proguard to avoid
How can I tell proguard to keep my classmembers? I need them for JSON
I chose ProGuard and here's the options I configured it with: Shrinking Options: Shrink
I'm new to proguard, and developing android app, after building with default android proguard
I user android/proguard/ACRA. Can anyone tell me please why the crash reports I am
I'm using ProGuard to obfuscate my code. My project is comprised of a few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.