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

Gradle build-cache support #9

Open
artemptushkin opened this issue Feb 29, 2024 · 2 comments
Open

Gradle build-cache support #9

artemptushkin opened this issue Feb 29, 2024 · 2 comments

Comments

@artemptushkin
Copy link

@MarvinSchramm it's a great thing that you wrote a plugin that supports Gradle configuration cache given the state of the Spring recommended plugin.

Problem

The plugin works for the configuration cache I can confirm but it doesn't for the build-cache

Another day I opened the issue in the latter mentioned plugin in regards to build-cache support but it wasn't addressed. And it's relevant for this

The problem is that git.properties becomes the part of outputs, so it affects the inputs of all the next tasks which makes it non-incremental.

Input property 'classpathSnapshotProperties.classpath' file /Users/artemptushkin/...build/resources/main/git.properties has changed.

Here is the relevant (same) code in the old plugin

Idea

I generate the git.properties file only when I build the image but the solution could be more generic:

  • make the dependency on the compilation toggleable and enabled by default (as it's now)
    • the clients will be able to disable the dependency for all the tasks but enable when they build the image (remote pipeline case)

If you address this, this plugin would be so much more compatible with Gradle, if I were Spring I'd start using yours!

@igormukhin
Copy link

@artemptushkin
Gradle has "normalization" for that purpose:
https://docs.gradle.org/current/userguide/build_cache_concepts.html#normalization

normalization {
    runtimeClasspath {
        ignore("build-info.properties")
    }
}

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
@igormukhin @artemptushkin and others