Does anyone know if its possible to access string resources within the build.gradle file? something like the following.
dependencies {
compile(group: 'com.mysite.myapp', name: 'lib', version: '@string/version_number', ext: 'aar')
}
I think something like this should work. Since it internally uses groovy.
def your_string = 'some_string';
dependencies {
compile(group: 'com.mysite.myapp', name: 'lib', version: your_string + '/version_number', ext: 'aar')
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.