-
Notifications
You must be signed in to change notification settings - Fork 80
[gazelle] Add java_include_binary directive #378
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
Merged
gibfahn
merged 6 commits into
bazel-contrib:main
from
tjoneslo:issue-316-add-java-include-binary
Oct 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9723490
Add java_include_binary directive
tjoneslo 100220a
Merge branch 'main' of https://github.com/bazel-contrib/rules_jvm int…
tjoneslo 2f1ebdd
Merge branch 'main' of https://github.com/bazel-contrib/rules_jvm int…
tjoneslo 2e933aa
Update name to `java_generate_binary` following the proto example.
tjoneslo d8f1403
Merge branch 'main' of https://github.com/bazel-contrib/rules_jvm int…
tjoneslo d2e425e
run tools/format.sh
tjoneslo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"version": "2"} |
1 change: 1 addition & 0 deletions
1
java/gazelle/testdata/bin_disable_bin/src/main/java/com/example/hello/BUILD.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # gazelle:java_include_binary false |
9 changes: 9 additions & 0 deletions
9
java/gazelle/testdata/bin_disable_bin/src/main/java/com/example/hello/BUILD.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| load("@rules_java//java:defs.bzl", "java_library") | ||
|
|
||
| # gazelle:java_include_binary false | ||
|
|
||
| java_library( | ||
| name = "hello", | ||
| srcs = ["Hello.java"], | ||
| visibility = ["//:__subpackages__"], | ||
| ) |
7 changes: 7 additions & 0 deletions
7
java/gazelle/testdata/bin_disable_bin/src/main/java/com/example/hello/Hello.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package gazelle.testdata.bin_disable_bin.src.main.java.com.example.hello; | ||
|
|
||
| public class Hello { | ||
| public static void main(String[] args) { | ||
| System.out.println("Hello, World!"); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # gazelle:resolve java org.junit @maven//:junit_junit | ||
| # gazelle:java_include_binary false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # gazelle:resolve java org.junit @maven//:junit_junit | ||
| # gazelle:java_include_binary false |
Empty file.
1 change: 1 addition & 0 deletions
1
java/gazelle/testdata/bin_in_test_disable_bin/maven_install.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"version": "2"} |
10 changes: 10 additions & 0 deletions
10
java/gazelle/testdata/bin_in_test_disable_bin/src/test/java/com/example/test/BUILD.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| load("@contrib_rules_jvm//java:defs.bzl", "java_test_suite") | ||
|
|
||
| java_test_suite( | ||
| name = "test", | ||
| srcs = [ | ||
| "SomeOtherTest.java", | ||
| "SomeTestBinary.java", | ||
| ], | ||
| deps = ["@maven//:junit_junit"], | ||
| ) |
8 changes: 8 additions & 0 deletions
8
...azelle/testdata/bin_in_test_disable_bin/src/test/java/com/example/test/SomeOtherTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package gazelle.testdata.bin_in_test_disable_bin.src.test.java.com.example.test; | ||
|
|
||
| import org.junit.Test; | ||
|
|
||
| public class SomeOtherTest { | ||
| @Test | ||
| public void testPasses() {} | ||
| } |
7 changes: 7 additions & 0 deletions
7
...zelle/testdata/bin_in_test_disable_bin/src/test/java/com/example/test/SomeTestBinary.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package gazelle.testdata.bin_in_test_disable_bin.src.test.java.com.example.test; | ||
|
|
||
| public class SomeTestBinary { | ||
| public static void main(String[] args) { | ||
| System.out.println("Test passed!"); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.