Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ dependencies {
implementation(platform("tools.jackson:jackson-bom:${jacksonVersion}"))
implementation(platform("org.springframework:spring-framework-bom:${springFrameworkVersion}"))
implementation("com.github.node-gradle:gradle-node-plugin:7.1.0")
implementation("com.google.protobuf:protobuf-gradle-plugin:${protobufGradlePluginVersion}")
implementation("com.gradle:develocity-gradle-plugin:4.2.2")
implementation("com.tngtech.archunit:archunit:1.4.1")
implementation("commons-codec:commons-codec:${commonsCodecVersion}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public void apply(Project project) {
new WarConventions().apply(project);
new EclipseConventions(systemRequirements).apply(project);
new TestFixturesConventions().apply(project);
new ProtobufConventions().apply(project);
RepositoryTransformersExtension.apply(project);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2012-present the original author or authors.
*
* 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
*
* https://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 org.springframework.boot.build;

import com.google.protobuf.gradle.ProtobufExtension;
import com.google.protobuf.gradle.ProtobufPlugin;
import org.gradle.api.Project;

/**
* Conventions that are applied in the presence of the {@link ProtobufPlugin} plugin.
*
* @author Eric Haag
*/
class ProtobufConventions {

void apply(Project project) {
project.getPlugins().withId("com.google.protobuf", (plugin) -> {
ProtobufExtension protobuf = project.getExtensions().getByType(ProtobufExtension.class);
removeUnusedMachineSpecificConfiguration(protobuf);
});
}

// See: https://github.com/google/protobuf-gradle-plugin/issues/785
private void removeUnusedMachineSpecificConfiguration(ProtobufExtension protobuf) {
protobuf.getJavaExecutablePath().convention("");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
2 changes: 1 addition & 1 deletion smoke-test/spring-boot-smoke-test-grpc-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
2 changes: 1 addition & 1 deletion smoke-test/spring-boot-smoke-test-grpc-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id "java"
id "com.google.protobuf" version "${protobufGradlePluginVersion}"
id "com.google.protobuf"
id "org.springframework.boot.docker-test"
}

Expand Down
Loading