如何解决Gradle中的“无法为类型...的对象设置只读属性'classpath'的值”的错误

问题描述

我有

    compileJava {
        ajc {
            enabled = true
            classpath = configurations.aspectj
            options {
                aspectpath = configurations.aspect
                compilerArgs = []
            }
        }
    }

    compileTestJava {
        ajc {
            enabled = true
            classpath = configurations.aspectj
            options {
                aspectpath = configurations.testAspect
                compilerArgs = []
            }
        }
    }
按照文档FreeFair Gradle Plugin Collection中的说明,在我的build.gradle中使用了Gradle 6.6.1,但这会导致以下错误
A problem occurred evaluating root project 'leo'.
> Cannot set the value of read-only property 'classpath' for object of type io.freefair.gradle.plugins.aspectj.AjcAction.

如何解决

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)