Gradle 如何解决IntelliJ中的“无法将‘字符串’分配给‘发布’”渐变错误?

Gradle 如何解决IntelliJ中的“无法将‘字符串’分配给‘发布’”渐变错误?,gradle,intellij-idea,groovy,ide,jetbrains-ide,Gradle,Intellij Idea,Groovy,Ide,Jetbrains Ide,我正在使用Gradle 6.7进行一个项目,我正在使用IntelliJ。在编写Gradle文件或运行检查时,我经常遇到这个错误 无法将“字符串”分配给“发布” 根据Gradle文档和所有示例,我的配置似乎是正确的,但我无法解决这些警告 import org.gradle.api.tasks.testing.logging.TestLogEvent buildscript { buildscript { repositories { google(

我正在使用Gradle 6.7进行一个项目,我正在使用IntelliJ。在编写Gradle文件或运行检查时,我经常遇到这个错误

无法将“字符串”分配给“发布”

根据Gradle文档和所有示例,我的配置似乎是正确的,但我无法解决这些警告

import org.gradle.api.tasks.testing.logging.TestLogEvent

buildscript {
    buildscript {
        repositories {
            google()
            mavenCentral()
            gradlePluginPortal()
            jcenter()
        }
        dependencies {
            classpath "org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11:1.0.1"
            classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.8"
            classpath "net.ltgt.gradle:gradle-nullaway-plugin:0.2"
            classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.5"
        }
    }
}


apply plugin: 'java'
apply plugin: 'scalaStyle'
apply plugin: 'scala'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'net.ltgt.nullaway'
apply plugin: "com.dorongold.task-tree"
apply plugin: "jacoco"

group 'com.mridang'
version '0.0.2'

...
...

publishing {
    repositories {
        maven {
            name = "github"
            url = uri("https://maven.pkg.github.com/mridang/myrepo")
            credentials(PasswordCredentials)
        }
    }
    publications {
        maven(MavenPublication) {
            from components.java

            artifact sourcesJar
            artifact scaladocJar

            pom {
                name = 'myproject'
                description = 'Foo'
                url = 'https://github.com/mridang/myrepo'
                issueManagement {
                    system = "Github"
                    url = "https://github.com/mridang/myrepo/issues"
                }
            }
        }
    }
}
下面的屏幕截图更好地说明了这个问题:


这是假阳性检验警告。您可以在跟踪器中对此问题进行投票。

这是假阳性检查警告。您可以在tracker:.

中对此问题进行投票。只是想澄清一下:这是您在命令行/终端上运行gradle时遇到的错误吗?或者只是intellij在抱怨?这只是intellij 2020.1抱怨欢迎来到intellij的世界不知道发生了什么;需要澄清的是:这是在命令行/终端上运行gradle时出现的错误吗?或者只是intellij在抱怨?这只是intellij 2020.1抱怨欢迎来到intellij的世界不知道发生了什么;