Files
openide/plugins
Nikita Biriukov eee23c525c [gradle] IDEA-321581 deprecate gradlePath and gradleIdentityPath in GradleModuleData
These methods rely on the existence of `gradlePath` and `gradleIdentityPath` properties in `ModuleData`. However, these properties are not always initialized in `ModuleData`. That may cause errors like the one described in IDEA-321581. Unfortunately, we could not reproduce it. However, we found a suspicious place where a `ModuleData` could be created without initialized properties - `com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsDataStorage#convert`. But it's not clear if it causes the error.

To avoid the errors, this commit replaces the usages of these methods with new nullable counterparts in `GradleModuleData`: `gradlePathOrNull` and `gradleIdentityPathOrNull`. Also, it adds a log in the case when the accessed property is null.

Tests:
- org.jetbrains.plugins.gradle.execution.build.GradleProjectTaskRunnerTest (does not cover the case of error in IDEA-321581)

GitOrigin-RevId: 59d78dda860ebf0b8ab4e584b0f6a9634f64e7bb
2025-09-23 15:37:39 +00:00
..