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

Option to pack jars as uber JAR, support Proguard for uber JAR #4136

Merged
merged 7 commits into from
Apr 12, 2024

Conversation

badmannersteam
Copy link
Contributor

@badmannersteam badmannersteam commented Jan 17, 2024

Proposed changes

  1. Added support to join JARs to the uber JAR with ProGuard, disabled by default:
compose.desktop {
    application {
        buildTypes.release.proguard {
            joinOutputJars.set(true)
        }
    }
}
  1. All 'release' tasks now really depend on ProGuard, as stated in tutorial.

Testing

  • A new auto test

  • Manual:

  1. Test on Windows/macOs/Linux
  2. Test the new Gradle parameter joinOutputJars:
compose.desktop {
    application {
        buildTypes.release.proguard {
            joinOutputJars.set(true)
        }
    }
}

false (by default) should generate multiple jars (except for package*UberJarForCurrentOS)
true should generate a single jar in a result distribution
3. Test debug tasks:

run
runDistributable
createDistributable
packageUberJarForCurrentOS
  1. Test release tasks:
runRelease
runReleaseDistributable
createReleaseDistributable
packageReleaseUberJarForCurrentOS

The jars should be reduced in size (because Proguard is enabled in the release mode)

This should be test by QA.

Issues fixed

Fixes #4129

@terrakok
Copy link
Member

@badmannersteam could you add integration tests for that?

@badmannersteam
Copy link
Contributor Author

badmannersteam commented Jan 19, 2024

@terrakok probably yes, but what configuration combinations they should check?

@terrakok
Copy link
Member

I would expect a multi-module project + proguard as uberjar and a regular multi-module project

@badmannersteam
Copy link
Contributor Author

Added some tests.

@badmannersteam
Copy link
Contributor Author

@terrakok seems like that all for now.

@terrakok terrakok requested review from igordmn and removed request for AlexeyTsvetkov March 12, 2024 08:49
Copy link
Member

@terrakok terrakok left a comment

Choose a reason for hiding this comment

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

LGTM

@badmannersteam
Copy link
Contributor Author

I'll check the tests today and also want to fix the issue on Windows, that was mentioned above (by flattering into the intermediate jar instead of directory).

@terrakok
Copy link
Member

@badmannersteam could you check failed tests and rebase the branch on top of the master?

@badmannersteam
Copy link
Contributor Author

@terrakok all done.

@badmannersteam
Copy link
Contributor Author

@igordmn, look at this pls :)

@badmannersteam
Copy link
Contributor Author

@terrakok @igordmn
I apologize for being intrusive, but are there any chances that this will be merged before the next release?
Just want to know for proper planning.

@igordmn
Copy link
Collaborator

igordmn commented Apr 5, 2024

Most probably yes, it will be in the next release (1.6.10).

I plan to review it soon.

@igordmn igordmn changed the title Package uber JAR with Proguard Option to pack jars as uber JAR, support Proguard for uber JAR Apr 12, 2024
Copy link
Collaborator

@igordmn igordmn left a comment

Choose a reason for hiding this comment

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

Thanks!

LGTM.

Few things:

  1. I changed the title/description by our new PR format
  2. I moved README to support/1.6.10, which will be merged to master on the release date

@igordmn igordmn merged commit 994f0c6 into JetBrains:master Apr 12, 2024
11 of 12 checks passed
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.

Package uber JAR with Proguard
3 participants