public class GradleProjectType extends Object
Constructor and Description |
---|
GradleProjectType() |
Modifier and Type | Method and Description |
---|---|
boolean |
check(File directory) |
boolean |
createNewUpdateFile(String buildPath,
String buildTempPath,
com.github.zafarkhaja.semver.Version nextVersion,
boolean isIndented,
String[] matchingWords)
Write an updated temporary file with next version
then replace the project config file with it.
|
com.github.zafarkhaja.semver.Version |
getCurrentVersion(File directory,
ProcessHelper processHelper) |
void |
writeVersion(File directory,
com.github.zafarkhaja.semver.Version nextVersion,
ProcessHelper processHelper)
Write the new calculated version in the build.gradle file.
|
public boolean check(File directory)
public com.github.zafarkhaja.semver.Version getCurrentVersion(File directory, ProcessHelper processHelper) throws IOException, InterruptedException
IOException
InterruptedException
public void writeVersion(File directory, com.github.zafarkhaja.semver.Version nextVersion, ProcessHelper processHelper) throws IOException, InterruptedException
directory
- The directory where find the build.gradle. MandatorynextVersion
- The next version to write. MandatoryprocessHelper
- Not used.IOException
- If an error occurs when accessing to the build.gradleInterruptedException
- Not used.public boolean createNewUpdateFile(String buildPath, String buildTempPath, com.github.zafarkhaja.semver.Version nextVersion, boolean isIndented, String[] matchingWords) throws IOException
buildPath
- Path of the file updatedbuildTempPath
- Path of a temporary file to replace buildPathnextVersion
- Version to update config fileisIndented
- Can the config file have indentationmatchingWords
- Tab of word to match the versionIOException
- If errors occurs when write the fileCopyright © 2016–2022. All rights reserved.