title: Could not find method uploadArchives() for arguments in build.gradle
body: <p>I updated the gradle version to the 7.0.4 (<code>com.android.tools.build:gradle:7.0.4</code>)</p>
  <p>And now in some of my modules I am solving the <a href="https://docs.gradle.org/7.0/userguide/upgrading_version_6.html#removal_of_the_legacy_maven_plugin" rel="noreferrer">problem</a> with maven.</p>
  <p>So i replace <code>apply plugin: 'maven'</code> on <code>apply plugin: 'maven-publish'</code></p>
  <p>But I don't understand how to rewrite this section of code correctly:</p>
  <pre><code>uploadArchives {
      repositories {
          mavenDeployer {
              repository(url: uri(&quot;${rootProject.projectDir}/maven-repo&quot;))
          }
      }
  }
  
  uploadArchives.dependsOn sourcesJar
  </code></pre>
  <p>Because when I start, I get the following error:</p>
  <blockquote>
  <p>Could not find method uploadArchives() for arguments
  [build_ejkqjjnby5fggiavovparsecy$_run_closure5@c0f0c25] on project
  ':authenticator_sdk' of type org.gradle.api.Project</p>
  </blockquote>