Avoid publishing .jar file along with compressed .tar.gz file

We have created compressed tar.gz include with jar and publishing also through jenkin pipeline. while publishing through jenkin, it is also publishing .jar file along with .tar.gz. requirement is, restrict only to publish .tar.gz file not .jar file.

     apply plugin: 'java'
    apply plugin: 'org.springframework.boot'
    apply plugin: 'maven-publish'
    apply plugin: 'distribution'


    publish {
        dependsOn assemble
        dependsOn jar
        dependsOn bootRepackage
        dependsOn distTar
    }
    publishToMavenLocal {
        dependsOn assemble
        dependsOn jar
        dependsOn bootRepackage
        dependsOn distTar
    }

    distributions { 
      main { 
       contents {
         into ("/")
         from libsDir
         include ‘.jar’
         rename '..jar’, “${project.name}.jar”
         from “env”
         include ‘*.conf’
        }
      }
    }

 //compress tar to tar.gz
distTar {
   compression = org.gradle.api.tasks.bundling.Compression.GZIP
   extension = 'tar.gz'
}
The output which we are getting after publishing
    file.source.jar
    file.jar
    file.pom
    file.json
    file.tar.gz

    Required Output
     file.source.jar
     file.pom
    file.json
    file.tar.gz