aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.gradle44
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_generator.cc2
2 files changed, 44 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle
index 4684592..7aa8ac2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -19,9 +19,11 @@ apply plugin: 'java'
configurations {
micro
nano
+ lite
}
sourceSets {
+
micro {
java {
srcDirs = ['java/src/main/java/']
@@ -29,6 +31,38 @@ sourceSets {
}
}
+ lite {
+ java {
+ srcDirs = ['java/src/main/java/']
+ include 'com/google/protobuf/UninitializedMessageException.java'
+ include 'com/google/protobuf/MessageLite.java'
+ include 'com/google/protobuf/InvalidProtocolBufferException.java'
+ include 'com/google/protobuf/CodedOutputStream.java'
+ include 'com/google/protobuf/ByteString.java'
+ include 'com/google/protobuf/CodedInputStream.java'
+ include 'com/google/protobuf/ExtensionRegistryLite.java'
+ include 'com/google/protobuf/AbstractMessageLite.java'
+ include 'com/google/protobuf/AbstractParser.java'
+ include 'com/google/protobuf/FieldSet.java'
+ include 'com/google/protobuf/Internal.java'
+ include 'com/google/protobuf/WireFormat.java'
+ include 'com/google/protobuf/GeneratedMessageLite.java'
+ include 'com/google/protobuf/BoundedByteString.java'
+ include 'com/google/protobuf/LazyField.java'
+ include 'com/google/protobuf/LazyFieldLite.java'
+ include 'com/google/protobuf/LazyStringList.java'
+ include 'com/google/protobuf/LazyStringArrayList.java'
+ include 'com/google/protobuf/UnmodifiableLazyStringList.java'
+ include 'com/google/protobuf/LiteralByteString.java'
+ include 'com/google/protobuf/MessageLiteOrBuilder.java'
+ include 'com/google/protobuf/Parser.java'
+ include 'com/google/protobuf/ProtocolStringList.java'
+ include 'com/google/protobuf/RopeByteString.java'
+ include 'com/google/protobuf/SmallSortedMap.java'
+ include 'com/google/protobuf/Utf8.java'
+ }
+ }
+
nano {
java {
srcDirs = [
@@ -77,8 +111,18 @@ task microJar(type: Jar) {
classifier "micro"
}
+task liteJar(type: Jar) {
+ from sourceSets.lite.output
+ dependsOn liteClasses
+ baseName "libprotobuf"
+ appendix "java"
+ version "2.3"
+ classifier "lite"
+}
+
artifacts {
micro microJar
nano nanoJar
+ lite liteJar
}
diff --git a/src/google/protobuf/compiler/javanano/javanano_generator.cc b/src/google/protobuf/compiler/javanano/javanano_generator.cc
index 99ebe12..96e3e80 100644
--- a/src/google/protobuf/compiler/javanano/javanano_generator.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_generator.cc
@@ -156,8 +156,6 @@ bool JavaNanoGenerator::Generate(const FileDescriptor* file,
params.set_generate_clone(option_value == "true");
} else if (option_name == "generate_intdefs") {
params.set_generate_intdefs(option_value == "true");
- } else if (option_name == "generate_clear") {
- params.set_generate_clear(option_value == "true");
} else {
*error = "Ignore unknown javanano generator option: " + option_name;
}