Jar task always running

I have multiple projects build when I run the build I want to incremental build, but jar task is always out of date which causes other project to build.

Any idea how I can prevent jar task running if classes did not change?

I am getting this message :

Up-to-date check for task ‘:projectA:jar’ took 0.02 secs. It is not up-to-date because:
Output property ‘archivePath’ file C:\ProjectA\build\libs\ProjectA-1.0.0-SNAPSHOT.jar has changed.