Hello,
Is it possible to use a plugin within a root project’s buildscript
section? I need to be able to do this in order to define how my other plugins should be resolved.
I’m using the gradle-credentials-plugin to set a maven_password
property so I can define my own maven repository. The plugin then provides a credentials
object which can be accessed in the build script. Here is a broken example of the kind of thing I’m trying to do:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath('nu.studer:gradle-credentials-plugin:1.0.4')
}
apply plugin: 'nu.studer.credentials'
String maven_password = credentials.maven_password // from gradle-credentials-plugin
repositories {
maven {
url maven_url // from ~/.gradle/gradle.properties
credentials {
username = maven_user // from ~/.gradle/gradle.properties
password = maven_password
}
}
}
dependencies {
classpath('carter.will:custom-plugin:1.0.0')
}
}
Thank you very much for any assistance.
Will