如何使用 Gradle 导入库 "Symja" 才能使用 Elasticsearch 服务器模块?

How does the library "Symja" need to be imported with Gradle in order to work with the Elasticsearch server module?

对于一个项目,我想扩展 Elasticsearch,因此需要使用提供的包 Symja. In the Github for Symja, there is a manual for the usage with Maven

由于 Elasticsearch 存储库是使用 Gradle 构建的,我还需要使用 Gradle 而不是 Maven。测试 suggested example Symja project,下面的 build.gradle(我基本上使用 gradle init 生成并稍作调整)完美导入库:

apply plugin: 'java'
apply plugin: 'maven-publish'

repositories {
    mavenLocal()
    maven {
        url = uri('https://oss.sonatype.org/content/repositories/snapshots')
    }
    maven {
        url = uri('https://repo.maven.apache.org/maven2/')
    }
}

dependencies {
    implementation 'org.matheclipse:matheclipse-core:1.0.0-SNAPSHOT'
}

publishing {
    publications {
        maven(MavenPublication) {
            from(components.java)
        }
    }
}

现在,我想将 Symja 添加到我的 Elasticsearch 分支到 server 模块中。

不过,当我尝试构建它时,导入

import org.matheclipse.parser.client.SyntaxError;
import org.matheclipse.parser.client.math.MathException;

的 Symja 示例未检测到:java: package org.matheclipse.parser.client does not exist。可能出了什么问题?

我更新后的 build.gradle of the server module 看起来像这样:

...
apply plugin: 'java'
apply plugin: 'maven-publish'

publishing {
    publications {
        ...
        maven(MavenPublication) {
            from(components.java)
        }
    }
}

repositories {
    mavenLocal()
    maven {
        url = uri('https://oss.sonatype.org/content/repositories/snapshots')
    }
    maven {
        url = uri('https://repo.maven.apache.org/maven2/')
    }
}

...

dependencies {
    ...
    // Symja
    implementation "org.matheclipse:matheclipse-core:1.0.0-SNAPSHOT"
    ...
}

...

编辑: 在按照@axelclk 的建议添加 implementation "org.matheclipse:matheclipse-frontend:1.0.0-SNAPSHOT" 之后,我的 IDE 现在可以检测到这些包。虽然,如果我构建 build.gradle(同时在 org.elasticsearch.index.query.BoolQueryBuilder.java 中的方法中包含 Symja 示例),则会出现以下错误:

C:\{path here...}\elasticsearch\server\src\main\java\org\elasticsearch\index\query\BoolQueryBuilder.java:454: error: cannot access GcdRingElem
            System.out.println("Out[2]: " + result.toString());
                                                  ^
  class file for edu.jas.structure.GcdRingElem not found
C:\{path here...}\elasticsearch\server\src\main\java\org\elasticsearch\index\query\BoolQueryBuilder.java:459: error: cannot access FieldElement
            System.out.println("Out[3]: " + result.toString());
                                                  ^
  class file for org.hipparchus.FieldElement not found

似乎不​​知何故,toString 方法无法正常工作。此外,如果我 运行 我的 Elasticsearch 分支 gradlew run -Dtests.es.xpack.security.enabled=false -Dtests.heap.size=1G,构建失败并显示以下输出:

> Configure project :modules:reindex
Disabling reindex-from-old tests because we can't get the pid file on windows

> Configure project :plugins:repository-hdfs
hdfsFixture unsupported, please set HADOOP_HOME and put HADOOP_HOME\bin in PATH

> Configure project :x-pack:plugin:searchable-snapshots:qa:hdfs
hdfsFixture unsupported, please set HADOOP_HOME and put HADOOP_HOME\bin in PATH
=======================================
Elasticsearch Build Hamster says Hello!
  Gradle Version        : 6.8
  OS Info               : Windows 10 10.0 (amd64)
  JDK Version           : 15 (Oracle)
  JAVA_HOME             : C:\Program Files\Java\jdk-15.0.1
  Random Testing Seed   : C5A79F8CABA0D6FA
  In FIPS 140 mode      : false
