Ad
How To Apply Plugin From Another Module
I have two modules app and lib.
I have added a separate file called plugin.gradle
in lib module that includes a plugin as shown below
apply plugin: TestPlugin
class TestPlugin implements Plugin<Project>{
@Override
void apply(Project project) {
project.task("test"){
doLast {
println "testing"
}
}
}
}
in order to apply this plugin in lib build.gradle module ,i added the following which works perfectly fine
apply from: 'plugin.gradle'
however I can't figure out how to apply this plugin into another module (the app module)
Ad
Answer
apply from: "${project(':yourlib').projectDir}/file.gradle"
where yourlib
is the module containing file.gradle
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad