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 8 compatiblity: Missing task dependency on processResources when setting gitPropertiesResourceDir #209

Open
Fiouz opened this issue Aug 2, 2022 · 0 comments

Comments

@Fiouz
Copy link

Fiouz commented Aug 2, 2022

Context

Gradle 7.5
------------------------------------------------------------
Gradle 7.5
------------------------------------------------------------

Build time:   2022-07-14 12:48:15 UTC
Revision:     c7db7b958189ad2b0c1472b6fe663e6d654a5103

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.15 (Eclipse Adoptium 11.0.15+10)
OS:           Windows 10 10.0 amd64
build.gradle.kts
// build.gradle.kts
plugins {
    java
    id("com.gorylenko.gradle-git-properties") version "2.4.1"
}

tasks {
    wrapper {
        gradleVersion = "7.5"
    }
}

gitProperties {
    gitPropertiesResourceDir.set(
        layout.buildDirectory.dir("some-directory-for-git.properties")
    )
}

Command: gradlew build --warning-mode=all

Expected behavior

Build without warning

Actual behavior

> Task :compileJava
> Task :generateGitProperties

> Task :processResources
Execution optimizations have been disabled for task ':processResources' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '<PROJECT_DIR>\build\some-directory-for-git.properties'. Reason: Task ':processResources' uses this output of task ':generateGitProperties' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: '<PROJECT_DIR>\build\some-directory-for-git.properties'. Reason: Task ':processResources' uses this output of task ':generateGitProperties' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5/userguide/validation_problems.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations are disabled to ensure correctness. See https://docs.gradle.org/7.5/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.

> Task :classes
> Task :jar
> Task :assemble
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD SUCCESSFUL in 658ms
4 actionable tasks: 4 executed
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

1 participant