=======================================

> Task :server:compileJava
C:\{path here ...}\elasticsearch\server\src\main\java\org\elasticsearch\index\query\BoolQueryBuilder.java:454: error: cannot access GcdRingElem
            System.out.println("Out[2]: " + result.toString());
                                                  ^
  class file for edu.jas.structure.GcdRingElem not found
C:\{path here ...}\elasticsearch\server\src\main\java\org\elasticsearch\index\query\BoolQueryBuilder.java:459: error: cannot access FieldElement
            System.out.println("Out[3]: " + result.toString());
                                                  ^
  class file for org.hipparchus.FieldElement not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

> Task :server:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 58s
228 actionable tasks: 8 executed, 220 up-to-date

编辑 2: 我添加了 implementation "org.matheclipse:matheclipse-external:1.0.0-SNAPSHOT" 并按照@axelclk 的建议将 mavenLocal() 替换为 mavenCentral() 这不会导致任何结果不同的结果。

编辑 3: 我再次根据@axelclk 的建议添加了 matheclipse-externalpom.xml 文件和matheclipse-core:

...
  // Symja
  implementation "org.matheclipse:matheclipse-external:1.0.0-SNAPSHOT"
  //implementation "org.apache.logging.log4j:log4j-core:2.13.2"
  //implementation "org.apache.logging.log4j:log4j-api:2.13.2"
  testImplementation "org.slf4j:slf4j-simple:1.7.25"
  implementation "org.slf4j:log4j-over-slf4j:1.7.25"
  //implementation "com.google.guava:failureaccess:1.0.1"
  //implementation "com.google.guava:guava:30.1.1-jre"
  implementation "com.fasterxml.jackson.core:jackson-databind:2.11.0"
  implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0"
  implementation "io.pebbletemplates:pebble:3.1.5"
  implementation "org.jheaps:jheaps:0.13"
  implementation "org.antlr:antlr4-runtime:4.8-1"
  implementation "org.apache.commons:commons-text:1.8"
  //testImplementation "junit:junit:4.13.1"

  implementation "org.matheclipse:matheclipse-frontend:1.0.0-SNAPSHOT"

  implementation "org.matheclipse:matheclipse-core:1.0.0-SNAPSHOT"
  implementation "org.commonmark:commonmark:0.17.1"
  implementation "org.commonmark:commonmark-ext-gfm-tables:0.17.1"
  implementation "org.apfloat:apfloat:1.10.0-SNAPSHOT"
  //implementation "org.apache.logging.log4j:log4j-core:2.13.2"
  //implementation "org.apache.logging.log4j:log4j-api:2.13.2"
  //testImplementation "org.slf4j:slf4j-simple:1.7.25"
  //implementation "org.slf4j:log4j-over-slf4j:1.7.25"
  implementation "org.hipparchus:hipparchus-core:1.8"
  implementation "org.hipparchus:hipparchus-clustering:1.8"
  implementation "org.hipparchus:hipparchus-fft:1.8"
  implementation "org.hipparchus:hipparchus-fitting:1.8"
  implementation "org.hipparchus:hipparchus-ode:1.8"
  implementation "org.hipparchus:hipparchus-optim:1.8"
  implementation "org.hipparchus:hipparchus-stat:1.8"
  //implementation "commons-codec:commons-codec:1.14"
  implementation "org.apache.commons:commons-lang3:3.11"
  implementation "com.google.code.findbugs:jsr305:3.0.0"
  implementation "org.logicng:logicng:2.0.2"
  implementation "org.gavaghan:geodesy:1.1.3"
  implementation "it.unimi.dsi:fastutil:8.5.2"
  implementation "org.codehaus.janino:janino:3.1.3"
  implementation "com.ibm.icu:icu4j:68.2"
  implementation "com.univocity:univocity-parsers:2.8.4"
  testImplementation "org.junit.jupiter:junit-jupiter-api:5.4.2"
  testImplementation "org.junit.jupiter:junit-jupiter-engine:5.4.2"
  testImplementation "org.junit.vintage:junit-vintage-engine:5.4.2"

  //implementation "org.matheclipse:matheclipse-api:1.0.0-SNAPSHOT"
  //implementation "org.matheclipse:matheclipse-io:1.0.0-SNAPSHOT"
  //implementation "org.matheclipse:matheclipse-beakerx:1.0.0-SNAPSHOT"
