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

Set up jib-build-plan sub-project #2324

Merged
merged 3 commits into from
Mar 12, 2020
Merged

Set up jib-build-plan sub-project #2324

merged 3 commits into from
Mar 12, 2020

Conversation

chanseokoh
Copy link
Member

@chanseokoh chanseokoh commented Mar 12, 2020

Set up a new subproject jib-container-build-plan. It will host Java API (classes) for the Container Build Plan spec.

Brief heads-up for what it will host

Its classes will include (basically) AbsoluteUnixPath, RelativeUnixPath, Port, FilePermissions, LayerEntry, LayerConfiguration, ImageFormat, etc. They will be duplicated (after renaming if desired) from jib-core into a different package com.google.cloud.tools.jib.buildplan.

Since these are public API in jib-core that we cannot remove, this means we will have to maintain duplicate code between jib-core and jib-container-build-plan, hopefully for a short period of time. I imagine that once jib-core is adjusted to depend on jib-container-build-plan, these duplicated classes in jib-core may become a thin proxy to the corresponding classes in jib-container-build-plan. For example, AbsoluteUnixPath in jib-core could merely delegating calls to AbsoluteUnixPath in jib-container-build-plan.

I wish I could just move these classes and remove them from jib-core, but I think we want some stability in the jib-core API. Let me know if you have better ideas.

@chanseokoh
Copy link
Member Author

To get the idea of actual classes to be added, see this comparison. Still working on it, but it's close to completion.

Copy link
Member

@loosebazooka loosebazooka left a comment

Choose a reason for hiding this comment

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

I think this is fine. maybe jib-*container*-build-plan is redundant? jib-build-plan might be enough. We can of course revisit naming later, so feel free to submit how you want.

jib-build-plan/build.gradle Outdated Show resolved Hide resolved
@chanseokoh chanseokoh changed the title Set up jib-container-build-plan sub-project Set up jib-build-plan sub-project Mar 12, 2020
@chanseokoh chanseokoh merged commit 25b1925 into master Mar 12, 2020
@chanseokoh chanseokoh deleted the build-plan-subproject branch March 12, 2020 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants