Giter Club home page Giter Club logo

Comments (2)

rsampaths16 avatar rsampaths16 commented on August 11, 2024

Am facing the same issue for the same plugin & Gradle version.

Observation, the git.properties is build alternatively for every clean & build.

The following pattern is observed. Note that I'm not sure if the it's the first build that's skipping, or the second one.

...
clean
build -> generated
clean
build -> not generated
clean
build -> generated
clean
build -> not generated
...

Build log when git.properties isn't generated

Executing 'build'...

> Task :generateEffectiveLombokConfig FROM-CACHE
> Task :compileJava FROM-CACHE
> Task :generateGitProperties FROM-CACHE
> Task :processResources
> Task :classes
> Task :resolveMainClassName
> Task :bootJar
> Task :bootStartScripts
> Task :bootDistTar
> Task :bootDistZip
> Task :jar SKIPPED
> Task :startScripts
> Task :distTar
> Task :distZip
> Task :assemble
> Task :generateTestEffectiveLombokConfig FROM-CACHE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 7s
13 actionable tasks: 9 executed, 4 from cache
Execution finished 'build'.

Build log when git.properties is generated

Executing 'build'...

> Task :generateEffectiveLombokConfig FROM-CACHE
> Task :compileJava FROM-CACHE
> Task :generateGitProperties FROM-CACHE
> Task :processResources
> Task :classes
> Task :resolveMainClassName
> Task :bootJar
> Task :bootStartScripts
> Task :bootDistTar
> Task :bootDistZip
> Task :jar SKIPPED
> Task :startScripts
> Task :distTar
> Task :distZip
> Task :assemble
> Task :generateTestEffectiveLombokConfig FROM-CACHE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 5s
13 actionable tasks: 9 executed, 4 from cache
Execution finished 'build'.

from gradle-git-properties.

fabianlinz avatar fabianlinz commented on August 11, 2024

We are facing the same issue. When downgrading to Gradle 8.5 it's works again, but with 8.6 up to the last night build 8.10-20240723003427+0000 it behaves as described above.

Workaround for now:

generateGitProperties {
    outputs.upToDateWhen { false }
}

alternative: turn of caching e.g. via org.gradle.caching=false in gradle.properties

Reproducible on ever second/ third execution of clean assemble (as also described above)
(you can find a minimal example at https://github.com/fabianlinz/2024_07_git_properties_issue):

   gradle clean  assemble --console=plain   
   ls my-module/build/resources/main/git.properties    => file exists

   gradle clean  assemble --console=plain   
   ls my-module/build/resources/main/git.properties    => file DOES NOT exists

   gradle clean  assemble --console=plain   
   ls my-module/build/resources/main/git.properties    => file exists

   gradle clean  assemble --console=plain   
   ls my-module/build/resources/main/git.properties    => file DOES NOT exists
   (and so on)

Some further observations

  • Just executing build or assemble without a clean does not result in the issue
  • Removing the git.properties file manually instead of calling clean does not result in the issue
    gradle assemble --console=plain   
    ls my-module/build/resources/main/git.properties    => file exists
    rm my-module/build/resources/main/git.properties 
    gradle my-module:assemble --console=plain   
    ls my-module/build/resources/main/git.properties    => file still exists
    => for some reason deleting the file is not the same as clean
    
  • Calling generateGitProperties directly instead of assemble or build does not result in the issue
  • Issue also occurs when gradle daemon is stopped in between
  • If main/resources is completely empty the issue can't be observed (so this might be some interference with Gradles java plugin?)
  • If caching is turned off e.g. via org.gradle.caching=false in gradle.properties the issue can't be observed

from gradle-git-properties.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.