title: How to script Gradle in order to publish shadowjar into Artifactory
body: <p>I am using shadowJar in my java project.
  I would like to push the outcome into artifactory.</p>
  
  <p>My gradle script look like this, I am not sure how to connect the dots:</p>
  
  <pre><code>shadowJar {
      baseName = 'com.mycompany.myapp'
      manifest {
          attributes 'Main-Class': 'myapp.starter'
      }
  }
  
  
    ]
      apply plugin: 'java'
      apply plugin: 'idea'
      apply plugin: 'maven'
      apply plugin: 'com.github.johnrengelman.shadow'
  
  
      // rep for the project
      repositories {
          mavenCentral()
          maven {
              url 'http://repo.company:8081/artifactory/libs-release'
              credentials {
                  username = "${repo_user}"
                  password = "${repo_password}"
              }
          }
          maven {
              url 'http://repo.company:8081/artifactory/libs-snapshot'
              credentials {
                  username = "${repo_user}"
                  password = "${repo_password}"
              }
          }
  
  }
  
  
  publishing {
      publications {
          mavenJava(MavenPublication) {
              from components.java
  
              artifact sourceJar {
                  classifier "sources"
              }
          }
      }
  }
  </code></pre>
  
  <p>How do I code gradle to take the shadowjar file?</p>
  
  <p>thanks,
  ray.</p>