addressbook.proto: Enable java_multiple_files option

And update the java_package value accordingly.
Enabling java_multiple_files is preferred nowadays.
Refs CL 348101638 which updates the tutorial accordingly.
pull/8467/head
Chris Rebert 4 years ago committed by Adam Cozzette
parent 053966b495
commit 9d175493a3
  1. 4
      examples/AddPerson.java
  2. 4
      examples/ListPeople.java
  3. 3
      examples/addressbook.proto

@ -1,7 +1,7 @@
// See README.txt for information and build instructions. // See README.txt for information and build instructions.
import com.example.tutorial.AddressBookProtos.AddressBook; import com.example.tutorial.protos.AddressBook;
import com.example.tutorial.AddressBookProtos.Person; import com.example.tutorial.protos.Person;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;

@ -1,7 +1,7 @@
// See README.txt for information and build instructions. // See README.txt for information and build instructions.
import com.example.tutorial.AddressBookProtos.AddressBook; import com.example.tutorial.protos.AddressBook;
import com.example.tutorial.AddressBookProtos.Person; import com.example.tutorial.protos.Person;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;

@ -14,7 +14,8 @@ import "google/protobuf/timestamp.proto";
// [END declaration] // [END declaration]
// [START java_declaration] // [START java_declaration]
option java_package = "com.example.tutorial"; option java_multiple_files = true;
option java_package = "com.example.tutorial.protos";
option java_outer_classname = "AddressBookProtos"; option java_outer_classname = "AddressBookProtos";
// [END java_declaration] // [END java_declaration]

Loading…
Cancel
Save