public static final String DEFAULT_GRADLE_REPO_NAME = "GradlePlugins";
public static final String GRADLE_URL = "https://plugins.gradle.org/m2/";
public MavenArtifactRepository gradleRepo() {
return addRepository(repositoryFactory.createGradleRepository(), DEFAULT_GRADLE_REPO_NAME);
}
public MavenArtifactRepository gradleRepo(Action<? super MavenArtifactRepository> action) {
return addRepository(repositoryFactory.createGradleRepository(), DEFAULT_GRADLE_REPO_NAME, action);
}
Once this issue is acknowledged, I can make a quick pull request to the Gradle github.
It’s an interesting request. Can you help me understand your use case? (i.e. Why do you want to supply the Gradle Plugins Portal repo as a repository in your build script?
One of the nice things about the Gradle Plugin Portal is that you don’t need to set up a reference to its maven repository to use the plugins from there. You simply use the plugins block and provide the id and version of the plugin you want to use. The Gradle Plugin Portal then figures out what maven artifacts you need to provide that plugin from the repo.
Example
plugins {
id "com.jfrog.bintray" version "0.4.1"
}
If you still want a gradleRepo() method like the one you are suggesting, I think we need to establish a better understanding for why.
I have one: When preparing course materials which involve Gradle, I like to have the ability to cache everything in a local repository (using the Ivypot plugin). In those cases I need to specify the plugin repository in order to download the plugins as well. It would just be nice to have it as a named repo available both in buildscript.repositories and in project.repositories.