avito-tech/avito-android

Execution lintDependencies causes `Cannot get property 'internalModule' on extra properties extension as it does not exist`

BorisOsipov opened this issue · 2 comments

Hi folks!
Thank you for sharing this repo. That's really awesome!

Describe the bug
I've added lintDependencies plugin as descibed here to my project.
Execution ./gradlew lintDependencies causes the error below

Caused by: org.gradle.api.plugins.ExtraPropertiesExtension$UnknownPropertyException: Cannot get property 'internalModule' on extra properties extension as it does not exist
	at org.gradle.internal.extensibility.DefaultExtraPropertiesExtension.get(DefaultExtraPropertiesExtension.java:43)
	at com.avito.kotlin.dsl.PropertyInProjectExtras.getValue(ProjectExtensions.kt:92)
	at com.avito.impact.configuration.InternalModuleKt.getInternalModule(InternalModule.kt)
	at com.avito.android.lint.dependency.DependencyResolver.sourceSetOutput(DependencyResolver.kt:146)
	at com.avito.android.lint.dependency.DependencyResolver.classReferences(DependencyResolver.kt:76)
	at com.avito.android.lint.dependency.DependencyResolver.suspiciousDependencies(DependencyResolver.kt:33)
	at com.avito.android.lint.DependenciesLintTask.resolveIssues(DependenciesLintTask.kt:37)
	at com.avito.android.lint.DependenciesLintTask.action(DependenciesLintTask.kt:28)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:49)

How to reproduce
I've prepared simple repo here https://github.com/BorisOsipov/lintDependencies
Just run ./gradlew lintDependencies

Sample project just generated by Android Studio with applied plugin.
I have the same issue in my production app repo.

Environment:

  • gradle-5.6.4
  • java 1.8.0_231

@BorisOsipov Hi, this caused because of lintDependencies has an internal dependency on another plugin. We will discuss it with the team and will update documentation or plugin dependencies.

@BorisOsipov, So we discussed. We recommend you try to use https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin.
This is our PR with adding it #330.
Our lintDependencies plugin in early alpha and we are looking to replace it by that already mature plugin.
But If you will have problems feel free to reopen the issue.