...

现在,server 版本似乎可以工作了。但是,如果我现在 运行 使用 gradlew run -Dtests.es.xpack.security.enabled=false -Dtests.heap.size=1G,则有不同的任务失败:

> Configure project :modules:reindex
Disabling reindex-from-old tests because we can't get the pid file on windows

> Configure project :plugins:repository-hdfs
hdfsFixture unsupported, please set HADOOP_HOME and put HADOOP_HOME\bin in PATH

> Configure project :x-pack:plugin:searchable-snapshots:qa:hdfs
hdfsFixture unsupported, please set HADOOP_HOME and put HADOOP_HOME\bin in PATH
=======================================
Elasticsearch Build Hamster says Hello!
  Gradle Version        : 6.8
  OS Info               : Windows 10 10.0 (amd64)
  JDK Version           : 15 (Oracle)
  JAVA_HOME             : C:\Program Files\Java\jdk-15.0.1
  Random Testing Seed   : 266D7D1003A7C996
  In FIPS 140 mode      : false
=======================================

> Task :modules:kibana:bundlePlugin FAILED
> Task :modules:ingest-user-agent:bundlePlugin FAILED
> Task :modules:aggs-matrix-stats:bundlePlugin FAILED
> Task :modules:ingest-common:bundlePlugin FAILED
> Task :modules:lang-mustache:bundlePlugin FAILED
> Task :modules:ingest-geoip:bundlePlugin FAILED
> Task :modules:analysis-common:bundlePlugin FAILED
> Task :modules:geo:bundlePlugin FAILED

FAILURE: Build completed with 8 failures.

1: Task failed with an exception.
-----------
* What went wrong:
...

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
204 actionable tasks: 9 executed, 195 up-to-date

我觉得这很好奇,因为我没有对我的 Elasticsearch 分支的这些部分进行任何更改。这里发生了什么?

编辑 4: 在 Elasticsearch 的“jar hell”功能出现一些问题后,我在@IanGabes 的帮助下通过添加 repositories 到根的 build.gradle。 问题是,Symja 类 似乎还不能工作。我有一个方法 normalize 目前执行以下操作:

private void normalize(String queryString) {
    System.out.println("I'm here!");
    String eString = "";
    ExprEvaluator util = new ExprEvaluator(false, (short) 100);
    IExpr e;
}

该方法在 Elasticsearch 的 BoolQueryBuilder.doToQuery() 中调用,就在 addBooleanClauses 调用之前。现在我 POST 正在 BooleanQuery。正如预期的那样,有输出 "I'm here!"。之后,会发生以下情况:

...
╗ [2021-04-19T22:54:29,779][INFO ][stdout ] [runTask-0] I'm here!
╗ [2021-04-19T20:54:30.497923300Z] [BUILD] Stopping node

