Hello,

I have checked both the manual and the forum but I have not find any way to
see if a artifact (jar) has been re-created.

I need this because I would like to upload the jar to a repository just when
it is changed.

I have tried with something like the following

    task('uploadInternalLibs').doLast { task ->
       if( build.taskGraph.hasTask(':'+task.project.name+':compile') == true
){
              ant.copy( file:
task.project.buildDir.path+"/"+task.project.archive_jar.archiveName, todir:
mainRepo.path, overwrite:true)
       }
    }

but I have discovered that the "compile" task is executed even if it doesn't
do anything.

I could try to check the date of the jar before and after the archive_jar
task to see if it is changed, but is this the way to solve my problem in the
Gradle way?

Regards,

Walter

Reply via email to