seu-as-code / seu-as-code.plugins

The Gradle plugins for SEU-as-code.
Apache License 2.0
28 stars 10 forks source link

Credentials Plugin Configuration different on gradle 2.9 #22

Closed Theoderich closed 8 years ago

Theoderich commented 8 years ago

On gradle 2.9, I cannot use the credentials plugin as described in the documentation. The docs says I should reference credentials like this:

username credentials.get('nexusUsername')
password credentials.get('nexusPassword')

but that leads to the following error:

What went wrong:
A problem occurred evaluating root project 'seu'.
> No signature of method: org.gradle.api.internal.artifacts.repositories.DefaultPasswordCredentials_Decorated.get() is applicable for argument types: (java.lang.String) values: [nexusUsername]
Possible solutions: getAt(java.lang.String), grep(), grep(java.lang.Object), wait(), any(), wait(long)

When I change the configuration to the following (as described here: https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html), the plugin works as expected

username project.credentials.get('nexusUsername')
password project.credentials.get('nexusPassword')
phxql commented 8 years ago

Hi,

I fixed this in https://github.com/seu-as-code/seu-as-code.plugins/pull/23.