Is any way to attach sources to dependency which declared via files()?

Is any way to attach sources to dependency which declared via files()?

It might work if the source Jar is named like the main Jar but with a ‘-sources’ suffix. Alternatively, you could try with a local Maven or Ivy repository.