You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run ./gradlew build command more than once, the MANIFEST.MF is refreshed and it looses build information. I had to fix it to remove .gradle directory.
It seems this behaviour might be related to generateBuildInfo task is skipped when it is up-to-date.
Environment
OS: Ubuntu 16.04.2 LTS (x86_64)
$ ./gradlew -v
------------------------------------------------------------
Gradle 2.11
------------------------------------------------------------
Build time: 2016-02-08 07:59:16 UTC
Build number: none
Revision: 584db1c7c90bdd1de1d1c4c51271c665bfcba978
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_131 (Oracle Corporation 25.131-b11)
OS: Linux 4.4.0-97-generic amd64
Steps to reproduce
Clone this repository
Change the current directory to samples/example
Run ./gradlew build && unzip -p build/libs/example.jar META-INF/MANIFEST.MF
Run ./gradlew build && unzip -p build/libs/example.jar META-INF/MANIFEST.MF again
Remove directory .gradle with rm -rf .gradle/*
Run ./gradlew build && unzip -p build/libs/example.jar META-INF/MANIFEST.MF again
Result
At step 3, the build information was shown.
:compileJava
:processResources UP-TO-DATE
:generateBuildInfo
:classes
:jar
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 3.626 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.11/userguide/gradle_daemon.html
Manifest-Version: 1.0
Git-Branch: master
Git-Commit: e1f11e6
Git-Committer-Date: 2016-12-20 00:05:55 +0900
Build-Date: 2017-11-11 12:20:58 +0900
Build-Java-Version: 1.8.0_131
Build-Java-Vendor: Oracle Corporation
Build-Os-Name: Linux
Build-Os-Version: 4.4.0-97-generic
However, at step 4, the information was lost.
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:generateBuildInfo UP-TO-DATE
:classes UP-TO-DATE
:jar
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 2.958 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.11/userguide/gradle_daemon.html
Manifest-Version: 1.0
And at step 5, the build information was back.
:compileJava
:processResources UP-TO-DATE
:generateBuildInfo
:classes
:jar
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 3.498 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.11/userguide/gradle_daemon.html
Manifest-Version: 1.0
Git-Branch: master
Git-Commit: e1f11e6
Git-Committer-Date: 2016-12-20 00:05:55 +0900
Build-Date: 2017-11-11 12:33:37 +0900
Build-Java-Version: 1.8.0_131
Build-Java-Vendor: Oracle Corporation
Build-Os-Name: Linux
Build-Os-Version: 4.4.0-97-generic
The text was updated successfully, but these errors were encountered:
When I run
./gradlew build
command more than once, the MANIFEST.MF is refreshed and it looses build information. I had to fix it to remove.gradle
directory.It seems this behaviour might be related to
generateBuildInfo
task is skipped when it is up-to-date.Environment
OS: Ubuntu 16.04.2 LTS (x86_64)
Steps to reproduce
samples/example
./gradlew build && unzip -p build/libs/example.jar META-INF/MANIFEST.MF
./gradlew build && unzip -p build/libs/example.jar META-INF/MANIFEST.MF
again.gradle
withrm -rf .gradle/*
./gradlew build && unzip -p build/libs/example.jar META-INF/MANIFEST.MF
againResult
At step 3, the build information was shown.
However, at step 4, the information was lost.
And at step 5, the build information was back.
The text was updated successfully, but these errors were encountered: