As applications become larger, building their UI is getting harder. While a lot of research focuses on new ways of building UIs, little work focuses on reusing existing UI components to automatically compose large-scale interfaces. This paper introduces Yeti, an automatic UI composer for desktop and android applications written in Java, that adopts a task-driven discipline where task hierarchy denotes component containment and control. We propose the notion of globally unique task identifiers to avoid task naming confusions across components and repositories. To enable applications set mandatory control aspects for the retrieved UI components, we introduce required APIs as part of task definitions. Yeti emphasizes the composition of reusable coarse-grained UI components rather than automatic UI creation from scratch, so no lowerlevel specifications are deployed. Retrieved and composed components can be directly handled inside application logic via the application-defined APIs and the generic component interface required for all components. This programmingoriented approach allows UI programmers to deploy Yeti as a software library, while it enables the mix of composed UI parts with manually coded ones. To validate our system and demonstrate its deployment, we present an example application created from existing components.