@groovy.transform.CompileStatic class CoreExtension extends Object
Project extension to use for all YSF project
| Modifiers | Name | Description |
|---|---|---|
static String |
DEFAULT_LICENSE_TYPE |
|
static String |
NAME |
|
static String |
SUBPATH_DEVELOPERS |
| Type | Name and description |
|---|---|
Provider<String> |
licenseType |
boolean |
multiProjectIndicates that this project is part of a multi-project build. |
Provider<String> |
projectCurrentYear |
Provider<String> |
projectInceptionYear |
boolean |
rootProjectIndicates that the current project is the root project. |
| Constructor and description |
|---|
CoreExtension
(Project project) |
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
static T |
addCoreExtension(String name, Class<T> aClass, Project project, Object[] params)Creates an extension on the core extension |
<T> |
static T |
findCoreExtension(Project project, Class<T> aClass)Finds an extension on the core extension |
|
static CoreExtension |
findExtension(Project project)Find this extension. |
|
Provider<java.util.List<Person>> |
getContributors()A list of contributors to the project from gradle/developers.yml. |
|
Provider<String> |
getLicenseType()The project license type. |
|
Provider<java.util.List<Person>> |
getMaintainers()A list of project maintainers from gradle/developers.yml. |
|
Provider<String> |
getProjectCurrentYear()The last year of the project. |
|
Provider<String> |
getProjectInceptionYear()Returns the first year of the project. |
|
Provider<String> |
getProjectYearRange()A formatted string showing the project years. |
|
void |
setLicenseType(Object type)Set a SPDX license type. |
|
void |
setProjectCurrentYear(Object year)Sets the current copyright year of the project. |
|
void |
setProjectInceptionYear(Object year)Sets the project inception year. |
|
void |
setSnapshotCheckProvider(Provider<Boolean> check)Allow a change to the provider of determines whether the project version is a SNAPSHOT. |
|
Provider<Boolean> |
snapshot()A provider for determining whether the project version is a SNAPSHOT. |
|
String |
versionOf(String versionRef)Finds a version in the version catalog. |
|
String |
versionOf(String catalog, String versionRef)Finds a version in the version catalog. |
Indicates that this project is part of a multi-project build.
true is this is a multi-project build.Indicates that the current project is the root project.
true if tis is the root project.Creates an extension on the core extension
name - Name of the extension.aClass - Type of the extension.project - Contextual projectparams - Params to pass to extension's constructor.Finds an extension on the core extension
project - Contextual projectaClass - The type of the extension to findFind this extension.
project - Contextual project A list of contributors to the project from gradle/developers.yml.
A list of project maintainers from gradle/developers.yml.
Returns the first year of the project.
A formatted string showing the project years.
Set a SPDX license type.
See https://spdx.org/licenses.
If this value is not set, the a gradle property projectLicenseType will be used.
If that is not available Apache 2.0 is assumed.
type - SPDX valueSets the current copyright year of the project.
If not set, it will take the current year.
year - Current year.Sets the project inception year.
If not set, it will look for a property called projectInceptionYear.
year - Inception year.Allow a change to the provider of determines whether the project version is a SNAPSHOT.
check - Provider that will return true is the project version is a snapshot.A provider for determining whether the project version is a SNAPSHOT.
true is the project is a snapshot.Finds a version in the version catalog.
versionRef - Version referenceFinds a version in the version catalog.
catalog - Catalog nameversionRef - Version referenceGroovy Documentation