-
Notifications
You must be signed in to change notification settings - Fork 18k
x/mobile/cmd/gobind: Allow custom java package prefix #9660
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
Comments
/cc @hyangah |
I don't have any objection. Is this what you want? |
Yes. That is it exactly. I'll send you a gerrit code review request with the changes I have once I add a test. However, if you'd prefer to write this yourself please let me know. Thanks again for taking the time to look at this! |
CL https://golang.org/cl/13969 mentions this issue. |
Introduce options -javapkg and -prefix for gobind command. The following generates java class Testpkg with package name com.example. gobind -lang=java -javapkg=com.example testpkg The following generates objective-c files where function and type names are prefixed with ExampleTestpkg. gobind -lang=objc -prefix=Example testpkg As discussed in golang/go#9660 and golang/go#12245. Gomobile support is not yet implemented. Change-Id: Ib9e39997ce915580a5a2e25643c0c28373f27ee1 Reviewed-on: https://go-review.googlesource.com/13969 Reviewed-by: David Crawshaw <crawshaw@golang.org>
CL https://golang.org/cl/14023 mentions this issue. |
Thanks for the fix! |
New option -javapkg for -target=android, and -prefix for -target=ios. Fixes golang/go#9660. Change-Id: I9143f30672672527876524b38f450629452a3161 Reviewed-on: https://go-review.googlesource.com/14023 Reviewed-by: David Crawshaw <crawshaw@golang.org>
New option -javapkg for -target=android, and -prefix for -target=ios. Fixes golang/go#9660. Change-Id: I9143f30672672527876524b38f450629452a3161 Reviewed-on: https://go-review.googlesource.com/14023 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Currently the gobind command defaults to putting all generated java code into the go top level package. If the tool allowed for a custom package prefix this would provide for cleaner namespacing. I have code for this that I'd be happy to contribute via Gerrit if this of interest.
Go version and architecture:
go version go1.4 / darwin/amd64
What I did:
Run
gobind -lang=java github.com/surullabs/mypackage
The generated file uses the following package:
package go.mypackage;
I would like to use
package com.surul.mypackage;
The text was updated successfully, but these errors were encountered: