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

Building Gradle without enterprise plugin. #16439

Closed
the-loudspeaker opened this issue Mar 7, 2021 · 4 comments
Closed

Building Gradle without enterprise plugin. #16439

the-loudspeaker opened this issue Mar 7, 2021 · 4 comments

Comments

@the-loudspeaker
Copy link

the-loudspeaker commented Mar 7, 2021

Hey there.
I am trying to package Gradle 6.4.1 in Debian. Choosing 6.4.1 because I had started on this last summer.
One of the major blockers for is the Gradle enterprise plugin. Debian policies recommend we build all the packages locally and using free and opensource components already present in Debian. Is there a way to build Gradle without the plugin?

I have been trying to patch out the plugin and build Gradle but the project very complex and I am running into many build errors. A little help would be very much appreciated.
Here are some of the errors
https://paste.ubuntu.com/p/mGkCfRRp46/
^ This is where I am at currently.

Here's where I am working on it: https://salsa.debian.org/theloudspeaker-guest/gradle
You can reproduce the issue by cloning the above repo, checking out the enterprise-test branch and running debuild -b --no-sign from a Debian system. The patch I am using for removing enterprise plugin is this.

I am sorry that the above repo has a lot of patches and is not clean to follow too. It would be very helpful if anyone can provide a better way of doing it or a clean single patch/set of patches for building Gradle without enterprise plugin.

@ljacomet
Copy link
Member

ljacomet commented Mar 8, 2021

Yes, building Gradle without the Gradle enterprise plugin is possible.

Why are you trying to remove AutoAppliedGradleEnterprisePlugin?
This is a class in the OSS code that only helps transform the --scan command line into a plugin application.

@the-loudspeaker
Copy link
Author

the-loudspeaker commented Mar 10, 2021

Yes, building Gradle without the Gradle enterprise plugin is possible.

Can you provide some info on how that can be done?

Why are you trying to remove AutoAppliedGradleEnterprisePlugin?

I was actually building the patch on top of what previous maintainer did to make sure gradle 4.4.1 builds in debian. This class was removed when trying to revert some commits and turn related files to their versions in 4.4.1.

If there's a better way then let me know.

@the-loudspeaker
Copy link
Author

the-loudspeaker commented Mar 11, 2021

Here are the steps to build the project from above source without Debian build tools,

  1. Install gradle 6.4.1 on your system.
  2. Apply patches from debian/patches/series in same order as they are in the series file.
  3. Checkout the build command using debian/rules file. Note the parts that are excluded form building using the GRADLE_EXCLUDED_PROJECTS, the tasks that are run according to GRADLE_TASKS from debian/rules and also the GRADLE_FLAGS
  4. Run that command.

@jjohannes
Copy link
Contributor

jjohannes commented Apr 14, 2021

I am sorry, but this is nothing we have the capacity to help with. We can continue the discussion on #16512 but I am not sure what we can do. Gradle is under active development and dogfooding early is one of our development prcinciples. So often our repo only often builds with the current version (previous nightly).

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

No branches or pull requests

3 participants