geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-4053) Create module for Protobuf messages
Date Wed, 06 Dec 2017 23:06:01 GMT

    [ https://issues.apache.org/jira/browse/GEODE-4053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16281083#comment-16281083
] 

ASF GitHub Bot commented on GEODE-4053:
---------------------------------------

upthewaterspout closed pull request #1133: GEODE-4053: Create module for Protobuf messages
URL: https://github.com/apache/geode/pull/1133
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 1f139a5ac9..7be16ab645 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -62,6 +62,7 @@ dependencies {
   archives project(':geode-lucene')
   archives project(':geode-old-client-support')
   archives project(':geode-protobuf')
+  archives project(':geode-protobuf-messages')
   archives project(':geode-web')
   archives project(':geode-web-api')
   archives project(':geode-wan')
@@ -371,6 +372,9 @@ distributions {
         from project(":geode-protobuf").configurations.runtime
         from project(":geode-protobuf").configurations.archives.allArtifacts.files
 
+        from project(":geode-protobuf-messages").configurations.runtime
+        from project(":geode-protobuf-messages").configurations.archives.allArtifacts.files
+
         from project(":geode-client-protocol").configurations.runtime
         from project(":geode-client-protocol").configurations.archives.allArtifacts.files
 
@@ -401,7 +405,7 @@ distributions {
       }
 
       into('tools/ClientProtocol') {
-        from {project(":geode-protobuf").zip.outputs.files}
+        from {project(":geode-protobuf-messages").zip.outputs.files}
       }
 
       into ('javadoc') {
diff --git a/geode-protobuf-messages/build.gradle b/geode-protobuf-messages/build.gradle
new file mode 100644
index 0000000000..ff04de4efb
--- /dev/null
+++ b/geode-protobuf-messages/build.gradle
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'com.google.protobuf'
+apply plugin: 'idea'
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.google.protobuf:protobuf-gradle-plugin:' + project.'protobuf-gradle-plugin.version'
+    }
+}
+
+dependencies {
+    compile 'com.google.protobuf:protobuf-java:' + project.'protobuf-java.version'
+}
+
+protobuf {
+    protoc {
+        // The artifact spec for the Protobuf Compiler
+        artifact = 'com.google.protobuf:protoc:' + project.'protoc.version'
+    }
+    generatedFilesBaseDir = "$buildDir/generated-src/proto"
+}
+
+sourceSets {
+    main {
+        java {
+            srcDir "$buildDir/generated-src/proto/main/java"
+        }
+    }
+}
+// let IntelliJ know where the generated sources are.
+idea {
+    module {
+        sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java")
+    }
+}
+
+task zip(type: Zip) {
+    from 'src/main/proto'
+    baseName = "${project.name}-definitions"
+    destinationDir = file("$buildDir/libs")
+}
+
+assemble.dependsOn 'zip'
diff --git a/geode-protobuf/src/main/proto/v1/basicTypes.proto b/geode-protobuf-messages/src/main/proto/v1/basicTypes.proto
similarity index 100%
rename from geode-protobuf/src/main/proto/v1/basicTypes.proto
rename to geode-protobuf-messages/src/main/proto/v1/basicTypes.proto
diff --git a/geode-protobuf/src/main/proto/v1/clientProtocol.proto b/geode-protobuf-messages/src/main/proto/v1/clientProtocol.proto
similarity index 100%
rename from geode-protobuf/src/main/proto/v1/clientProtocol.proto
rename to geode-protobuf-messages/src/main/proto/v1/clientProtocol.proto
diff --git a/geode-protobuf/src/main/proto/v1/connection_API.proto b/geode-protobuf-messages/src/main/proto/v1/connection_API.proto
similarity index 100%
rename from geode-protobuf/src/main/proto/v1/connection_API.proto
rename to geode-protobuf-messages/src/main/proto/v1/connection_API.proto
diff --git a/geode-protobuf/src/main/proto/v1/locator_API.proto b/geode-protobuf-messages/src/main/proto/v1/locator_API.proto
similarity index 100%
rename from geode-protobuf/src/main/proto/v1/locator_API.proto
rename to geode-protobuf-messages/src/main/proto/v1/locator_API.proto
diff --git a/geode-protobuf/src/main/proto/v1/region_API.proto b/geode-protobuf-messages/src/main/proto/v1/region_API.proto
similarity index 100%
rename from geode-protobuf/src/main/proto/v1/region_API.proto
rename to geode-protobuf-messages/src/main/proto/v1/region_API.proto
diff --git a/geode-protobuf/build.gradle b/geode-protobuf/build.gradle
index 7b13a09e65..045f36a0f5 100644
--- a/geode-protobuf/build.gradle
+++ b/geode-protobuf/build.gradle
@@ -15,21 +15,11 @@
  * limitations under the License.
  */
 
-apply plugin: 'com.google.protobuf'
-apply plugin: 'idea'
-
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.google.protobuf:protobuf-gradle-plugin:' + project.'protobuf-gradle-plugin.version'
-    }
-}
-
 dependencies {
     provided project(':geode-client-protocol')
     provided project(':geode-core')
+    compile project(':geode-protobuf-messages')
+
     testCompile project(':geode-junit')
     testCompile files(project(':geode-core').sourceSets.test.output)
 
@@ -39,33 +29,3 @@ dependencies {
 
     compile 'com.google.protobuf:protobuf-java:' + project.'protobuf-java.version'
 }
-
-protobuf {
-    protoc {
-        // The artifact spec for the Protobuf Compiler
-        artifact = 'com.google.protobuf:protoc:' + project.'protoc.version'
-    }
-    generatedFilesBaseDir = "$buildDir/generated-src/proto"
-}
-
-sourceSets {
-    main {
-        java {
-            srcDir "$buildDir/generated-src/proto/main/java"
-        }
-    }
-}
-// let IntelliJ know where the generated sources are.
-idea {
-    module {
-        sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java")
-    }
-}
-
-task zip(type: Zip) {
-    from 'src/main/proto'
-    baseName = "${project.name}-definitions"
-    destinationDir = file("$buildDir/libs")
-}
-
-assemble.dependsOn 'zip'
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 13a665cede..a319689567 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -39,6 +39,7 @@ include 'extensions/geode-modules-session-internal'
 include 'extensions/geode-modules-session'
 include 'extensions/geode-modules-assembly'
 include 'geode-protobuf'
+include 'geode-protobuf-messages'
 include 'extensions/session-testing-war'
 include 'geode-concurrency-test'
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Create module for Protobuf messages
> -----------------------------------
>
>                 Key: GEODE-4053
>                 URL: https://issues.apache.org/jira/browse/GEODE-4053
>             Project: Geode
>          Issue Type: Improvement
>          Components: client/server
>            Reporter: Michael Dodge
>             Fix For: 1.4.0
>
>
> Currently, the Java classes generated from the Protobuf files for the new protocol are
packages inside geode-protobuf. As this module also implements the client protocol using the
Protobuf messages, it depends on geode-client-protocol and geode-core. This results in unnecessary
dependencies for just using the Protobuf messages. Extract the Java classes generated from
the Protobuf files into their own module, geode-protobuf-messages, on which geode-protobuf
depends.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message