Gradle custom plugin : add dependency from extension object

前端 未结 4 596
走了就别回头了
走了就别回头了 2021-02-05 05:07

I\'m trying to write a plugin which adds dependencies to project.dependencies according to informations gathered in the plugin extension object. But it seems to be

4条回答
  •  庸人自扰
    2021-02-05 05:57

    Don't know if that's still relevant, but you can workaround this by explicitly adding your compile configuration to Java classpath in doFirst:

    variant.javaCompile.doFirst {
        variant.javaCompile.classpath += project.configurations.myconfiguration
    }
    

提交回复
热议问题