Resource not found
jimlyas opened this issue · 3 comments
jimlyas commented
And this is my build.gradle (app) :
I am using version 4.0.0, please help @efraespada
efraespada commented
@jimlyas
What resource is not found? The strings.xml
is detected with your current SC config (the default).
The sourceSets
config also seems to be the default, so you can remove it.
So you only need this:
stringcare {
debug true
assetsFiles = ["*.json"]
}
If you want to add more files:
stringcare {
debug true
assetsFiles = ["*.json"]
stringFiles = ["strings.xml", "other_strings.xml"]
}
efraespada commented
Also, I recommend you to use the FileInputStream
as a separate field and close()
the stream after load it in the Properties
object.
apply plugin: StringCare
def apiKeyProperties = new Properties()
def apiFile = file('./apiKey.properties')
def inputStream = new FileInputStream(apiFile)
apiKeyProperties.load(inputStream)
inputStream.close()
stringcare {
debug true
assetsFiles = ["*.json"]
}
jimlyas commented
thanks, it worked... :)