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

added generateTemporaryConfigurationFile option #125

Merged

Conversation

thargor
Copy link
Contributor

@thargor thargor commented Mar 10, 2021

putLibraryJarsInTempDir did not work for me. My project had to many -injars, not libraries.

This pull request introduces a new option generateTemporaryConfigurationFile that generates a temporary proguard configuration file that includes all arguments.

The pull request does not modify other options.

fixes #113

try {
FileWriter writer = new FileWriter(temporaryConfigurationFile);
IOUtils.write(stringBuilder.toString(), writer);
writer.close();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writer needs closing even in case of errors, so this needs to be done in a finally block or with

try(FileWriter write = new FileWriter(temporaryConfigurationFile); ) {

}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced it with a java 1.6 compatible finally.

@@ -132,6 +133,19 @@
*/
private boolean putLibraryJarsInTempDir;

/**
* Create a temporary configuration file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a bit more explanation for this feature.
For example: "Use this parameter if your command line arguments become too long and execution fails. If this parameter is true, the arguments are written to a file and the Proguard process reads them from the file instead of the command itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Also updated the maven documentation.

@lasselindqvist
Copy link
Collaborator

Thanks!

@lasselindqvist lasselindqvist merged commit ed2fea4 into wvengen:master Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too long Args lead to compilation failure
2 participants