[Git][java-team/grpc-java][master] Add remaining modules required for Bazel

Olek Wojnar gitlab at salsa.debian.org
Thu Jul 16 23:17:48 BST 2020



Olek Wojnar pushed to branch master at Debian Java Maintainers / grpc-java


Commits:
10588384 by Olek Wojnar at 2020-07-16T18:16:47-04:00
Add remaining modules required for Bazel

- - - - -


10 changed files:

- debian/changelog
- debian/control
- + debian/libgrpc-java.lintian-overrides
- debian/libgrpc-java.poms
- debian/maven.ignoreRules
- debian/maven.rules
- debian/patches/build-plugin.patch
- debian/patches/fix-gradle-build.patch
- + debian/patches/remove-android-annotations.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+grpc-java (1.20.0+ds-2) unstable; urgency=medium
+
+  * Add remaining modules required for Bazel
+
+ -- Olek Wojnar <olek at debian.org>  Thu, 25 Jun 2020 00:56:18 -0400
+
 grpc-java (1.20.0+ds-1) unstable; urgency=medium
 
   * Initial release (Closes: #959837)


=====================================
debian/control
=====================================
@@ -12,15 +12,23 @@ Build-Depends: debhelper-compat (= 13),
                gradle-plugin-protobuf,
                javahelper,
                jdupes,
+               libandroid-tools-annotations-java,
+               libanimal-sniffer-java,
                libc-ares-dev,
+               liberror-prone-java,
                libgeronimo-annotation-1.3-spec-java,
                libgflags-dev,
+               libgoogle-auth-java,
+               libgoogle-common-protos-java,
+               libgoogle-gson-java,
                libgoogle-perftools-dev,
                libgradle-plugins-java,
                libgtest-dev,
                libguava-java,
                libjacoco-java,
                libjsr305-java,
+               libnetty-java,
+               libopencensus-java,
                libprotobuf-dev,
                libprotobuf-java,
                libprotoc-dev (>= 3.11.4~),


=====================================
debian/libgrpc-java.lintian-overrides
=====================================
@@ -0,0 +1,2 @@
+# Path is correct
+libgrpc-java: repeated-path-segment


=====================================
debian/libgrpc-java.poms
=====================================
@@ -1 +1,7 @@
+auth/build/debian/grpc-auth.pom --java-lib --artifact=auth/build/libs/*.jar
 context/build/debian/grpc-context.pom --java-lib --artifact=context/build/libs/*.jar
+core/build/debian/grpc-core.pom --java-lib --artifact=core/build/libs/*.jar
+netty/build/debian/grpc-netty.pom --java-lib --artifact=netty/build/libs/*.jar
+protobuf/build/debian/grpc-protobuf.pom --java-lib --artifact=protobuf/build/libs/*.jar
+protobuf-lite/build/debian/grpc-protobuf-lite.pom --java-lib --artifact=protobuf-lite/build/libs/*.jar
+stub/build/debian/grpc-stub.pom --java-lib --artifact=stub/build/libs/*.jar


=====================================
debian/maven.ignoreRules
=====================================
@@ -4,6 +4,7 @@ com.github.ben-manes gradle-versions-plugin
 gradle.plugin.com.github.sherter.google-java-format google-java-format-gradle-plugin
 me.champeau.gradle jmh-gradle-plugin
 gradle.plugin.io.morethan.jmhreport gradle-jmh-report
+com.google.android annotations
 
 #com.google.guava guava-testlib
 #com.google.truth truth


=====================================
debian/maven.rules
=====================================
@@ -1 +1,4 @@
-s/com.google.protobuf/ws.antonov.gradle.plugins/ s/protobuf-gradle-plugin/gradle-plugin-protobuf/ * s/.*/debian/ * *
+#s/com.google.protobuf/ws.antonov.gradle.plugins/ s/protobuf-gradle-plugin/gradle-plugin-protobuf/ * s/.*/debian/ * *
+#org.codehaus.mojo s/animal_sniffer/animal-sniffer/ * s/.*/debian/ * *
+#io.netty netty-codec-http2 * s/.*/debian/ * *
+com.google.auth google-auth-library-credentials * s/.*/debian/ * *


=====================================
debian/patches/build-plugin.patch
=====================================
@@ -4,7 +4,7 @@ Last-Update: 2020-06-19
 
 --- /dev/null
 +++ b/Makefile.am
-@@ -0,0 +1,1 @@
+@@ -0,0 +1 @@
 +SUBDIRS = compiler/
 --- /dev/null
 +++ b/compiler/Makefile.am


=====================================
debian/patches/fix-gradle-build.patch
=====================================
@@ -4,17 +4,15 @@ Last-Update: 2020-06-18
 
 --- a/settings.gradle
 +++ b/settings.gradle
-@@ -1,54 +1,4 @@
- rootProject.name = "grpc"
--include ":grpc-core"
+@@ -3,52 +3,14 @@
  include ":grpc-context"
--include ":grpc-stub"
--include ":grpc-auth"
+ include ":grpc-stub"
+ include ":grpc-auth"
 -include ":grpc-okhttp"
--include ":grpc-protobuf"
--include ":grpc-protobuf-lite"
+ include ":grpc-protobuf"
+ include ":grpc-protobuf-lite"
 -include ":grpc-protobuf-nano"
--include ":grpc-netty"
+ include ":grpc-netty"
 -include ":grpc-netty-shaded"
 -include ":grpc-grpclb"
 -include ":grpc-testing"
@@ -28,15 +26,15 @@ Last-Update: 2020-06-18
 -include ":grpc-xds"
 -include ":grpc-bom"
  
--project(':grpc-core').projectDir = "$rootDir/core" as File
+ project(':grpc-core').projectDir = "$rootDir/core" as File
  project(':grpc-context').projectDir = "$rootDir/context" as File
--project(':grpc-stub').projectDir = "$rootDir/stub" as File
--project(':grpc-auth').projectDir = "$rootDir/auth" as File
+ project(':grpc-stub').projectDir = "$rootDir/stub" as File
+ project(':grpc-auth').projectDir = "$rootDir/auth" as File
 -project(':grpc-okhttp').projectDir = "$rootDir/okhttp" as File
--project(':grpc-protobuf').projectDir = "$rootDir/protobuf" as File
--project(':grpc-protobuf-lite').projectDir = "$rootDir/protobuf-lite" as File
+ project(':grpc-protobuf').projectDir = "$rootDir/protobuf" as File
+ project(':grpc-protobuf-lite').projectDir = "$rootDir/protobuf-lite" as File
 -project(':grpc-protobuf-nano').projectDir = "$rootDir/protobuf-nano" as File
--project(':grpc-netty').projectDir = "$rootDir/netty" as File
+ project(':grpc-netty').projectDir = "$rootDir/netty" as File
 -project(':grpc-netty-shaded').projectDir = "$rootDir/netty/shaded" as File
 -project(':grpc-grpclb').projectDir = "$rootDir/grpclb" as File
 -project(':grpc-testing').projectDir = "$rootDir/testing" as File
@@ -127,7 +125,7 @@ Last-Update: 2020-06-18
      }
  
      jar.manifest {
-@@ -103,7 +67,7 @@
+@@ -103,92 +67,19 @@
      }
  
      ext {
@@ -136,10 +134,17 @@ Last-Update: 2020-06-18
          protocPluginBaseName = 'protoc-gen-grpc-java'
          javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix"
  
-@@ -115,80 +79,7 @@
+-        nettyVersion = '4.1.34.Final'
+-        googleauthVersion = '0.13.0'
+-        guavaVersion = '26.0-android'
++        nettyVersion = 'debian'
++        googleauthVersion = 'debian'
++        guavaVersion = 'debian'
+         protobufVersion = '3.7.1'
+         protocVersion = protobufVersion
          protobufNanoVersion = '3.0.0-alpha-5'
-         opencensusVersion = '0.19.2'
- 
+-        opencensusVersion = '0.19.2'
+-
 -        configureProtoCompilation = {
 -            String generatedSourcePath = "${projectDir}/src/generated"
 -            project.apply plugin: 'com.google.protobuf'
@@ -208,7 +213,8 @@ Last-Update: 2020-06-18
 -                        "|.*/build/generated/source/proto/[^/]+/java/.*"
 -            }
 -        }
