From 594f08462a358827eadae0a014e8a8d0a0249215 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 19 Jul 2023 13:07:48 +0200 Subject: [PATCH 1/5] Protobuf: Remove wrong sourceSet configuration --- .../commons/src/main/groovy/bisq.protobuf.gradle | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle index 072b45b70e..52033959fe 100644 --- a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle +++ b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle @@ -8,20 +8,6 @@ dependencies { implementation libs.protobuf.java } -sourceSets { - main { - java { - srcDirs += ['build/generated/source/main/java'] - } - } - - test { - java { - srcDirs += ['build/generated/source/test/java'] - } - } -} - ext { def operatingSystem = current() osFamily = operatingSystem.familyName From c82913eccdd2b94068903d9f8b1c192dbad67e68 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 19 Jul 2023 13:10:12 +0200 Subject: [PATCH 2/5] Protobuf: Remove unused OS lookup code --- build-logic/commons/src/main/groovy/bisq.protobuf.gradle | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle index 52033959fe..83e1234919 100644 --- a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle +++ b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle @@ -1,5 +1,3 @@ -import static org.gradle.internal.os.OperatingSystem.current - plugins { id 'com.google.protobuf' } @@ -8,13 +6,6 @@ dependencies { implementation libs.protobuf.java } -ext { - def operatingSystem = current() - osFamily = operatingSystem.familyName - osArch = System.getProperty("os.arch") - osDescription = operatingSystem.toString() -} - protobuf { protoc { artifact = "com.google.protobuf:protoc:3.19.4" From dd61933c0dafc5d2861f2edd29f6cdc13c6a23d3 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 19 Jul 2023 13:10:47 +0200 Subject: [PATCH 3/5] Protobuf: Remove empty generateProtoTasks block --- build-logic/commons/src/main/groovy/bisq.protobuf.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle index 83e1234919..6c114f4769 100644 --- a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle +++ b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle @@ -10,8 +10,5 @@ protobuf { protoc { artifact = "com.google.protobuf:protoc:3.19.4" } - generateProtoTasks { - all()*.plugins {} - } generatedFilesBaseDir = "$projectDir/build/generated/source" } \ No newline at end of file From 0532bc3da71143555f17d7d46fc584cc969fdecf Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 19 Jul 2023 13:11:24 +0200 Subject: [PATCH 4/5] Protobuf: Remove generatedFilesBaseDir config --- build-logic/commons/src/main/groovy/bisq.protobuf.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle index 6c114f4769..3568e54acd 100644 --- a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle +++ b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle @@ -10,5 +10,4 @@ protobuf { protoc { artifact = "com.google.protobuf:protoc:3.19.4" } - generatedFilesBaseDir = "$projectDir/build/generated/source" } \ No newline at end of file From 2655dff234af41aeed4fcc0e5deb030f403875e3 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Wed, 19 Jul 2023 13:12:58 +0200 Subject: [PATCH 5/5] Protobuf: Add IDE support --- build-logic/commons/src/main/groovy/bisq.protobuf.gradle | 6 ++++++ gradle/libs.versions.toml | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle index 3568e54acd..104957d205 100644 --- a/build-logic/commons/src/main/groovy/bisq.protobuf.gradle +++ b/build-logic/commons/src/main/groovy/bisq.protobuf.gradle @@ -1,7 +1,13 @@ plugins { + id 'java' + id 'idea' id 'com.google.protobuf' } +repositories { + mavenCentral() +} + dependencies { implementation libs.protobuf.java } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6d544a7188..2488f569a9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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' } @@ -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' }