I'm going to lose my mind about this. I have a build.gradle
file that looks something like:
apply plugin: 'idea'
task blah{
// do something
}
idea{
// some stuff
dependsOn blah
}
and I'm getting this:
Could not find method dependsOn() for arguments [task ':blah'] on root project ...
I can't figure out what the right syntax is. Any help?
To add a dependency to your project, specify a dependency configuration such as implementation in the dependencies block of your module's build. gradle file. This declares a dependency on an Android library module named "mylibrary" (this name must match the library name defined with an include: in your settings.
Perform a Gradle sync/reloadThe file versions. properties is part of the Gradle build. Consequently, after you have edited it, you need to ensure the IDE gets the changes. Android Studio: Run the “Sync Project with Gradle Files” action (via ctrl / cmd + shift + A ), or click the elephant + arrow icon in the toolbar.
This should work:
apply plugin: 'idea'
task blah{
// do something
}
tasks.idea.dependsOn(blah)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With