Custom Gradle Plugin ID not found

前端 未结 6 564
余生分开走
余生分开走 2020-12-28 13:30

I\'m writing a Gradle plugin and I\'m failing to get the apply plugin: command to work in the Gradle script that uses the plugin. I\'m using Gradle 1.1.

6条回答
  •  天命终不由人
    2020-12-28 13:46

    The plugin Jar has to be added as a build script dependency:

    buildscript {
        repositories { flatDir name: 'libs', dirs: "../build/libs" }
        dependencies { classpath 'test:test-plugin:0.1' }
    }
    
    apply plugin: "test-plugin"
    

提交回复
热议问题