The problem of adversary target detection and the subsequent task completion using a heterogeneous network of resource-constrained UAVs is considered. No prior knowledge about locations and required resources to identify these targets is available to the UAVs. In the proposed leader-follower coalition formation model, the UAV that first locates a target serves as the coalition leader and selects a group of follower UAVs to complete the task associated with the identified target. The goal of the coalition formation is to complete the designated tasks with minimal resource utilization. Another role of coalition members is to make the ground station aware of the detected adversary target by forwarding its signal to the station via a distributed cooperative relaying scheme. We also propose a reputation-based mechanism for coalition formation to monitor the cooperative behavior of the UAVs over the course of time and exclude potentially untrustworthy UAVs. Simulation results show the efficiency of the proposed method in forming optimal coalitions compared to alternative methods.