.sinch-sdk-java.1.3.1.source-code.SDKTemplate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class VersionTemplating {
static final String SDK_FILE_PATH = "client/src/main/com/sinch/sdk/SDK.java";
public static void main(String[] args) throws IOException {
String versionValue = args[0];
Stream lines = Files.lines(Paths.get(SDK_FILE_PATH));
String content = lines.collect(Collectors.joining("\n"));
lines.close();
System.out.println(
content.replaceAll("VERSION = \".*\"", String.format("VERSION = \"%s\"", versionValue)));
System.out.println("");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy