public static Sdk getJPackageCompatibleSdk(Artifact artifact, Project project) {
    final Set<Module> modules =
      ReadAction.compute(() -> ArtifactUtil.getModulesIncludedInArtifacts(Collections.singletonList(artifact), project));
    if (modules.isEmpty()) {
      return null;
    }

    for (Module module : modules) {
      final Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
      if (sdk != null) {
        final SdkTypeId sdkType = sdk.getSdkType();
        if (sdkType instanceof JavaSdk && ((JavaSdk)sdkType).isOfVersionOrHigher(sdk, JavaSdkVersion.JDK_14)) {
          return sdk;
        }
      }
    }
    return null;
  }
public static Sdk getJPackageCompatibleSdk(Artifact artifact, Project project)