-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements the most of the changes for 0.5.0 #19
Implements the most of the changes for 0.5.0 #19
Conversation
Require the user to apply either the java plugin or the android plugin first, so that he has a choice between them. Resolves #11
…ted before afterEvaluate
…for both Java and android
|
||
// You need to build the https://github.com/grpc/grpc-java | ||
// to obtain these libraries below. | ||
compile 'io.grpc:grpc-core:0.1.0-SNAPSHOT' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use these snapshots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
…tion of tasks in the tests and fixed found issues; Use released version of grpc
… right before executing the java compilation task. Otherwise incremental build will break.
…t/tested as long as install is not in the command line
- Add ofTest() and ofNonTest() selectors; - Move the linking of generateProto tasks and javaCompile tasks (adding task dependency, and adding generated source dirs to javaCompile's input) to right after the execution of generateProtoTasks configuration closure, because alternative locations won't work well: 1. At the beginning of the generateProto task. In incremental builds, the generateProto task may be skipped because proto files are not changed, but we still want to add the generated files dirs to the javaCompile task. 2. In project.gradle.taskGraph.beforeTask. Android plugin doesn't allow calling variant.registerJavaGeneratingTask() at this point, i.e., in the task execution phase. Caveat: if the user configure tasks in their own project.afterEvaluate closure, e.g., adding a new builtin/plugin, it won't be included in the javaCompile inputs. So, user has to configure tasks in protobuf.generateProtoTasks. - Add more test cases.
…enerateProtoTasks block
|
||
/** | ||
* Returns the conventional substring that represents the sourceSet in task names, | ||
* e.g., "generate<sourceSetStubString>Proto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/StubS/Subs/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@zhangkun83, some comments, but LGTM |
Implements the most of the changes for 0.5.0
* added network manager, added location manager, changed main activity to have a simple map fragment, and waith until map is ready and location is ready before init. * changed mapfragment back and used location manager in map wrapper fragment
android.sourceSets
will have theproto
extension for customizing proto source directories/files, just like what the top-levelsourceSets
does. (Does not work with android plugin #11)generate*Proto
task (implemented byGenerateProtoTask
) for eachvariant
in Android projects. (Does not work with android plugin #11)protobuf
block (implemented byProtobufConfigurator
) with more Gradlely syntax. (Organize the options better #14, generatedFileDir does not follow Gradle Java Plugin conventions (nor can you) #16)generate*Proto
tasks instead of insourceSets
. We provide convenient helpersprotobuf.generateProtoTasks
for users to configure a certain subset of tasks at a time.extractedProtosDir
option is removed, because the user should not really care about it."$buildDir/generated/source/proto/$sourceSet/$name"
, where$name
could bejava
,python
etc. The basedir i.e.$buildDir/generated/source/proto/
is configurable throughprotobuf.generatedFilesBaseDir
(Setting an output directory #13, generatedFileDir does not follow Gradle Java Plugin conventions (nor can you) #16)Design doc is here.
@ejona86 please review
@madongfly please help verify the Android support works