Introduction to Pants Build Tool (#14517)

* Introduction to Pants Build Tool

* Introduction to Pants Build Tool

* Introduction to Pants Build Tool

* Introduction to Pants Build Tool

* Introduction to Pants Build Tool
This commit is contained in:
Michael Olayemi
2023-08-09 14:35:00 +00:00
committed by GitHub
parent 4945be2fd6
commit 4b99565de3
13 changed files with 183 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
java_sources(
dependencies=[
"src/resources/com/baeldung/hellopant:word",
],
)
deploy_jar(
name="HelloPant",
main="com.baeldung.hellopant",
dependencies=[
":hellopant",
],
)
@@ -0,0 +1,20 @@
package com.baeldung.hellopant;
import com.google.common.base.Charsets;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.google.common.io.Resources;
import java.io.IOException;
import java.util.List;
public class Hello {
public static void main(String[] args) throws IOException {
System.out.println("Hello World!");
final List<String> names = Lists.newArrayList("John", null, "Jane", "Adam", "Tom");
final String result = Joiner.on(",").skipNulls().join(names);
System.out.println(result);
}
}
@@ -0,0 +1 @@
resources(name = "word", sources=["word.txt"])
@@ -0,0 +1 @@
from Us