syntax = "proto3";

package org.jetbrains.kotlin.gradle.idea.proto.generated.tcs;
import "proto_extras.proto";
option java_multiple_files = true;

message IdeaKotlinDependencyProto {
  oneof dependency {
    IdeaKotlinSourceDependencyProto source_dependency = 1;
    IdeaKotlinResolvedBinaryDependencyProto resolved_binary_dependency = 2;
    IdeaKotlinUnresolvedBinaryDependencyProto unresolved_binary_dependency = 3;
    IdeaKotlinProjectArtifactDependencyProto project_artifact_dependency = 4;
  }
}

message IdeaKotlinSourceDependencyProto {
  enum Type {
    REGULAR = 0;
    FRIEND = 1;
    DEPENDS_ON = 2;
  }

  optional IdeaExtrasProto extras = 1;
  optional Type type = 2;
  optional IdeaKotlinSourceCoordinatesProto coordinates = 3;
}

message IdeaKotlinUnresolvedBinaryDependencyProto {
  optional IdeaExtrasProto extras = 1;
  optional IdeaKotlinBinaryCoordinatesProto coordinates = 2;
  optional string cause = 3;
}

message IdeaKotlinResolvedBinaryDependencyProto {
  optional IdeaExtrasProto extras = 1;
  optional IdeaKotlinBinaryCoordinatesProto coordinates = 2;
  optional string binary_type = 3;
  optional IdeaKotlinClasspathProto classpath = 4;
}

message IdeaKotlinClasspathProto {
  repeated string files = 1;
}

message IdeaKotlinProjectArtifactDependencyProto {
  optional IdeaExtrasProto extras = 1;
  optional IdeaKotlinSourceDependencyProto.Type type = 2;
  optional IdeaKotlinProjectCoordinatesProto coordinates = 3;
}

message IdeaKotlinProjectCoordinatesProto {
  optional string build_name = 1; // Renamed from 'build_id' to 'build_name' in 1.9.20
  optional string build_path = 4; // Added in 1.9.20
  optional string project_path = 2;
  optional string project_name = 3;
}

message IdeaKotlinBinaryCoordinatesProto {
  optional string group = 1;
  optional string module = 2;
  optional string version = 3;
  optional string source_set_name = 4;
  repeated IdeaKotlinBinaryCapabilityProto capabilities = 5;
  optional IdeaKotlinBinaryAttributesProto attributes = 6;
}

message IdeaKotlinBinaryCapabilityProto {
  optional string group = 1;
  optional string name = 2;
  optional string version = 3;
}

message IdeaKotlinBinaryAttributesProto {
  map<string, string> attributes = 1;
}

message IdeaKotlinSourceCoordinatesProto {
  optional IdeaKotlinProjectCoordinatesProto project = 1;
  optional string source_set_name = 2;
}
