I have a native project with multiple references to external libraries (on Linux):
model {
components { ... }
repositories {
libs(PrebuiltLibraries) {
m {
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("/usr/lib64/libm.so")
}
}
rt {
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("/usr/lib64/librt.so")
}
}
}
}
}
I’m sure I can define m { ... }
and rt { ... }
with a loop because they follow the same template:
["m", "rt"].each {
??? {
binaries.withType(SharedLibraryBinary) {
sharedLibraryFile = file("/usr/lib64/lib${it}.so")
}
}
}
How can I do so?