class ReleasePlugin extends java.lang.Object
A Wooga internal plugin to develop and publish Unity library packages.
This plugin is very opinionated. It acts as an aggregation plugin which applies a series of helper plugins and
configures them according to the wooga sdk wdk
standard.
Example:
plugins {
id "net.wooga.release" version "0.15.1"
}
Type | Name and description |
---|---|
static java.lang.String |
ARCHIVES_CONFIGURATION |
static java.lang.String |
CLEAN_META_FILES_TASK |
static java.lang.String |
EXTENSION_NAME |
static java.lang.String |
GROUP |
static java.lang.String |
RC_TASK |
static java.lang.String |
SETUP_TASK |
static java.lang.String |
TEST_TASK |
static java.lang.String |
UNTIY_PACK_TASK |
static java.lang.String |
VERSION_SCHEME_DEFAULT |
static java.lang.String |
VERSION_SCHEME_SEMVER_1 |
static java.lang.String |
VERSION_SCHEME_SEMVER_2 |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
apply(org.gradle.api.Project project) |
|
protected static void |
applyNebularRelease(org.gradle.api.Project project) Applies and configures nebula.release plugins. |
|
protected static void |
applyRCtoCandidateAlias(org.gradle.api.Project project) The NebularRelease plugin will provide slightly better error messages when using the official
cli tasks (final, candidate, snapshot, ...). |
|
protected static void |
applyVisteg(org.gradle.api.Project project) Applies cz.malohlava.visteg |
|
protected static void |
applyWoogaPlugins(org.gradle.api.Project project) Applies Wooga plugins. |
|
protected static org.gradle.api.artifacts.Configuration |
configureArchiveConfiguration(org.gradle.api.Project project) Creates and Configures the projects archive configuration. |
|
protected static void |
configureDefaultMetaCleanPattern(AtlasReleasePluginExtension extension) Configures default clean pattern for the to be exported Unity nuget packages. |
|
protected static void |
configureGithubPublishTask(org.gradle.api.Project project) Sets project version to all PaketPack tasks.
|
|
protected static void |
configurePaketPackTasks(org.gradle.api.Project project) Configures all tasks of type wooga.gradle.paket.pack.tasks.PaketPack. |
|
protected static void |
configureUnityPackageIfPresent(org.gradle.api.Project project, AtlasReleasePluginExtension extension) Configures net.wooga.unity plugin on subprojects if available. |
|
protected static void |
configureVersionCode(org.gradle.api.Project project) Creates a versioncode string used by Android sub-projects. |
|
protected static void |
createUnityPackTask(org.gradle.api.Project project) Creates Unity Pack task. |
|
protected static void |
replaceReleaseTask(org.gradle.api.Project project, org.ajoberstar.gradle.git.release.base.ReleasePluginExtension extension) Replaces the release task from org.ajoberstar.gradle.git.release.base.BaseReleasePlugin. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Applies and configures nebula.release
plugins.
Nebular release is the base plugin which we borrow logic from. We take apply our own versioning strategy pattern to be compatible with Paket and Nuget.
The NebularRelease
plugin will provide slightly better error messages when using the official
cli tasks (final, candidate, snapshot, ...). Because of internal naming reasons it makes sense for us to use
rc
instead of candidate
. All other resources are named with the
pattern (final, rc and snapshot). I used a custom task with the name rc
which depends on
candidate
but this will fall through the error check in NebularRelease
. So instead we
now change the cli tasklist on the fly. If we find the rc
taskname in the cli tasklist we remove it
and add candidate
instead.
Applies cz.malohlava.visteg
Applies Wooga plugins.
Creates and Configures the projects archive
configuration.
Configures default clean pattern for the to be exported Unity nuget packages.
By default we need to keep the .meta
files for .dll
and .so
files.
This value can be reconfigured at a later time.
Sets project version to all PaketPack
tasks.
Version 0.8.0 changed the default behavior for picking the package version.
This is just a security measure.
Configures all tasks of type wooga.gradle.paket.pack.tasks.PaketPack.
It sets the paket version on each task because version 0.8.0 of net.wooga.paket-pack
changed the
default behavior for picking the package version.
Configures net.wooga.unity
plugin on subprojects if available.
Iterates through all sub-projects and looks for the net.wooga.unity
plugin.
When applied, sets a project dependency to the unitypackage
configuration and adds
a clean metadata task dependency to paketPack
.
Creates a versioncode string used by Android sub-projects.
Android applications or libraries need a version string and version code value. This method creates the versioncode based on the current version and sets it as an external property to all sub-projects.
The version will be splitted into Major
,Minor
and Patch
components
and multiplied by an offset value. Minor
and Patch
must be lower < 100 otherwise the versionCode
is no longer readable.
Example:
String version = "3.1.0"
Integer versionCode = 301000
String version = "1.24.33"
Integer versionCode = 12433
//version overflow
String version = "22.2245.455"
Integer versionCode = 444955
Creates Unity Pack task.
Creates a org.gradle.api.tasks.Copy task which will copy all .unitypackage
artifacts into the output directory.
Replaces the release
task from org.ajoberstar.gradle.git.release.base.BaseReleasePlugin.
On CI systems that check out the repo with a temp branch name could lead to unwanted side effects.