From 1647937f8f3977f2a4b10b89832c8adc98c1da03 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Fri, 14 Jun 2024 03:45:28 +0900 Subject: [PATCH 1/2] Update task dependency in build.gradle --- protobuf/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/protobuf/build.gradle.kts b/protobuf/build.gradle.kts index a7675e65e..a3f29f906 100644 --- a/protobuf/build.gradle.kts +++ b/protobuf/build.gradle.kts @@ -59,6 +59,7 @@ tasks.whenTaskAdded { if (name == "generateMetadataFileForMavenPublication") { tasks.named("generateMetadataFileForMavenPublication") { dependsOn(tasks.findByName("kotlinSourcesJar")) + dependsOn(tasks.findByName("plainJavadocJar")) } } } From b21b48a662992cc3abdf6b37f67b59f2714e4ca4 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Fri, 14 Jun 2024 03:55:25 +0900 Subject: [PATCH 2/2] Update task dependency in build.gradle --- protobuf/build.gradle.kts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/protobuf/build.gradle.kts b/protobuf/build.gradle.kts index a3f29f906..586f662da 100644 --- a/protobuf/build.gradle.kts +++ b/protobuf/build.gradle.kts @@ -44,6 +44,7 @@ java { targetCompatibility = JavaVersion.VERSION_20 } + tasks.named("generateProto") { dependsOn(tasks.named("processResources")) dependsOn(tasks.named("extractIncludeTestProto")) @@ -59,11 +60,16 @@ tasks.whenTaskAdded { if (name == "generateMetadataFileForMavenPublication") { tasks.named("generateMetadataFileForMavenPublication") { dependsOn(tasks.findByName("kotlinSourcesJar")) - dependsOn(tasks.findByName("plainJavadocJar")) } } } +afterEvaluate { + tasks.named("generateMetadataFileForMavenPublication") { + dependsOn(tasks.findByName("plainJavadocJar")) + } +} + tasks { mavenPublishing { publishToMavenCentral(SonatypeHost.DEFAULT, true)