=== Standard error of node `node{::runTask-0}` ===
╗ ? last 40 non error or warning messages from C:\{path...}\elasticsearch\build\testclusters\runTask-0\logs\es.stderr.log ?
╗ fatal error in thread [elasticsearch[runTask-0][search][T#1]], exiting
╗ java.lang.NoClassDefFoundError: com/google/common/util/concurrent/UncheckedTimeoutException
╗ at org.elasticsearch.index.query.BoolQueryBuilder.normalize(BoolQueryBuilder.java:440)
╗ at org.elasticsearch.index.query.BoolQueryBuilder.doToQuery(BoolQueryBuilder.java:332)
╗ at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:103)
╗ at org.elasticsearch.index.query.SearchExecutionContext.lambda$toQuery(SearchExecutionContext.java:464)
╗ at org.elasticsearch.index.query.SearchExecutionContext.toQuery(SearchExecutionContext.java:476)
╗ at org.elasticsearch.index.query.SearchExecutionContext.toQuery(SearchExecutionContext.java:463)
╗ at org.elasticsearch.search.SearchService.parseSource(SearchService.java:912)
╗ at org.elasticsearch.search.SearchService.createContext(SearchService.java:750)
╗ at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:438)
╗ at org.elasticsearch.search.SearchService.lambda$onResponse[=20=](SearchService.java:406)
╗ at org.elasticsearch.action.ActionRunnable.lambda$supply[=20=](ActionRunnable.java:58)
╗ at org.elasticsearch.action.ActionRunnable.doRun(ActionRunnable.java:73)
╗ at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
╗ at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44)
╗ at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:739)
╗ at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
╗ at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
╗ at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
╗ at java.base/java.lang.Thread.run(Thread.java:832)
╗ Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.UncheckedTimeoutException
╗ at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
╗ at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
╗ at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
╗ ... 19 more

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Elasticsearch cluster died

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at help.gradle.org

BUILD FAILED in 3m 34s
429 actionable tasks: 13 executed, 416 up-to-date

我看不出几个用于初始化 Symja 类 的命令在这里有什么坏处。但是当我将它们注释掉时,一切正常,所以问题似乎出在这个地方。 目前,以下依赖项包含在 gradle.build 中(或者分别注释掉,如果它们与不同模块的其他依赖项发生冲突):

...
  implementation "org.matheclipse:matheclipse-external:1.0.0-SNAPSHOT"
  //implementation "org.apache.logging.log4j:log4j-core:2.13.2"
  //implementation "org.apache.logging.log4j:log4j-api:2.13.2"
  testImplementation "org.slf4j:slf4j-simple:1.7.25"
  //implementation "org.slf4j:log4j-over-slf4j:1.7.25"
  //implementation "com.google.guava:failureaccess:1.0.1"
  //implementation "com.google.guava:guava:30.1.1-jre"
  //implementation "com.fasterxml.jackson.core:jackson-databind:2.11.0"
  implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0"
  implementation "io.pebbletemplates:pebble:3.1.5"
  implementation "org.jheaps:jheaps:0.13"
  //implementation "org.antlr:antlr4-runtime:4.8-1"
  implementation "org.apache.commons:commons-text:1.8"
  //testImplementation "junit:junit:4.13.1"

  implementation "org.matheclipse:matheclipse-frontend:1.0.0-SNAPSHOT"

  implementation "org.matheclipse:matheclipse-core:1.0.0-SNAPSHOT"
  implementation "org.commonmark:commonmark:0.17.1"
  implementation "org.commonmark:commonmark-ext-gfm-tables:0.17.1"
  implementation "org.apfloat:apfloat:1.10.0-SNAPSHOT"
  //implementation "org.apache.logging.log4j:log4j-core:2.13.2"
  //implementation "org.apache.logging.log4j:log4j-api:2.13.2"
  //testImplementation "org.slf4j:slf4j-simple:1.7.25"
  //implementation "org.slf4j:log4j-over-slf4j:1.7.25"
  implementation "org.hipparchus:hipparchus-core:1.8"
  implementation "org.hipparchus:hipparchus-clustering:1.8"
  implementation "org.hipparchus:hipparchus-fft:1.8"
  implementation "org.hipparchus:hipparchus-fitting:1.8"
  implementation "org.hipparchus:hipparchus-ode:1.8"
  implementation "org.hipparchus:hipparchus-optim:1.8"
  implementation "org.hipparchus:hipparchus-stat:1.8"
  //implementation "commons-codec:commons-codec:1.14"
  implementation "org.apache.commons:commons-lang3:3.11"
  implementation "com.google.code.findbugs:jsr305:3.0.0"
  implementation "org.logicng:logicng:2.0.2"
  implementation "org.gavaghan:geodesy:1.1.3"
  implementation "it.unimi.dsi:fastutil:8.5.2"
  implementation "org.codehaus.janino:janino:3.1.3"
  //implementation "com.ibm.icu:icu4j:68.2"
  implementation "com.univocity:univocity-parsers:2.8.4"
  testImplementation "org.junit.jupiter:junit-jupiter-api:5.4.2"
  testImplementation "org.junit.jupiter:junit-jupiter-engine:5.4.2"
  testImplementation "org.junit.vintage:junit-vintage-engine:5.4.2"
...

为了完整起见,我想至少包含@axelclk 和@IanGabes 给出的有效解决方案的一部分。首先,似乎有必要手动添加所有隐式依赖项以及它们源自的存储库 to server's build.gradle, corresponding to the pom.xml files of matheclipse-core and of matheclipse-external:

...
apply plugin: 'java'
apply plugin: 'maven-publish'

publishing {
    publications {
        ...
        maven(MavenPublication) {
            from(components.java)
        }
    }
}

repositories {
  mavenCentral()
  maven {
    url = uri('https://oss.sonatype.org/content/repositories/snapshots')
  }
  maven {
    url = uri('https://repo.maven.apache.org/maven2/')
  }
}

...

  // Symja
  implementation "org.matheclipse:matheclipse-external:1.0.0-SNAPSHOT"
  //implementation "org.apache.logging.log4j:log4j-core:2.13.2"
  //implementation "org.apache.logging.log4j:log4j-api:2.13.2"
  testImplementation "org.slf4j:slf4j-simple:1.7.25"
  //implementation "org.slf4j:log4j-over-slf4j:1.7.25"
  implementation "com.google.guava:failureaccess:1.0.1"
  //implementation "com.google.guava:guava:30.1.1-jre"
  //implementation "com.fasterxml.jackson.core:jackson-databind:2.11.0"
  implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0"
  implementation "io.pebbletemplates:pebble:3.1.5"
  implementation "org.jheaps:jheaps:0.13"
  //implementation "org.antlr:antlr4-runtime:4.8-1"
  implementation "org.apache.commons:commons-text:1.8"
  //testImplementation "junit:junit:4.13.1"

  implementation "org.matheclipse:matheclipse-frontend:1.0.0-SNAPSHOT"

  implementation "org.matheclipse:matheclipse-core:1.0.0-SNAPSHOT"
  implementation "org.commonmark:commonmark:0.17.1"
  implementation "org.commonmark:commonmark-ext-gfm-tables:0.17.1"
  implementation "org.apfloat:apfloat:1.10.0-SNAPSHOT"
  //implementation "org.apache.logging.log4j:log4j-core:2.13.2"
  //implementation "org.apache.logging.log4j:log4j-api:2.13.2"
  //testImplementation "org.slf4j:slf4j-simple:1.7.25"
  //implementation "org.slf4j:log4j-over-slf4j:1.7.25"
  implementation "org.hipparchus:hipparchus-core:1.8"
  implementation "org.hipparchus:hipparchus-clustering:1.8"
  implementation "org.hipparchus:hipparchus-fft:1.8"
  implementation "org.hipparchus:hipparchus-fitting:1.8"
  implementation "org.hipparchus:hipparchus-ode:1.8"
  implementation "org.hipparchus:hipparchus-optim:1.8"
  implementation "org.hipparchus:hipparchus-stat:1.8"
  //implementation "commons-codec:commons-codec:1.14"
  implementation "org.apache.commons:commons-lang3:3.11"
  implementation "com.google.code.findbugs:jsr305:3.0.0"
  implementation "org.logicng:logicng:2.0.2"
  implementation "org.gavaghan:geodesy:1.1.3"
  implementation "it.unimi.dsi:fastutil:8.5.2"
  implementation "org.codehaus.janino:janino:3.1.3"
  //implementation "com.ibm.icu:icu4j:68.2"
  implementation "com.univocity:univocity-parsers:2.8.4"
  testImplementation "org.junit.jupiter:junit-jupiter-api:5.4.2"
  testImplementation "org.junit.jupiter:junit-jupiter-engine:5.4.2"
  testImplementation "org.junit.vintage:junit-vintage-engine:5.4.2"
...

如上面的代码所示,一些依赖项被注释掉了。这是因为当构建的其他部分已经使用特定依赖项的另一个版本时,Elasticsearch 具有因 jar hell 而引发构建错误的功能。

此外,由于 server 包依赖于它的父包,所以有必要将存储库添加到 subprojects environment of elasticsearch's build.gradle:

...
subprojects {
  ...
  repositories {
    mavenCentral()
    maven {
      url = uri('https://oss.sonatype.org/content/repositories/snapshots')
    }
    maven {
      url = uri('https://repo.maven.apache.org/maven2/')
    }
  }
}
...

完成此操作后,当将示例添加到现有 class server 模块中的 Elasticsearch。 (在我的例子中,我在 org.elasticsearch.index.query.BoolQueryBuilder which contains the Symja example 中调用了一个方法)。

如果我尝试 build/run 一切都使用例如gradlew run -Dtests.es.xpack.security.enabled=false -Dtests.heap.size=1G 从我的 Elasticsearch 根目录开始,一切都完美构建。也可以使用 PUT... 创建文档。尝试 运行 是一个更大的问题,在我的例子中,Boolean query(然后使用 Symja 调用添加的方法)。在这种情况下,Elasticsearch 立即崩溃并输出以下内容:

...
╗ [2021-04-22T08:34:21.178673600Z] [BUILD] Stopping node

=== Standard error of node `node{::runTask-0}` ===
╗   ? last 40 non error or warning messages from C:\...\elasticsearch\build\testclusters\runTask-0\logs\es.stderr.log ?
╗ fatal error in thread [elasticsearch[runTask-0][search][T#1]], exiting
╗  java.lang.NoClassDefFoundError: com/google/common/util/concurrent/UncheckedTimeoutException
...

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Elasticsearch cluster died

...

BUILD FAILED in 7m 37s
429 actionable tasks: 19 executed, 410 up-to-date

这是因为Symja在运行时间依赖Guava包的存在,需要从build.gradle中注释掉。一方面,无法使用 implementation 选项将 Guava 添加到任何包中,因为它在文件 gradle\forbidden-dependencies.gradle:

中被 Elasticsearch 定义为“禁止的依赖项”
// we do not want any of these dependencies on the compilation classpath
// because they could then be used within Elasticsearch
List<String> FORBIDDEN_DEPENDENCIES = [
  'guava'
]
...

另一方面,也无法通过 runtimeOnly "com.google.guava:guava:30.1.1-jre" 将其添加到 server 模块。由于 jar hell,这再次导致构建失败,因为 Elasticsearch 的某些测试部分也以这种方式使用 Guava。尝试将版本调整为现有版本也没有效果。

总而言之,将 Symja 内容添加到 Elasticsearch 的 server 模块似乎不可能。在 Elastic Stack 社区内,声明如下:

[...] The problems you’re facing with dependencies etc are a consequence of trying to add stuff to server, and you won’t have that problem if you build a plugin.

这似乎是最佳做法。我会走这条路,因为无论如何创建一个插件是我的目标。

更新: 因为我设法安装了我正在编写的插件,所以使用上述工作流程确实可以正常工作(通过 runtimeOnly 包含 Guava 并使用我插件的build.gradle)。