mirror of https://github.com/grpc/grpc-java.git
alts: Remove dependency on Apache commons lang
This commit is contained in:
parent
edfc0d4d02
commit
43d2e53a2a
|
|
@ -47,7 +47,6 @@ java_library(
|
|||
"@io_netty_netty_common//jar",
|
||||
"@io_netty_netty_handler//jar",
|
||||
"@io_netty_netty_transport//jar",
|
||||
"@org_apache_commons_commons_lang3//jar",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ dependencies {
|
|||
project(':grpc-grpclb'),
|
||||
project(':grpc-protobuf'),
|
||||
project(':grpc-stub'),
|
||||
libraries.lang,
|
||||
libraries.protobuf,
|
||||
libraries.conscrypt
|
||||
def nettyDependency = implementation project(':grpc-netty')
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ import java.io.IOException;
|
|||
import java.io.InputStreamReader;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
|
||||
/** Class for checking if the system is running on Google Cloud Platform (GCP). */
|
||||
final class CheckGcpEnvironment {
|
||||
|
|
@ -65,11 +65,12 @@ final class CheckGcpEnvironment {
|
|||
}
|
||||
|
||||
private static boolean isRunningOnGcp() {
|
||||
String osName = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
|
||||
try {
|
||||
if (SystemUtils.IS_OS_LINUX) {
|
||||
if (osName.startsWith("linux")) {
|
||||
// Checks GCE residency on Linux platform.
|
||||
return checkProductNameOnLinux(Files.newBufferedReader(Paths.get(DMI_PRODUCT_NAME), UTF_8));
|
||||
} else if (SystemUtils.IS_OS_WINDOWS) {
|
||||
} else if (osName.startsWith("windows")) {
|
||||
// Checks GCE residency on Windows platform.
|
||||
Process p =
|
||||
new ProcessBuilder()
|
||||
|
|
|
|||
|
|
@ -164,7 +164,6 @@ subprojects {
|
|||
protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}",
|
||||
protobuf_lite: "com.google.protobuf:protobuf-javalite:${protobufVersion}",
|
||||
protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}",
|
||||
lang: "org.apache.commons:commons-lang3:3.11",
|
||||
|
||||
netty: "io.netty:netty-codec-http2:[${nettyVersion}]",
|
||||
netty_epoll: "io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64",
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
|
|||
"io.opencensus:opencensus-contrib-grpc-metrics:0.24.0",
|
||||
"io.perfmark:perfmark-api:0.23.0",
|
||||
"junit:junit:4.12",
|
||||
"org.apache.commons:commons-lang3:3.11",
|
||||
"org.apache.tomcat:annotations-api:6.0.53",
|
||||
"org.codehaus.mojo:animal-sniffer-annotations:1.19",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue