-
- All Implemented Interfaces:
public class PackageJsonExtension
Provides a parsed view of package.json
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
PackageJsonExtension.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Property<JsonNode>
node
private final Provider<String>
name
private final Provider<String>
version
private final Provider<String>
description
private final Provider<String>
homepage
private final Provider<String>
license
private final Provider<Boolean>
private
-
Constructor Summary
Constructors Constructor Description PackageJsonExtension(Project project)
-
Method Summary
Modifier and Type Method Description final Property<JsonNode>
getNode()
Raw JsonNode returned by Jackson, this may be removed in a future release final Provider<String>
getName()
final Provider<String>
getVersion()
final Provider<String>
getDescription()
final Provider<String>
getHomepage()
final Provider<String>
getLicense()
final Provider<Boolean>
getPrivate()
final String
get(String name)
Get the text value of a given field final String
get(String name)
Get the text value of a field containing nested objectse.g. final Boolean
getBoolean(String name)
Get the boolean value of a given field -
-
Method Detail
-
getNode
final Property<JsonNode> getNode()
Raw JsonNode returned by Jackson, this may be removed in a future release
-
getVersion
final Provider<String> getVersion()
-
getDescription
final Provider<String> getDescription()
-
getHomepage
final Provider<String> getHomepage()
-
getLicense
final Provider<String> getLicense()
-
getPrivate
final Provider<Boolean> getPrivate()
-
get
final String get(String name)
Get the text value of a field containing nested objects
e.g. <pre>{ "outer": { "inner": "nested } }</pre>
-
getBoolean
final Boolean getBoolean(String name)
Get the boolean value of a given field
-
-
-
-