ProjectVersionFile class abstract
The version field of a project file: read it, and write a new one with the rest of the file as it was.
One per format that has a version: pubspec.yaml, package.json,
pyproject.toml, Cargo.toml, pom.xml, build.sbt. Go modules and
C / C++ make or CMake projects state no version in their project file.
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String text) → String? -
The version in
text, or null when the file states none. -
toString(
) → String -
A string representation of this object.
inherited
-
write(
String text, String version) → String -
textwith its version replaced byversion;textunchanged when it states none.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
String projectDir) → ProjectVersionFile? -
The version file of the project in
projectDir, by the first project file present in the order Dart, Node, Python, Rust, Java; null when it has none of them.