--
++        opencensusVersion = 'debian'
+ 
          def epoll_suffix = "";
 -        if (osdetector.classifier in ["linux-x86_64"]) {
 -            // The native code is only pre-compiled on certain platforms.
@@ -370,22 +376,22 @@ Last-Update: 2020-06-18
      // At a test failure, log the stack trace to the console so that we don't
      // have to open the HTML in a browser.
      test {
-@@ -451,80 +210,5 @@
+@@ -451,80 +210,11 @@
  def baselineGrpcVersion = '1.6.1'
  def publicApiSubprojects = [
      // TODO: uncomment after grpc-alts, grpc-bom artifact is published.
 -    // ':grpc-alts',
--    ':grpc-auth',
+     ':grpc-auth',
 -    //':grpc-bom',
      ':grpc-context',
--    ':grpc-core',
+     ':grpc-core',
 -    ':grpc-grpclb',
--    ':grpc-netty',
+     ':grpc-netty',
 -    ':grpc-okhttp',
--    ':grpc-protobuf',
--    ':grpc-protobuf-lite',
+     ':grpc-protobuf',
+     ':grpc-protobuf-lite',
 -    ':grpc-protobuf-nano',
--    ':grpc-stub',
+     ':grpc-stub',
 -    ':grpc-testing',
  ]
 -
@@ -694,3 +700,182 @@ Last-Update: 2020-06-18
 -configureTestTask(testDeprecatedGolden, '', '', 'TestDeprecatedService')
 -configureTestTask(testDeprecatedLiteGolden, 'Lite', '', 'TestDeprecatedService')
 -configureTestTask(testDeprecatedNanoGolden, 'Nano', '/nano', 'TestDeprecatedService')
+--- a/auth/build.gradle
++++ b/auth/build.gradle
+@@ -2,8 +2,4 @@
+ dependencies {
+     compile project(':grpc-core'),
+             libraries.google_auth_credentials
+-    testCompile project(':grpc-testing'),
+-            libraries.google_auth_oauth2_http
+-    signature "org.codehaus.mojo.signature:java17:1.0 at signature"
+-    signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4 at signature"
+ }
+--- a/core/build.gradle
++++ b/core/build.gradle
+@@ -31,26 +31,4 @@
+         // prefer 20.0 from libraries instead of 19.0
+         exclude group: 'com.google.guava', module: 'guava'
+     }
+-
+-    testCompile project(':grpc-context').sourceSets.test.output,
+-            project(':grpc-testing'),
+-            project(':grpc-grpclb'),
+-            libraries.guava_testlib
+-
+-    signature "org.codehaus.mojo.signature:java17:1.0 at signature"
+-    signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4 at signature"
+-}
+-
+-javadoc {
+-    // We want io.grpc.Internal, but not io.grpc.Internal*
+-    exclude 'io/grpc/Internal?*.java'
+-    exclude 'io/grpc/internal/**'
+-}
+-
+-animalsniffer {
+-    // Don't check sourceSets.jmh
+-    sourceSets = [
+-        sourceSets.main,
+-        sourceSets.test
+-    ]
+ }
+--- a/netty/build.gradle
++++ b/netty/build.gradle
+@@ -3,39 +3,8 @@
+     compile project(':grpc-core'),
+             libraries.netty,
+             libraries.netty_proxy_handler
+-
+-    // Tests depend on base class defined by core module.
+-    testCompile project(':grpc-core').sourceSets.test.output,
+-            project(':grpc-testing'),
+-            project(':grpc-testing-proto')
+-    testRuntime libraries.netty_tcnative,
+-            libraries.conscrypt
+-    signature "org.codehaus.mojo.signature:java17:1.0 at signature"
+-}
+-
+-import net.ltgt.gradle.errorprone.CheckSeverity
+-
+-[compileJava, compileTestJava].each() {
+-    // Netty retuns a lot of futures that we mostly don't care about.
+-    it.options.errorprone.check("FutureReturnValueIgnored", CheckSeverity.OFF)
+-}
+-
+-javadoc {
+-    options.links 'http://netty.io/4.1/api/'
+-    exclude 'io/grpc/netty/Internal*'
+ }
+ 
+ project.sourceSets {
+     main { java { srcDir "${projectDir}/third_party/netty/java" } }
+ }
+-
+-test {
+-    // Allow testing Jetty ALPN in TlsTest
+-    jvmArgs "-javaagent:" + configurations.alpnagent.asPath
+-}
+-
+-jmh {
+-    // Workaround
+-    // https://github.com/melix/jmh-gradle-plugin/issues/97#issuecomment-316664026
+-    includeTests = true
+-}
+--- a/protobuf-lite/build.gradle
++++ b/protobuf-lite/build.gradle
+@@ -4,16 +4,13 @@
+             url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
+         mavenLocal()
+     }
+-    dependencies { classpath libraries.protobuf_plugin }
+ }
+ 
+-apply plugin: 'com.google.protobuf'
+-
+ description = 'gRPC: Protobuf Lite'
+ 
+ dependencies {
+     compile project(':grpc-core'),
+-            libraries.protobuf_lite
++            libraries.protobuf
+     compile (libraries.guava) {
+         // prefer 2.3.2 from libraries instead of 2.1.3
+         exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
+@@ -22,44 +19,4 @@
+         // prefer 1.17 from libraries instead of 1.14
+         exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
+     }
+-
+-    testProtobuf libraries.protobuf
+-
+-    signature "org.codehaus.mojo.signature:java17:1.0 at signature"
+-    signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4 at signature"
+-}
+-
+-compileTestJava {
+-    // Protobuf-generated Lite produces quite a few warnings.
+-    options.compilerArgs += [
+-        "-Xlint:-rawtypes",
+-        "-Xlint:-unchecked",
+-        "-Xlint:-fallthrough"
+-    ]
+-    options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
+-}
+-
+-protobuf {
+-    protoc {
+-        if (project.hasProperty('protoc')) {
+-            path = project.protoc
+-        } else {
+-            artifact = "com.google.protobuf:protoc:${protocVersion}"
+-        }
+-    }
+-    plugins {
+-        javalite {
+-            if (project.hasProperty('protoc-gen-javalite')) {
+-                path = project['protoc-gen-javalite']
+-            } else {
+-                artifact = libraries.protoc_lite
+-            }
+-        }
+-    }
+-    generateProtoTasks {
+-        ofSourceSet('test')*.each { task ->
+-            task.builtins { remove java }
+-            task.plugins { javalite {} }
+-        }
+-    }
+ }
+--- a/protobuf/build.gradle
++++ b/protobuf/build.gradle
+@@ -5,7 +5,6 @@
+         maven { // The google mirror is less flaky than mavenCentral()
+             url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
+     }
+-    dependencies { classpath libraries.protobuf_plugin }
+ }
+ 
+ dependencies {
+@@ -31,8 +30,4 @@
+     compile (project(':grpc-protobuf-lite')) {
+         exclude group: 'com.google.protobuf', module: 'protobuf-lite'
+     }
+-
+-    signature "org.codehaus.mojo.signature:java17:1.0 at signature"
+ }
+-
+-javadoc.options.links 'https://developers.google.com/protocol-buffers/docs/reference/java/'
+--- a/stub/build.gradle
++++ b/stub/build.gradle
+@@ -1,10 +1,4 @@
+ description = "gRPC: Stub"
+ dependencies {
+     compile project(':grpc-core')
+-    testCompile libraries.truth,
+-            project(':grpc-testing')
+-    signature "org.codehaus.mojo.signature:java17:1.0 at signature"
+-    signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4 at signature"
+ }
+-
+-javadoc.options.links "https://google.github.io/guava/releases/${guavaVersion}/api/docs/"


