just to not hide my problem in the subthread. The ...
# gradle
s
just to not hide my problem in the subthread. The only remaining problem now is that
java
can’t be resolved in
Copy code
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:
Copy code
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.html
found it!
Copy code
publishing {
    publications {
        create<MavenPublication>("mavenJava") {
            from(components["java"])
    }}}
and publishing is not not a task but on ground-level!