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

Use one multi-module gradle build #1791

Conversation

larsgrefer
Copy link
Contributor

fixes #1790

  • Common gradle configuration should be moved to an subprojects{} block in the root build.gradle
  • various scripts need to be updated (build.sh, **/kokoro/*.(sh|bat), etc.)

@chanseokoh
Copy link
Member

Thanks for the idea!

We are unsure when we will restructure the repo given the resources we have, but this PR will serve a nice reference when that happens.

@loosebazooka
Copy link
Member

@larsgrefer, yeah as @chanseokoh this is great, we might want to do some shading (to include plugins core directly in our plugins jars) and generation of test artifacts so we can include testCompile project(path: "jib-core", configuration: "test-utils") or something.

But before you start going too deep on this, I think we're are actually going to go a little slow on this though as we will need to retool our release process, etc to accommodate.

@larsgrefer
Copy link
Contributor Author

Sure. This PR is only meant as proof-of-concept.

To make this work some additional changes are necessary:

  • The io.freefair.maven-plugin plugin is based on the (new) maven-publish plugin, while the other gradle builds in jib still use the (old) maven plugin.
  • The helper scripts (build.sh etc.) need to be revisited.
  • The surrounding CI/CD pipelines might need to be adjusted.

Once this is done, the multi-module project opens the way for further simplifications:

  • Most of the build configuration can be centralized in the root build.gradle (java versions, checkstyle rules, publishing, java-format, errorprone, etc.)
  • The current behaviour of modifiying the source sets of each sub-module can be changed to acutal dependencies. (These could then be shaded again).
    • The test code which is currently shared between the modules should be extracted into a separate jib-test-utils module, which can then be a testCompile dependency of the current modules.

@loosebazooka
Copy link
Member

going to go ahead and close this in favor of #1835 thanks for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jib build is complicated
4 participants