=====================================
debian/patches/remove-android-annotations.patch
=====================================
@@ -0,0 +1,22 @@
+Description: Remove Android annotations
+Author: Olek Wojnar <olek at debian.org>
+Last-Update: 2020-07-16
+
+--- a/core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java
++++ b/core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java
+@@ -16,7 +16,6 @@
+ 
+ package io.grpc.internal;
+ 
+-import android.annotation.SuppressLint;
+ import com.google.common.annotations.VisibleForTesting;
+ import com.google.common.base.Verify;
+ import io.grpc.Attributes;
+@@ -247,7 +246,6 @@
+   // javax.naming.* is only loaded reflectively and is never loaded for Android
+   // The lint issue id is supposed to be "InvalidPackage" but it doesn't work, don't know why.
+   // Use "all" as the lint issue id to suppress all types of lint error.
+-  @SuppressLint("all")
+   static final class JndiRecordFetcher implements RecordFetcher {
+     @Override
+     public List<String> getAllRecords(String recordType, String name) throws NamingException {


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
 python3.patch
 fix-gradle-build.patch
 build-plugin.patch
+remove-android-annotations.patch



View it on GitLab: https://salsa.debian.org/java-team/grpc-java/-/commit/10588384f90ab9614c74c5dea0eb9b77383507a2

-- 
View it on GitLab: https://salsa.debian.org/java-team/grpc-java/-/commit/10588384f90ab9614c74c5dea0eb9b77383507a2
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20200716/21381477/attachment.html>


More information about the pkg-java-commits mailing list