Skip to content

Commit

Permalink
Merge pull request #1023 from alvasw/fix_protobuf_build
Browse files Browse the repository at this point in the history
Fix Protobuf Build Setup
  • Loading branch information
alvasw authored Jul 19, 2023
2 parents 8965b7f + 2655dff commit 392405f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 29 deletions.
33 changes: 6 additions & 27 deletions build-logic/commons/src/main/groovy/bisq.protobuf.gradle
Original file line number Diff line number Diff line change
@@ -1,40 +1,19 @@
import static org.gradle.internal.os.OperatingSystem.current

plugins {
id 'java'
id 'idea'
id 'com.google.protobuf'
}

dependencies {
implementation libs.protobuf.java
repositories {
mavenCentral()
}

sourceSets {
main {
java {
srcDirs += ['build/generated/source/main/java']
}
}

test {
java {
srcDirs += ['build/generated/source/test/java']
}
}
}

ext {
def operatingSystem = current()
osFamily = operatingSystem.familyName
osArch = System.getProperty("os.arch")
osDescription = operatingSystem.toString()
dependencies {
implementation libs.protobuf.java
}

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.19.4"
}
generateProtoTasks {
all()*.plugins {}
}
generatedFilesBaseDir = "$projectDir/build/generated/source"
}
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ openjfx-plugin = { strictly = '0.0.12' }
openjfx-monocle-lib = { strictly = 'jdk-12.0.1+2'}

protobuf-java-lib = { strictly = '3.19.4' }
protobuf-gradle-plugin-lib = { strictly = '0.8.18' }
protobuf-gradle-plugin-lib = { strictly = '0.9.3' }

shadow-plugin = { strictly = '7.1.2' }
slf4j-lib = { strictly = '1.7.36' }
Expand Down Expand Up @@ -112,7 +112,7 @@ mockito = { module = 'org.mockito:mockito-core', version.ref = 'mockito-lib' }
openjfx-monocle = { module = 'org.testfx:openjfx-monocle', version.ref = 'openjfx-monocle-lib' }

protobuf-java = { module = 'com.google.protobuf:protobuf-java', version.ref = 'protobuf-java-lib' }
protobuf-gradle-plugin = { module = 'gradle.plugin.com.google.protobuf:protobuf-gradle-plugin', version.ref = 'protobuf-gradle-plugin-lib' }
protobuf-gradle-plugin = { module = 'com.google.protobuf:protobuf-gradle-plugin', version.ref = 'protobuf-gradle-plugin-lib' }
protobuf-java-util = { module = 'com.google.protobuf:protobuf-java-util', version.ref = 'protobuf-java-lib' }

slf4j-api = { module = 'org.slf4j:slf4j-api', version.ref = 'slf4j-lib' }
Expand Down

0 comments on commit 392405f

Please sign in to comment.