title: how to write script in gradle to update svn project
body: <p>I am trying to learn Gradle and,
  I try to build this code but it wasn't working.
  can someone tell me where is it failing?</p>
  
  <pre><code>import org.tmatesoft.svn.core.wc2.*
  import org.tmatesoft.svn.core.wc.*
  import org.tmatesoft.svn.core.*
  
  allprojects {
      repositories {
          jcenter { url "http://jcenter.bintray.com"}
          mavenCentral()
      }
      dependencies {
          classpath group: 'org.tmatesoft.svnkit', name: 'svnkit', version: '1.7.11'
      }
  }
  
  task svnCommitFile(){
      description = "Commits a single file to an SVN repository"
      doLast{
          if (!project.hasProperty("commitMsg")){
            ext.commitMsg = "None"
          }
          SvnOperationFactory svnOperationFactory = new SvnOperationFactory()
          def authentication = SVNWCUtil.createDefaultAuthenticationManager(svnUser, svnPassword)
          svnOperationFactory.setAuthenticationManager(authentication)
          try {
              SvnCommit commit = svnOperationFactory.createCommit()
              commit.setSingleTarget(SvnTarget.fromFile(new File(fileToCommit)))
              commit.setCommitMessage(commitMsg)
              SVNCommitInfo commitInfo = commit.run()
              println "Commit info: " + commitInfo
              println "Commit message: " + commitMsg
          } finally{
              svnOperationFactory.dispose()
          }
      }
  }
  </code></pre>