Coder Social home page Coder Social logo

Comments (3)

KiraResari avatar KiraResari commented on June 11, 2024

The error is also the same if I remove the "" around "class":

				keep {
					method(class: "com.company.project.module.Start", name: "public static void main(String[] args)")
				}

from yguard.

thomasbehr avatar thomasbehr commented on June 11, 2024

You may not

  • include the visibility modifier in the name attribute
  • include the static modifier in the name attribute
  • include parameter names in the name attribute.

Moreover, you have to use qualified names for parameter types.
I.e. the correct keep specification is

keep {
  method("class":  "com.company.project.module.Start", name: "void main(java.lang.String[])")
}

Please see this gradle script for an example.

By the way, I recommend using the mainclass attribute of the rename element for your use case instead of only excluding the main method from renaming.

from yguard.

KiraResari avatar KiraResari commented on June 11, 2024

Thanks! There was no way I could have figured that out just from reading the documentation. Can you maybe add this? I imagine that would be really valuable to people wanting to work with yGuard.

from yguard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.