I'm developing an Android app, and I don't want to put creds under source control. I'm defining some creds in my gradle.properties
file, like so:
user="bob"
pass="123"
I then import them in my build.gradle
file, like so:
buildConfigField('String', "user", user)
resValue('string', "user", user)
Then, I can access them from Java as if they were a normal String resource.
Unfortunately, I also need to include a multi-line string in my gradle.properties
file. I've tried the following:
long_string="this is
a multi-line string"
However, when I try to build my project, I get an error message that I have an unclosed string literal.
The docs for gradle.properties don't seem to mention anything about multi-line string formatting.
Is what I want to do possible?
You can also do this:
long_string="this is a \
multi-line string \
yay"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With