public interface JavaLibrary extends HasClasspathEntries, HasClasspathDeps, HasDesugarSupport, HasJavaAbi, HasJavaClassHashes, HasMavenCoordinates, HasRuntimeDeps, HasSources
| Modifier and Type | Interface and Description |
|---|---|
static class |
JavaLibrary.Data |
| Modifier and Type | Field and Description |
|---|---|
static Flavor |
GWT_MODULE_FLAVOR
This Buildable is expected to support the GWT flavor, which is a
BuildRule whose output
file is a JAR containing the files necessary to use this JavaLibrary as a GWT module. |
static Flavor |
MAVEN_JAR
For maven publishing only dependencies containing maven coordinates will be listed as
dependencies.
|
static Flavor |
SRC_JAR
It's possible to ask a
JavaLibrary to collect its own sources and build a source jar. |
| Modifier and Type | Method and Description |
|---|---|
Optional<SourcePath> |
getGeneratedAnnotationSourcePath() |
com.google.common.collect.ImmutableSortedSet<SourcePath> |
getJavaSrcs() |
com.google.common.collect.ImmutableSortedSet<SourcePath> |
getResources() |
Optional<String> |
getResourcesRoot() |
boolean |
hasAnnotationProcessing() |
boolean |
neverMarkAsUnusedDependency() |
getImmediateClasspaths, getOutputClasspaths, getTransitiveClasspathDeps, getTransitiveClasspathsgetDepsForTransitiveClasspathEntriesisDesugarEnabled, isInterfaceMethodsDesugarEnabledgetAbiInfo, getAbiJar, getSourceOnlyAbiJargetClassHashesProvider, getClassNamesToHashesgetMavenCoords, isMavenCoordsPresentgetRuntimeDepscompareTo, getBuildDeps, getBuildSteps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, getSourcePathToOutput, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolvergetDependencies, getSourcePathOutputsgetTypegetSourcesstatic final Flavor GWT_MODULE_FLAVOR
BuildRule whose output
file is a JAR containing the files necessary to use this JavaLibrary as a GWT module.
Normally, this includes Java source code, a .gwt.xml file, and static resources, such as
stylesheets and image files.
In the event that this JavaLibrary cannot be represented as a GWT module (for
example, if it has no srcs or resources of its own, but only exists to export
deps), then the flavor will be Optional.empty().
Note that the output of the BuildRule for this flavor may contain .class
files. For example, if a third-party releases its .class and .java files in the
same JAR, it is common for a prebuilt_jar() to declare that file as both its binary_jar and its source_jar. In that case, the output of the BuildRule will
be the original JAR file, which is why it would contain .class files.
static final Flavor SRC_JAR
JavaLibrary to collect its own sources and build a source jar.static final Flavor MAVEN_JAR
com.google.common.collect.ImmutableSortedSet<SourcePath> getJavaSrcs()
com.google.common.collect.ImmutableSortedSet<SourcePath> getResources()
Optional<SourcePath> getGeneratedAnnotationSourcePath()
boolean hasAnnotationProcessing()
boolean neverMarkAsUnusedDependency()