android - Relative path in build.gradle differs between Windows and OS X -


my project have folder keystore file (file.keystore). structure:

+---.gradle |   \---2.2 |       \---taskartifacts +---.idea |   +---copyright |   \---libraries +---app |   +---build |   |   +---generated |   +---libs |   \---src |       +---androidtest |       \---main +---build |   \---intermediates |       \---dex-cache +---gradle |   \---wrapper \---keystore 

to use in build.gradle use this:

signingconfigs {     project {         keyalias 'project'         keypassword 'blabla'         storefile file('keystore\\file.keystore')         storepassword 'blabla'     } 

in windows correct because searches in:

/project/keystore/file.keystore

but in os x searching in:

/project/app/keystore/file.keystore

how should code in build.gradle?

use groovy string interpolation $rootdir property.

project {    ...         storefile file("$rootdir\keystore\file.keystore")    ... } 

note uses "double quotation"


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -