I’m trying to configure my Gradle project to download the com.android.application plugin (version 8.7.2) from my private Nexus repository. I can only use this Nexus repository
(https://nexus.com.br/my-repo/) to fetch dependencies, and everything seems to be correctly set up.
Here is the error I’m encountering:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.7.2', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:8.7.2')
Searched in the following repositories: maven(https://nexus.com.br/my-repo/)
The Nexus repository doesn’t return any explicit authentication errors in the logs, but Gradle still fails to resolve the plugin.
I’ve already verified:
- The credentials are correct, and Nexus is accessible (tested via
curl). - The plugin artifact is not being found, but I can access the nexus repository from browser.
- The version 8.7.2 seems valid but isn’t being resolved from Nexus.
Is there something I might be missing in the Gradle or Nexus configuration? How can I ensure that Gradle can authenticate and resolve the plugin from the Nexus repository?
This is my build.gradle on Project level:
buildscript {
ext {
nexus = {
credentials {
username "$mavenUser"
password "$mavenPassword"
}
url "$nexusRepoURL"
}
}
repositories {
maven(nexus)
}
}
This is my settings.gradle
pluginManagement {
ext {
nexus = {
credentials {
username "$mavenUser"
password "$mavenPassword"
}
url "$nexusRepoURL"
}
}
repositories {
maven(nexus)
}
}