How to use custom gradle plugin in library module project -


i have custom gradle plugin has uploaded jcenter, can use in android project like:

root project build.gradle:

dependencies {     classpath 'com.android.tools.build:gradle:2.0.0'     classpath 'com.myproject:projectname:1.0.1' } 

app's build.gradle:

apply plugin: 'com.android.application' apply plugin: 'com.myproject.projectname'  myconfig {   ...... } 

it works fine. when use in android library module, show error message "gradle dsl method no found:'myconfig()'"

library module's build.gradle

apply plugin: 'com.android.library' apply plugin: 'com.myproject.projectname'  myconfig {   ...... } 

anyone known why?

i found reason, in gradle plugin checked project this:

if (project.getplugins().hasplugin(appplugin)) {....} 

so when call in library module, can't goto right branch.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -