-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for "exports" attr in java_library rule (#182)
- Loading branch information
1 parent
8d4cb6e
commit e01e2fd
Showing
9 changed files
with
56 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
3 changes: 2 additions & 1 deletion
3
...s/skip-artifact-generation/parent/parent1/src/main/java/com/pomgen/example/lib1/Main.java
This file contains 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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package com.pomgen.example.lib1; | ||
|
||
import com.google.common.base.Preconditions; | ||
import java.lang.reflect.Method; | ||
|
||
public class Main { | ||
public static void main(String[] args) throws Exception { | ||
System.out.println("Hello Guava at-runtime-only: " + Class.forName("com.google.common.base.Preconditions")); | ||
Preconditions.checkNotNull(args); | ||
System.out.println("Greetings from lib2: " + Class.forName("com.pomgen.example.lib2.Lib2API").getMethod("getGreeting").invoke(null)); | ||
} | ||
} |
This file contains 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 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 |
---|---|---|
@@ -1,24 +1,16 @@ | ||
java_library( | ||
name = "set1", | ||
runtime_deps = [ | ||
"@maven//:com_google_guava_guava", | ||
":set2", | ||
], | ||
runtime_deps = [":set2",], | ||
exports = ["@maven//:com_google_guava_guava",], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
java_library( | ||
name = "set2", | ||
runtime_deps = [ | ||
"//examples/skip-artifact-generation/lib", | ||
"@maven//:com_google_guava_guava", | ||
":set3", | ||
], | ||
runtime_deps = [":set3", "//examples/skip-artifact-generation/lib",], | ||
) | ||
|
||
java_library( | ||
name = "set3", | ||
runtime_deps = [ | ||
"@maven//:org_apache_commons_commons_lang3", | ||
], | ||
runtime_deps = ["@maven//:org_apache_commons_commons_lang3",], | ||
) |
This file contains 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 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