I am trying to understand how a Gradle pro would read this block.
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
What is the call stack if we convert this to java or groovy code?
Based on intellisense from IntelliJ idea, I tried this one:
publishing{
publications{ pubContainer ->
pubContainer.create('mavenJava').asType(MavenPublication.class){
}
}
}
Getting this error:
Cannot create a Publication named 'mavenJava' because this container
does not support creating elements by name alone.
Please specify which subtype of Publication to create. Known subtypes are: MavenPublication