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

  • SEARCH
  • Home
  • 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 6759061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:53:12+00:00 2026-05-26T13:53:12+00:00

I am developing a library that consists of several individual classes that all work

  • 0

I am developing a library that consists of several individual classes that all work together to perform the function of the library. One of the classes then exposes a handful of public functions that all outside code to make use of the library.

Since the different classes need to interact, I put them all in the same package and have a lot of “protected” stuff (classes and functions).

The problem is that the ProGuard by default will not obfuscate these protected elements as there is a chance that they could later be combined with another class in the same package. I would like to prevent this, though, for security reasons.

So the question is, can I force ProGuard to obfuscate these protected elements in addition to the private ones?

To put it another way, is there a way to tell ProGuard “I am done adding stuff to this package, please obfuscate not only the private stuff within each class, but the protected stuff within the package”?

Thanks!

  • 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-05-26T13:53:13+00:00Added an answer on May 26, 2026 at 1:53 pm

    ProGuard obfuscates everything that isn’t matching one of the -keep options in your configuration. E.g., from the ProGuard manual > Examples > A typical library:

    -keep public class * {
        public protected *;
    }
    

    This specification keeps all public and protected classes, fields, and methods. ProGuard obfuscates anything else. If you want to obfuscate more, you have to specify fewer elements to keep, e.g. with one or more options like this one:

    -keep public class mypackage.MyPublicClass {
        public void myPublicMethod();
    }
    

    You can use wildcards or other templates, as documented in the ProGuard manual.

    So, by default, ProGuard obfuscates everything, unless you specify to keep some elements. ProGuard can’t guess what you’d like to keep.

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

Sidebar

Related Questions

I am developing a wrapper for a third party function library that is interfacing
I am developing a library that uses one or more helper executable in the
I am developing a class library that will be used in several projects. In
I am developing a class library (C#) that i will use it for my
Hi I am developing a Qt application that uses a plugin (dynamic library) and
I'm developing a Flex 2 application, and I noticed that part of the library
Suppose you are developing a library with classes to be exported through a DLL
I am developing a library and an application that uses the library in Python
I'm developing a static library that will be distributed to other developers, who may
I'm about to set out on developing a .NET class library that will be

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.