Stephan Schroeder
06/27/2019, 12:47 PMjava
can’t be resolved in
tasks{
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components.get().java) //in groovy it's 'components.java'
}}}}
and according to the docu (https://docs.gradle.org/current/dsl/org.gradle.api.publish.maven.MavenPublication.html#N1BEBB) 3 types of component are supported: ‘components.java’ (added by the JavaPlugin) And I do import the javaPlugin:
plugins {
java
`maven-publish`
So I get why java
can’t be found on components.get()
statically (because it’s added dynamically by a different plugin). But how can i access it?
This is the javadoc of the class CompoentReport
and I’m still not able to figure it out: https://docs.gradle.org/current/javadoc/org/gradle/api/reporting/components/ComponentReport.htmlStephan Schroeder
06/27/2019, 1:38 PMpublishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}}}
and publishing is not not a task but on ground-level!