mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 00:07:12 -07:00
Add snapshot shorthand for version numbers in project
This commit is contained in:
parent
76186c78db
commit
e6be211d73
1 changed files with 37 additions and 0 deletions
|
@ -19,6 +19,7 @@ import java.util.*;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import static rife.bld.dependencies.Scope.runtime;
|
||||
import static rife.bld.dependencies.VersionNumber.SNAPSHOT_QUALIFIER;
|
||||
import static rife.tools.FileUtils.JAR_FILE_PATTERN;
|
||||
|
||||
/**
|
||||
|
@ -684,6 +685,42 @@ public class BaseProject extends BuildExecutor {
|
|||
return VersionNumber.parse(description);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new snapshot version instance.
|
||||
*
|
||||
* @param major the major component of the snapshot version number
|
||||
* @return a newly created snapshot {@code VersionNumber} instance
|
||||
* @since 1.7.4
|
||||
*/
|
||||
public VersionNumber snapshot(int major) {
|
||||
return new VersionNumber(major, null, null, SNAPSHOT_QUALIFIER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new snapshot version instance.
|
||||
*
|
||||
* @param major the major component of the snapshot version number
|
||||
* @param minor the minor component of the snapshot version number
|
||||
* @return a newly created snapshot {@code VersionNumber} instance
|
||||
* @since 1.7.4
|
||||
*/
|
||||
public VersionNumber snapshot(int major, int minor) {
|
||||
return new VersionNumber(major, minor, null, SNAPSHOT_QUALIFIER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new snapshot version instance.
|
||||
*
|
||||
* @param major the major component of the snapshot version number
|
||||
* @param minor the minor component of the snapshot version number
|
||||
* @param revision the revision component of the snapshot version number
|
||||
* @return a newly created snapshot {@code VersionNumber} instance
|
||||
* @since 1.7.4
|
||||
*/
|
||||
public VersionNumber snapshot(int major, int minor, int revision) {
|
||||
return new VersionNumber(major, minor, revision, SNAPSHOT_QUALIFIER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the dependency set for a particular scope, initializing it
|
||||
* if it doesn't exist yet.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue