diff --git a/README.md b/README.md index dad7d0db..76233cd6 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ This plugin supports straightforward usage of `buf lint`, `buf format`, and `buf ## Usage -This plugin assumes that Buf is configured for the project root with a configured `buf.work.yaml`, and instructions for setting up a Buf workspace can be found in the [Buf docs][buf-docs]. +This plugin assumes that Buf is configured for the project root with a configured `buf.yaml`, and instructions for setting up a Buf workspace can be found in the [Buf docs][buf-docs]. -The plugin can also be used without specifying a `buf.work.yaml`, in which case the plugin will scan all top-level directories for Protobuf sources. +The plugin can also be used without specifying a `buf.yaml`, in which case the plugin will scan all top-level directories for Protobuf sources. If the project includes the `protobuf-gradle-plugin`, this plugin will use an implicit Buf workspace that includes the following: - All specified Protobuf source directories @@ -60,7 +60,7 @@ For a basic Buf project or one that uses the `protobuf-gradle-plugin`, you can c ``` yaml # buf.yaml -version: v1 +version: v2 lint: ignore: - path/to/dir/to/ignore @@ -125,7 +125,7 @@ If your `buf.yaml` declares any dependencies using the `deps` key, you must run An example, for Java code generation using the remote plugin: ``` yaml -version: v1 +version: v2 plugins: - plugin: buf.build/protocolbuffers/java: out: java diff --git a/build.gradle.kts b/build.gradle.kts index c0be8bfa..6548396d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -40,6 +40,7 @@ dependencies { implementation(libs.jacksonDataformatYaml) implementation(libs.jacksonModuleKotlin) + implementation(libs.versioncompare) testImplementation(libs.junit) testImplementation(libs.truth) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dd86ed9b..c4e8d19d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,6 +9,7 @@ buildConfig = "5.4.0" # runtime bufbuild = "1.35.0" jackson = "2.17.2" +versioncompare = "1.5.0" # test junit = "5.10.3" @@ -26,6 +27,7 @@ spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } bufbuild = { module = "build.buf:buf", version.ref = "bufbuild" } jacksonDataformatYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "jackson" } jacksonModuleKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" } +versioncompare = { module = "io.github.g00fy2:versioncompare", version.ref = "versioncompare" } # test junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } diff --git a/src/main/kotlin/build/buf/gradle/BreakingTask.kt b/src/main/kotlin/build/buf/gradle/BreakingTask.kt index 57d86aa2..e532888d 100644 --- a/src/main/kotlin/build/buf/gradle/BreakingTask.kt +++ b/src/main/kotlin/build/buf/gradle/BreakingTask.kt @@ -20,12 +20,14 @@ import org.gradle.api.tasks.TaskAction abstract class BreakingTask : DefaultTask() { @TaskAction fun bufBreaking() { - execBuf( - "breaking", - bufBuildPublicationFile, - "--against", - singleFileFromConfiguration(BUF_BREAKING_CONFIGURATION_NAME), - ) { + val args = mutableListOf() + args.add("breaking") + if (project.bufV1SyntaxOnly()) { + args.add(bufBuildPublicationFile) + } + args.add("--against") + args.add(singleFileFromConfiguration(BUF_BREAKING_CONFIGURATION_NAME)) + execBuf(*args.toTypedArray()) { """ |Some Protobuf files had breaking changes: |$it diff --git a/src/main/kotlin/build/buf/gradle/ProtobufGradlePluginSupport.kt b/src/main/kotlin/build/buf/gradle/ProtobufGradlePluginSupport.kt index c2e223fc..7051f46a 100644 --- a/src/main/kotlin/build/buf/gradle/ProtobufGradlePluginSupport.kt +++ b/src/main/kotlin/build/buf/gradle/ProtobufGradlePluginSupport.kt @@ -14,6 +14,7 @@ package build.buf.gradle +import io.github.g00fy2.versioncompare.Version import org.gradle.api.DefaultTask import org.gradle.api.Project import org.gradle.api.Task @@ -36,6 +37,8 @@ import kotlin.reflect.full.declaredMemberProperties const val CREATE_SYM_LINKS_TO_MODULES_TASK_NAME = "createSymLinksToModules" const val WRITE_WORKSPACE_YAML_TASK_NAME = "writeWorkspaceYaml" +internal const val BUF_CLI_V2_INITIAL_VERSION = "1.32.0" + private val BUILD_EXTRACTED_INCLUDE_PROTOS_MAIN = listOf("build", "extracted-include-protos", "main").joinToString(File.separator) @@ -44,6 +47,8 @@ private val BUILD_EXTRACTED_PROTOS_MAIN = internal fun Project.hasProtobufGradlePlugin() = pluginManager.hasPlugin("com.google.protobuf") +internal fun Project.bufV1SyntaxOnly() = Version(getExtension().toolVersion) < Version(BUF_CLI_V2_INITIAL_VERSION) + internal fun Project.withProtobufGradlePlugin(action: (AppliedPlugin) -> Unit) = pluginManager.withPlugin("com.google.protobuf", action) internal fun Project.configureCreateSymLinksToModules() { @@ -79,10 +84,22 @@ abstract class WriteWorkspaceYamlTask : DefaultTask() { @TaskAction fun writeWorkspaceYaml() { - val protoDirs = allProtoDirs().map { project.makeMangledRelativizedPathStr(it) } - val bufYaml = bufYamlGenerator.generate(project.bufConfigFile(), protoDirs) - logger.info("Writing generated buf.yaml:{}\n", bufYaml) - File(bufbuildDir, "buf.yaml").writeText(bufYaml) + if (project.bufV1SyntaxOnly()) { + val bufWork = + """ + |version: v1 + |directories: + ${workspaceSymLinkEntries()} + """.trimMargin() + + logger.info("Writing generated buf.work.yaml:\n$bufWork") + File(bufbuildDir, "buf.work.yaml").writeText(bufWork) + } else { + val protoDirs = allProtoDirs().map { project.makeMangledRelativizedPathStr(it) } + val bufYaml = bufYamlGenerator.generate(project.bufConfigFile(), protoDirs) + logger.info("Writing generated buf.yaml:{}\n", bufYaml) + File(bufbuildDir, "buf.yaml").writeText(bufYaml) + } } } @@ -95,6 +112,11 @@ private fun Task.workspaceCommonConfig() { createsOutput() } +private fun Task.workspaceSymLinkEntries() = + allProtoDirs() + .map { project.makeMangledRelativizedPathStr(it) } + .joinToString("\n") { "| - $it" } + // Returns all directories that have may have proto files relevant to processing the project's proto files. This // includes any proto files that are simply references (includes) as well as those that will be processed (code // generation or validation). diff --git a/src/test/kotlin/build/buf/gradle/BreakingWithWorkspaceTest.kt b/src/test/kotlin/build/buf/gradle/BreakingWithWorkspaceTest.kt index 58458727..e355cff2 100644 --- a/src/test/kotlin/build/buf/gradle/BreakingWithWorkspaceTest.kt +++ b/src/test/kotlin/build/buf/gradle/BreakingWithWorkspaceTest.kt @@ -14,8 +14,40 @@ package build.buf.gradle +import org.junit.jupiter.api.Test +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource import java.nio.file.Paths class BreakingWithWorkspaceTest : AbstractBreakingTest() { override fun protoFile() = Paths.get(projectDir.path, "workspace", "buf", "test", "v1", "test.proto") + + @Test + fun `breaking schema v2`() { + super.`breaking schema`() + } + + @Test + fun `breaking schema fails with latest-release and previousVersion v2`() { + super.`breaking schema fails with latest-release and previousVersion`() + } + + @Test + fun `breaking schema with latest-release as version v2`() { + super.`breaking schema with latest-release as version`() + } + + @ParameterizedTest + @MethodSource("build.buf.gradle.ImageGenerationSupport#publicationFileExtensionTestCase") + fun `breaking schema with specified publication file extension v2`( + format: String, + compression: String?, + ) { + super.`breaking schema with specified publication file extension`(format, compression) + } + + @Test + fun `normally breaking schema with an ignore v2`() { + super.`normally breaking schema with an ignore`() + } } diff --git a/src/test/resources/BreakingWithProtobufGradleTest/schema_with_multi_directory_workspace/build.gradle b/src/test/resources/BreakingWithProtobufGradleTest/schema_with_multi_directory_workspace/build.gradle index 5ea761dd..b2e7a187 100644 --- a/src/test/resources/BreakingWithProtobufGradleTest/schema_with_multi_directory_workspace/build.gradle +++ b/src/test/resources/BreakingWithProtobufGradleTest/schema_with_multi_directory_workspace/build.gradle @@ -25,6 +25,7 @@ publishing { } buf { + toolVersion = "1.31.0" publishSchema = true //checkSchemaAgainstLatestRelease = true diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_fails_with_latest_release_and_previousversion_v2/buf.yaml b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_fails_with_latest_release_and_previousversion_v2/buf.yaml new file mode 100644 index 00000000..45ee9f96 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_fails_with_latest_release_and_previousversion_v2/buf.yaml @@ -0,0 +1,3 @@ +version: v2 +modules: + - path: workspace diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_fails_with_latest_release_and_previousversion_v2/build.gradle b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_fails_with_latest_release_and_previousversion_v2/build.gradle new file mode 100644 index 00000000..3ffb59ec --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_fails_with_latest_release_and_previousversion_v2/build.gradle @@ -0,0 +1,22 @@ +plugins { + id 'java' + id 'build.buf' + id 'maven-publish' +} + +repositories { + mavenCentral() + maven { url 'build/repos/test' } +} + +buf { + publishSchema = true + checkSchemaAgainstLatestRelease = true + previousVersion = '2319' + + imageArtifact { + groupId = 'foo' + artifactId = 'bar' + version = '2319' + } +} diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/buf.yaml b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/buf.yaml new file mode 100644 index 00000000..45ee9f96 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/buf.yaml @@ -0,0 +1,3 @@ +version: v2 +modules: + - path: workspace diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/build.gradle b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/build.gradle new file mode 100644 index 00000000..445aea8c --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/build.gradle @@ -0,0 +1,27 @@ +plugins { + id 'java' + id 'build.buf' + id 'maven-publish' +} + +repositories { + mavenCentral() + maven { url 'build/repos/test' } +} + +publishing { + repositories { + maven { url 'build/repos/test' } + } +} + +buf { + publishSchema = true + //previousVersion = '2319' + + imageArtifact { + groupId = 'foo' + artifactId = 'bar' + version = '2319' + } +} diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/workspace/buf/test/v1/test.proto b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/workspace/buf/test/v1/test.proto new file mode 100644 index 00000000..7e932c42 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_v2/workspace/buf/test/v1/test.proto @@ -0,0 +1,19 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.test.v1; + +message BasicMessage {} diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/buf.yaml b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/buf.yaml new file mode 100644 index 00000000..45ee9f96 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/buf.yaml @@ -0,0 +1,3 @@ +version: v2 +modules: + - path: workspace diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/build.gradle b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/build.gradle new file mode 100644 index 00000000..012fb1f6 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/build.gradle @@ -0,0 +1,27 @@ +plugins { + id 'java' + id 'build.buf' + id 'maven-publish' +} + +repositories { + mavenCentral() + maven { url 'build/repos/test' } +} + +publishing { + repositories { + maven { url 'build/repos/test' } + } +} + +buf { + publishSchema = true + //checkSchemaAgainstLatestRelease = true + + imageArtifact { + groupId = 'foo' + artifactId = 'bar' + version = '2319' + } +} diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/workspace/buf/test/v1/test.proto b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/workspace/buf/test/v1/test.proto new file mode 100644 index 00000000..7e932c42 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_latest_release_as_version_v2/workspace/buf/test/v1/test.proto @@ -0,0 +1,19 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.test.v1; + +message BasicMessage {} diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/buf.yaml b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/buf.yaml new file mode 100644 index 00000000..45ee9f96 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/buf.yaml @@ -0,0 +1,3 @@ +version: v2 +modules: + - path: workspace diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/build.gradle b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/build.gradle new file mode 100644 index 00000000..48306d92 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/build.gradle @@ -0,0 +1,32 @@ +plugins { + id 'java' + id 'build.buf' + id 'maven-publish' +} + +repositories { + mavenCentral() + maven { url 'build/repos/test' } +} + +publishing { + repositories { + maven { url 'build/repos/test' } + } +} + +buf { + publishSchema = true + //previousVersion = '2319' + + build { + imageFormat = REPLACEME + compressionFormat = REPLACEME + } + + imageArtifact { + groupId = 'foo' + artifactId = 'bar' + version = '2319' + } +} diff --git a/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/workspace/buf/test/v1/test.proto b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/workspace/buf/test/v1/test.proto new file mode 100644 index 00000000..7e932c42 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/breaking_schema_with_specified_publication_file_extension_v2/workspace/buf/test/v1/test.proto @@ -0,0 +1,19 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.test.v1; + +message BasicMessage {} diff --git a/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/buf.yaml b/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/buf.yaml new file mode 100644 index 00000000..b13ab9ba --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/buf.yaml @@ -0,0 +1,6 @@ +version: v2 +modules: + - path: workspace + breaking: + ignore: + - workspace/buf diff --git a/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/build.gradle b/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/build.gradle new file mode 100644 index 00000000..445aea8c --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/build.gradle @@ -0,0 +1,27 @@ +plugins { + id 'java' + id 'build.buf' + id 'maven-publish' +} + +repositories { + mavenCentral() + maven { url 'build/repos/test' } +} + +publishing { + repositories { + maven { url 'build/repos/test' } + } +} + +buf { + publishSchema = true + //previousVersion = '2319' + + imageArtifact { + groupId = 'foo' + artifactId = 'bar' + version = '2319' + } +} diff --git a/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/workspace/buf/test/v1/test.proto b/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/workspace/buf/test/v1/test.proto new file mode 100644 index 00000000..7e932c42 --- /dev/null +++ b/src/test/resources/BreakingWithWorkspaceTest/normally_breaking_schema_with_an_ignore_v2/workspace/buf/test/v1/test.proto @@ -0,0 +1,19 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.test.v1; + +message BasicMessage {} diff --git a/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/buf.gen.yaml b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/buf.gen.yaml new file mode 100644 index 00000000..02e49114 --- /dev/null +++ b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/buf.gen.yaml @@ -0,0 +1,4 @@ +version: v1 +plugins: + - plugin: buf.build/protocolbuffers/java:v23.4 + out: java diff --git a/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/buf.yaml b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/buf.yaml new file mode 100644 index 00000000..45ee9f96 --- /dev/null +++ b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/buf.yaml @@ -0,0 +1,3 @@ +version: v2 +modules: + - path: workspace diff --git a/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/build.gradle b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/build.gradle new file mode 100644 index 00000000..6667d840 --- /dev/null +++ b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/build.gradle @@ -0,0 +1,25 @@ +plugins { + id 'java' + id 'build.buf' +} + +repositories { + mavenCentral() +} + +buf { + generate { + configFileLocation = rootProject.file("./buf.yaml") + templateFileLocation = project.file("./buf.gen.yaml") + } +} + +compileJava.dependsOn 'bufGenerate' + +sourceSets.main.java { + srcDir 'build/bufbuild/generated/java' +} + +dependencies { + implementation "com.google.protobuf:protobuf-java:$protobufVersion" +} diff --git a/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/src/main/java/buf/test/v1/Foo.java b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/src/main/java/buf/test/v1/Foo.java new file mode 100644 index 00000000..8a037af7 --- /dev/null +++ b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/src/main/java/buf/test/v1/Foo.java @@ -0,0 +1,21 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package buf.test.v1; + +public class Foo { + public static void test() { + Test.BasicMessage.newBuilder().build(); + } +} diff --git a/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/workspace/buf/test/v1/test.proto b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/workspace/buf/test/v1/test.proto new file mode 100644 index 00000000..ae9bc374 --- /dev/null +++ b/src/test/resources/GenerateWithWorkspaceTest/buf_generate_with_default_template_file_path_explicitly_specifying_v2/workspace/buf/test/v1/test.proto @@ -0,0 +1,21 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package buf.test.v1; + +option java_package = "buf.test.v1"; + +message BasicMessage {}