title: Duplicate class in protobuf lite and protobuf java
body: <p>I'm using grpc with protobuf lite in android implementation. but protobuf lite doesn't have google time stamp, and my protos has import "google/protobuf/timestamp.proto". so i added  implementation 'com.google.protobuf:protobuf-java:3.7.1' to gradle that contains google time stamp. but after that code compilaition has errors. such as :Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1). 
  any idea to fix this would be appreciated.</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'com.google.protobuf'
  
  android {
      compileSdkVersion 28
      buildToolsVersion "29.0.0"
      defaultConfig {
          minSdkVersion 21
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          debug {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  
      sourceSets {
          main {
              proto {
                  srcDir 'src/main'
              }
              java {
                  srcDir 'src/main'
              }
          }
      }
  }
  
  protobuf {
      protoc { artifact = 'com.google.protobuf:protoc:3.7.1' }
      plugins {
          javalite { artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0" }
          grpc {
              artifact = 'io.grpc:protoc-gen-grpc-java:1.20.0' // CURRENT_GRPC_VERSION
          }
      }
  
      generateProtoTasks {
          all().each { task -&gt;
              task.plugins {
                  javalite {}
                  grpc { // Options added to --grpc_out
                      option 'lite'
                  }
              }
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.2.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
      implementation 'com.google.android.material:material:1.0.0'
  
      // You need to build grpc-java to obtain these libraries below.
      implementation 'io.grpc:grpc-okhttp:1.20.0'
      implementation 'io.grpc:grpc-protobuf-lite:1.22.1'
      implementation 'io.grpc:grpc-stub:1.20.0'
      implementation 'javax.annotation:javax.annotation-api:1.3.2'
      implementation 'com.google.protobuf:protobuf-java:3.7.1'
  }
  </code></pre>
  
  <p>given error is:</p>
  
  <pre class="lang-none prettyprint-override"><code>Duplicate class com.google.protobuf.AbstractMessageLite found in modules      protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractParser found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.AbstractProtobufList found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.BooleanArrayList found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteBufferWriter found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteOutput found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  Duplicate class com.google.protobuf.ByteString$1 found in modules protobuf-java-3.7.1.jar (com.google.protobuf:protobuf-java:3.7.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
  </code></pre>