guides
guides copied to clipboard
Clarity enhancement on Implementing Gradle Plugins guide
Message relates to following guide: https://guides.gradle.org/implementing-gradle-plugins/
Regarding the ServerEnvironmentPlugin section of the guide it is not clear what serverEnvironment.getName would return?
It is not clear what getName will return because 3 names are defined in the DSL shown.
This is first time I am writing a plugin so apologies if I am missing something.
Thank you, Daniel.
Does this help out at all?
The below code would create 3 instances of a ServerEnvironment each would have a different name.
environments {
dev { // name would be 'dev'
url = 'http://localhost:8080'
}
staging { // name would be 'staging'
url = 'http://staging.enterprise.com'
}
production { // name would be 'production'
url = 'http://prod.enterprise.com'
}
}