简体   繁体   中英

Gradle plugin as dependency to another module

Here is the structure:

/root
   /plugin
   /sample

Is it possible somehow to add locally the plugin as a dependency plugin to the sample?

So assuming that the plugin creates a plugin with the id my.example.android:1.0 I want to use the following to the sample project:

apply plugin 'my.example.android

You can do buildscript "../plugin/plugin.gradle", if it's a simple gradle script. If it is standalone then you need to publish to a repo and do the builscript + apply statements.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM