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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -