bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 197 forks source link

401 when put user and key in gradle.properties #176

Closed Bpazy closed 7 years ago

Bpazy commented 7 years ago

when

user = 'hanzi...'
key = '9e7e86971f49...'

everything is ok.

But when put user and key in gradle.properties

user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')

I will get HTTP/1.1 401 Unauthorized [message:This resource requires authentication]

And in this case, use println it will output correct user and key(just like write the user and key in source code on the topside)

Bpazy commented 7 years ago

Resolved! gradle.properties value should not in quotes. Such as:

//gradle.properties
user = test

instate of user = 'test'