Fix optimization warnings
plugins {
- id 'com.google.protobuf' version '0.8.16'
+ id 'com.google.protobuf' version '0.8.17'
}
dependencies {
@@ -22,6 +22,14 @@ protobuf {
archivesBaseName = "scalardb-rpc"
+// plugin com.google.protobuf generates tasks in runtime so that we have do declare dependencies dynamically
+tasks.whenTaskAdded { t ->
+ if (t.name.equals('generateProto')) {
+ processResources.dependsOn += t
+ sourcesJar.dependsOn += t
+ }
+}
+
// for archiving and uploading to maven central
if (!project.gradle.startParameter.taskNames.isEmpty() &&
(project.gradle.startParameter.taskNames[0].endsWith('publish') ||
