Skip to content

Commit

Permalink
Merge pull request #6771 from alvasw/lazily_apply_grpc_plugin
Browse files Browse the repository at this point in the history
Improve build-time: Lazily apply gRPC plugin
  • Loading branch information
gabernard authored Jul 17, 2023
2 parents 6476c39 + 6b92629 commit 31d0241
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 5 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
classpath 'org.openjfx:javafx-plugin:0.0.10'
}
Expand Down
66 changes: 66 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,14 @@
<sha256 value="f6cd28bb7aa1b704faedf9b9a65d035476b9c6c3ca8cda5d7b76e0e3a22dcfd6" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.gradle" name="osdetector-gradle-plugin" version="1.6.1">
<artifact name="osdetector-gradle-plugin-1.6.1.jar">
<sha256 value="37f4a6d92f258762ecf62fd77186522bbecb5da1b20debc78f8361b856df0da7" origin="Generated by Gradle"/>
</artifact>
<artifact name="osdetector-gradle-plugin-1.6.1.pom">
<sha256 value="8b831113a94e097bc49e1eca4d327fd22340570454d44cbb71c252b99e6c4c3f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.gradle" name="osdetector-gradle-plugin" version="1.7.0">
<artifact name="osdetector-gradle-plugin-1.7.0.jar">
<sha256 value="dbda2178c14ed6b93a184b1acbf38d72107002252668c111cf411eca37e41ca6" origin="Generated by Gradle"/>
Expand All @@ -387,6 +395,22 @@
<sha256 value="e81632c2ee9aa48e7ecf0547512c1c386560c0d46a958ee50550f7ebddf13517" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.gradle" name="osdetector-gradle-plugin" version="1.7.3">
<artifact name="osdetector-gradle-plugin-1.7.3.jar">
<sha256 value="6b4692f913a21b1fb603169ee78ba8f3e4ab2af9d762af9ca88b79126c1c0ad1" origin="Generated by Gradle"/>
</artifact>
<artifact name="osdetector-gradle-plugin-1.7.3.pom">
<sha256 value="8460c950127ca3598766161e38b4ff8d63b4d69fb8310a16e00b351350010c11" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="failureaccess" version="1.0">
<artifact name="failureaccess-1.0.jar">
<sha256 value="d084bef9cd07a8537a1753e4850a69b7e8bab1d1e22e9f3a1e4826309a7a2336" origin="Generated by Gradle"/>
</artifact>
<artifact name="failureaccess-1.0.pom">
<sha256 value="cd1679adfc5eb56a7dca57edfa86499875300e763ba22dc9ff483fc5cc3c9a9a" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="failureaccess" version="1.0.1">
<artifact name="failureaccess-1.0.1.jar">
<sha256 value="a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26" origin="Generated by Gradle"/>
Expand All @@ -395,6 +419,14 @@
<sha256 value="e96042ce78fecba0da2be964522947c87b40a291b5fd3cd672a434924103c4b9" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="guava" version="27.0-jre">
<artifact name="guava-27.0-jre.jar">
<sha256 value="63b09db6861011e7fb2481be7790c7fd4b03f0bb884b3de2ecba8823ad19bf3f" origin="Generated by Gradle"/>
</artifact>
<artifact name="guava-27.0-jre.pom">
<sha256 value="87a7cae265a762a9819794601e9352702f3c31afab2eeb87b92d3590778e6065" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="guava" version="27.0.1-jre">
<artifact name="guava-27.0.1-jre.jar">
<sha256 value="e1c814fd04492a27c38e0317eabeaa1b3e950ec8010239e400fe90ad6c9107b4" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -424,6 +456,11 @@
<sha256 value="f8698ab46ca996ce889c1afc8ca4f25eb8ac6b034dc898d4583742360016cc04" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="guava-parent" version="27.0-jre">
<artifact name="guava-parent-27.0-jre.pom">
<sha256 value="dea6d8ebf9ef4eba79cbd2aba7185254de5c3f656e9adf4bbeef25475aad750e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="guava-parent" version="27.0.1-jre">
<artifact name="guava-parent-27.0.1-jre.pom">
<sha256 value="317e88291262e0cf2805e956c18850f1d4565c85c2e1112f5d9d08ab1732e696" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -476,6 +513,11 @@
<sha256 value="5faca824ba115bee458730337dfdb2fcea46ba2fd774d4304edbf30fa6a3f055" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="com.google.protobuf.gradle.plugin" version="0.9.3">
<artifact name="com.google.protobuf.gradle.plugin-0.9.3.pom">
<sha256 value="54bccbca9ae26c102484cda1147cc9a9a36ad1e9440232f24cd365e6452c80af" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-bom" version="3.19.1">
<artifact name="protobuf-bom-3.19.1.pom">
<sha256 value="96623d7afc374800cfdc4eb1e49efdb1b17d762fbe9c7de0e46980de14473170" origin="Generated by Gradle"/>
Expand All @@ -489,6 +531,14 @@
<sha256 value="3afaad5f2a249d1b3021d7733d97cb4e1bdd7a959106c6da4bee3ce0bce0b632" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-gradle-plugin" version="0.9.3">
<artifact name="protobuf-gradle-plugin-0.9.3.jar">
<sha256 value="a005929f26f5af07e39206648be59315881eefbe0cddf6de2546e9266f7fbf9b" origin="Generated by Gradle"/>
</artifact>
<artifact name="protobuf-gradle-plugin-0.9.3.pom">
<sha256 value="03fdd3a6960342cc29f1196061ec4a896250a32081672908eb6d10cd79ead720" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java" version="3.19.1">
<artifact name="protobuf-java-3.19.1.jar">
<sha256 value="24f7d0d91797ed230a6d3da93cd80590a4c3aa9a27249f6025b5c6da078edde7" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -751,6 +801,14 @@
<sha256 value="c68defdedaaaeae1432e12a5302bf2bfa05057d8b5acc65aaa3f3d9853ff40d6" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="kr.motd.maven" name="os-maven-plugin" version="1.6.0">
<artifact name="os-maven-plugin-1.6.0.jar">
<sha256 value="1cd9d6c089f966711bc7d9564976b3ffe65102616a5247681cc23095cfbdd1ac" origin="Generated by Gradle"/>
</artifact>
<artifact name="os-maven-plugin-1.6.0.pom">
<sha256 value="cd151f51078a46777b50f8283b882a8ace0c08bbbe17446b3f9ea63c8122fca8" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="kr.motd.maven" name="os-maven-plugin" version="1.7.0">
<artifact name="os-maven-plugin-1.7.0.jar">
<sha256 value="943053501a429e53d1c4d62152eec125fa36620e0dc66b7390a895097cfdeace" origin="Generated by Gradle"/>
Expand All @@ -759,6 +817,14 @@
<sha256 value="c4f56a8eeaa5269efa05db01e3130905ff5bdb87eb2ae3e766154e9aea183ba6" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="kr.motd.maven" name="os-maven-plugin" version="1.7.1">
<artifact name="os-maven-plugin-1.7.1.jar">
<sha256 value="f47aeef86821e52b2b18758978bd045f03d722292e32e747082122c6228952e0" origin="Generated by Gradle"/>
</artifact>
<artifact name="os-maven-plugin-1.7.1.pom">
<sha256 value="4b758004422b9633dd318f29e784f1d180bd8a5920cd50af1930861f6d6a5476" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.bytebuddy" name="byte-buddy" version="1.11.19">
<artifact name="byte-buddy-1.11.19.jar">
<sha256 value="4cd1038ca54507323bf04742634f618bb1624914df47a8b4a4dcfa797bd6a8d5" origin="Generated by Gradle"/>
Expand Down
17 changes: 13 additions & 4 deletions proto/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
plugins {
id 'bisq.java-conventions'
id 'idea'
id 'com.google.protobuf' version "0.9.3"
}

apply plugin: 'com.google.protobuf'
apply plugin: 'idea'

dependencies {
implementation enforcedPlatform(project(':platform'))
annotationProcessor libs.lombok
Expand All @@ -29,12 +28,22 @@ protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.19.1"
}

plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:1.42.1"
}
}

generateProtoTasks {
ofSourceSet('main')*.plugins { grpc {} }
ofSourceSet('main').configureEach {
plugins {
// Apply the "grpc" plugin whose spec is defined above, without
// options. Note the braces cannot be omitted, otherwise the
// plugin will not be added. This is because of the implicit way
// NamedDomainObjectContainer binds the methods.
grpc { }
}
}
}
}

0 comments on commit 31d0241

Please sign in to comment.