kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/proto/repo.proto (about) 1 /* 2 * Copyright 2018 The Kythe Authors. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 19 package kythe.proto.repo; 20 21 option go_package = "kythe.io/kythe/proto/repo_go_proto"; 22 23 // Represents configuration data on how to extract a repo. 24 message Config { 25 // ExtractionHint encapsulates all extraction steps for a single corpus. 26 repeated ExtractionHint extractions = 1; 27 // Location of the repository to fetch from. This can be a mirror, if you 28 // prefer the build to fetch from that mirror. 29 string repo = 2; 30 } 31 32 // Settings specific to extracting a single root and build system in this repo. 33 message ExtractionHint { 34 BuildSystem build_system = 1; 35 // Optionally specify a corpus for this extraction. If unset, then we will 36 // try to determine corpus from the repository name. 37 string corpus = 2; 38 39 JavaOptions java_options = 3; 40 41 // Optionally specify one or more targets for extraction. By default, we will 42 // assume there is one target specified by root (above), but this can be 43 // configured by specifying target manually. 44 // 45 // Note that each separate target in a single ExtractionHint will be combined 46 // together into a single corpus. If you need separate corpora, you must 47 // specify multiple ExtractionHint above. 48 // 49 // Each individual ExtractionTarget provided will have a separate build 50 // execution. To specify multiple targets to build inside a single execution 51 // (for example bazel build //target:first //target:second), you must specify 52 // multiple individual_targets below. 53 repeated ExtractionTarget targets = 4; 54 } 55 56 enum BuildSystem { 57 UNKNOWN = 0; 58 59 MAVEN = 1; 60 GRADLE = 2; 61 BAZEL = 3; 62 } 63 64 message JavaOptions { 65 enum Version { 66 UNKNOWN = 0; 67 68 JAVA_1_8 = 1; 69 } 70 // The java version supported, such as 1.8. 71 Version version = 1; 72 } 73 74 message ExtractionTarget { 75 // A file relative to the repository root that configures extraction for this 76 // target. E.g.: a pom.xml file in maven, or build.gradle file in gradle. 77 string path = 1; 78 79 // Build targets for builders that require explicit targets instead of just 80 // invoking build inside of a directory. For example in bazel this could be 81 // //kythe/go/... to extract all of the kythe golang code. 82 repeated string individual_targets = 2; 83 }