I want create a source JAR file from my project with every files (not with class files). Have you any idea?
Asked
Active
Viewed 2,239 times
1 Answers
2
Use task javadocJar
and sourceJar
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar
archives sourcesJar
}

Vy Do
- 46,709
- 59
- 215
- 313