I work at a big company with a strict policy forbidding the unfiltered use of outside libraries. We have to pull everything from blessed corporate repositories, and not the bare internet, including gradle.org.
Using gradle's original apply plugin syntax, in conjunction with a buildscript block, I can add (blessed) plugins to our repo and use them in builds. In other words:
buildscript {
repositories {
maven { url "https://privaterepo.myemployer.com" }
}
dependencies {
// various dependencies
classpath "org.something:some-plugin:1.0"
...
}
apply plugin: "someplugin"
Instead, I want to be able to use the new plugins DSL, i.e.
plugins {
id 'org.something.some-plugin' version '1.0'
}
(I realize that the private repo url would need to be defined somewhere)
The new plugin syntax always goes to gradle.org and does not appear to have any means to provide an alternate download url. Does anyone know of a way?
I've scrutinized the documentation and the Internet and can't find the answer. Apologies if the answer is completely obvious.
Many Thanks!
question from:
https://stackoverflow.com/questions/37285413/how-can-the-gradle-plugin-repository-be-changed 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…