title: Convert to gradle-kotlin-dsl Jfrog.Artifactory config
body: <p>I'm trying to migrate from groovy to gradle-kotlin dsl, but I'm new to it, so I dont know how to configure Jfrog Artifactory. Please help me with converting that part of code to gradle-kotlin dsl:</p>
  
  <pre><code>task sourceJar(type: Jar) {
      from sourceSets.main.allJava
  }
  
  artifactory {
      contextUrl = "http://10.0.0.49:8081/artifactory"
      publish {
          repository {
              repoKey = 'gradle-dev-local'
              username = artifactory_username
              password = artifactory_password
          }
          defaults {
              publications('mavenJava')
              publishArtifacts = true
              publishPom = true
          }
      }
  }
  
  
  
  publishing {
      publications {
          mavenJava(MavenPublication) {
              groupId = "ua.tiras.oloader"
              artifactId = 'core'
              version = "1.0.62"
              artifact("$buildDir/libs/${project.getName()}.jar")
              artifact sourceJar {
                  classifier "sources"
              }
              pom.withXml {
                  def dependenciesNode = asNode().appendNode('dependencies')
                  configurations.api.allDependencies.each { dependency -&gt;
                      def dependencyNode = dependenciesNode.appendNode('dependency')
                      dependencyNode.appendNode('groupId', dependency.group)
                      dependencyNode.appendNode('artifactId', dependency.name)
                      dependencyNode.appendNode('version', dependency.version)
                  }
              }
          }
      }
  }
  </code></pre>