I’m a beginner when it comes to Groovy, so this is probably something silly. I have 2 libraries and want one to depend on the other:
sources {
lib1 {
...
}
lib2 {
cpp {
lib libraries.lib1
}
}
}
libraries {
lib1 {
...
}
lib2 {
...
}
}
The lib2 source set doesn’t know about the lib1 library since it has not been declared yet… is there some trick to lazily evaluate the dependency line? The other solution would be to do:
sources { lib1 { } }
library { lib1 { } }
sources { lib2 { cpp { lib libraries.lib1 } } }
But that seems like a dirty trick…