There is a similar question ( How do I attach source code into a project's library in Eclipse? ).
However, in my case the jar has the description non modifiable and the option Edit is not possible. What to do in this case?
For homegrown projects the solution is to create a source jar for the library that you use. This can be done by adding to build.gradle
task sourceJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
And then add to publications:
artifact sourceJar
Publish the jars to the local Maven repository, then the source will be attached in Eclipse while referring this library.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.