use of com.google.devtools.build.buildjar.proto.JavaCompilation.Manifest in project bazel by bazelbuild.
the class AnnotationProcessingModule method buildManifestProto.
private Manifest buildManifestProto() {
Manifest.Builder builder = Manifest.newBuilder();
List<String> keys = new ArrayList<>(units.keySet());
Collections.sort(keys);
for (String key : keys) {
CompilationUnit unit = units.get(key);
builder.addCompilationUnit(unit);
}
return builder.build();
}
use of com.google.devtools.build.buildjar.proto.JavaCompilation.Manifest in project bazel by bazelbuild.
the class GenClass method main.
public static void main(String[] args) throws IOException {
GenClassOptions options = GenClassOptionsParser.parse(Arrays.asList(args));
Manifest manifest = readManifest(options.manifest());
deleteTree(options.tempDir());
extractGeneratedClasses(options.classJar(), manifest, options.tempDir());
writeOutputJar(options);
}
use of com.google.devtools.build.buildjar.proto.JavaCompilation.Manifest in project bazel by bazelbuild.
the class IdlClass method main.
public static void main(String[] args) throws IOException {
OptionsParser optionsParser = OptionsParser.newOptionsParser(IdlClassOptions.class);
optionsParser.parseAndExitUponError(args);
IdlClassOptions options = optionsParser.getOptions(IdlClassOptions.class);
Preconditions.checkNotNull(options.manifestProto);
Preconditions.checkNotNull(options.classJar);
Preconditions.checkNotNull(options.outputClassJar);
Preconditions.checkNotNull(options.outputSourceJar);
Preconditions.checkNotNull(options.tempDir);
List<Path> idlSources = Lists.newArrayList();
for (String idlSource : optionsParser.getResidue()) {
idlSources.add(Paths.get(idlSource));
}
Manifest manifest = readManifest(options.manifestProto);
writeClassJar(options, idlSources, manifest);
writeSourceJar(options, idlSources, manifest);
}
Aggregations