André Martins
05/06/2022, 9:40 AMsourceSets.main.allJava
in the sources jar. When I use Go to definition
in any of the java code it works but on the kotlin it doesn’t, any ideia why?
My publish gradle script looks like this
apply plugin: 'maven-publish'
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier 'sources'
}
publishing {
repositories {
maven {
name 'myRepo'
url '<url>'
credentials {
username 'user'
password 'password'
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
}
}
}
Chris Lee
05/06/2022, 1:06 PMconfigure<JavaPluginExtension> {
withJavadocJar()
withSourcesJar()
}
…replaces the need to manually assemble & publish sources.Chris Lee
05/06/2022, 1:06 PMjava {
withJavadocJar()
withSourcesJar()
}
Groovy equivalent