The groovy code below is working fine in a script build.gradle :
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
I can't succeed in translating its syntax to kotlin build.gradle.kts. Could someone give me the correct translation ?