title: Could not find method exclude() for arguments on object of type org.gradle.api.internal.artifacts.dependencies.DefaultSelfResolvingDependency
body: <p>I used to have</p>
  
  <pre><code>implementation(group: "com.domain.package", name: "lib-name", version: "$ver") {
      exclude group: 'com.android.support'
      exclude group: 'com.squareup.okhttp3'
      exclude group: 'com.google.dagger'
  }
  </code></pre>
  
  <p>When I import as aar</p>
  
  <pre><code>implementation (files('libs/lib-name.aar')) {
      exclude group: 'com.android.support'
      exclude group: 'com.squareup.okhttp3'
      exclude group: 'com.google.dagger'
  }
  </code></pre>
  
  <p>I got the following error.</p>
  
  <pre><code>* What went wrong:
  A problem occurred evaluating project ':app'.
  &gt; Could not find method exclude() for arguments [{group=org.apache.commons}] on object of type 
  org.gradle.api.internal.artifacts.dependencies.DefaultSelfResolvingDependency.
  </code></pre>
  
  <p>Wonder what went wrong?</p>
  
  <p>Note: I have check on <a href="https://stackoverflow.com/questions/41770540/could-not-find-method-exclude-for-arguments-module-support-v4">Could not find method exclude() for arguments [{module=support-v4}]</a>, which ensure the extra parenthesis is there, that I have done. But it is not helping.</p>