Error Resolving configuration 'apiElements' directly is not allowed

Thanks for your help and your answer, you give me some example for resolve [this problem]?(Add dependence of the project into my custom plugin)