Open
Description
If you have a plugin build.gradle
like this:
def computeAndroidXVersion() {
if(project.hasProperty("androidxVersion")) {
return androidxVersion
}
else {
return "1.0.0"
}
}
dependencies {
def androidxVersion = computeAndroidXVersion()
compile "androidx.appcompat:appcompat:$androidxVersion"
compile "com.google.android.material:material:1.1.0-alpha07"
}
it will fail to build because the method definition is not added the tempPlugin gradle file. So you end up with an error like this:
* Where:
Build file '/Volumes/data/dev/nativescript/nativescript-material-components/demo-vue/platforms/tempPlugin/nativescript_material_button/build.gradle' line: 104
* What went wrong:
A problem occurred evaluating root project ‘nativescript_material_button’.
Could not find method computeAndroidXVersion() for arguments [] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.