This plugin automates the upload of applications to Update Factory server. uf-apk-delivery-example is an example project that uses this plugin.
To use the plugin:
Push Apk delivery plugin
into your maven local repository with the following command:
./gradlew clean build publishToMavenLocal
Update your settings.gradle and build.gradle to use Apk delivery plugin
into your android project:
Add these lines to the top of your settings.gradle file:
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
jcenter()
google()
}
}
Import Apk delivery plugin
inside your android project:
buildscript {
...
repositories {
...
mavenLocal()
}
...
}
plugins{
id 'com.kynetics.updatefactory.plugin.ufapkdelivery' version("1.0.1")
}
...
ufApkDelivery {
tenant = 'tenant'
username = 'username'
password = 'password'
vendor = 'kynetics'
version = '3'
buildType = "release"
productFlavor = "full"
ignoreProjects = ["project-name"]
deliveryType = "SINGLE_SOFTWARE_MODULE"
thirdLevelDomain = "mgmt.business"
softwareModuleName = "software-module-name"
}
Replace the ufApkDelivery
data with your applications and Update Factory access information.
It is possible to specify different buildType
, productFlavor
, softwareModuleType
or distributionType
for different modules of the same project. To do that, add the following lines to the module specific build.gradle
:
...
ufApkDelivery {
softwareModuleType = "application"
distributionType = "app"
buildType = "release"
productFlavor = "full"
}
These values, if present, are used instead on the generic values of the root build.gradle
.
When the plugin is correctly imported, the group update factory
appears under the main project (root) of gradle tasks window.
The following tasks are available:
- deliveryApk, uploads the project in the Update Factory server;
- getDistributionTypes, shows all the distribution types supported by the tenant;
- getSoftwareModuleTypes, shows all the software module types supported by the tenant;
- showSubProjects, show a list of all sub projects. To ignore a module adds its name to ignoreProjects field.
The extension values of Apk delivery plugin
is contained in an object called ufApkDelivery
.
Field | Description | Mandatory | Default | Allowed value |
---|---|---|---|---|
tenant | The Update Factory tenant | ✔️ | - | |
username | The username to login into Update Factory tenant | ✔️ | - | |
password | The password to login into Update Factory tenant. | ✔️ | - | |
thirdLevelDomain | Third level domain value depends on your subscription type | ✖️ | mgmt.business |
|
softwareModuleType | The type of software module that will be created | ✖️ | application |
Use getSoftwareModuleTypes task to view allowed values |
distributionType | The type of distribution that will be created | ✖️ | app |
Use getDistributionTypes task to view allowed values |
vendor | The vendor of software module | ✖️ | "" | |
buildType | The build type of the project to upload | ✖️ | release |
All project build types |
productFlavor | The build type of the project to upload | ✖️ | "" | The productFlavor of software module to upload (if exist) |
deliveryType | Define what resources are created in the Update Factory | ✖️ | MULTIPLE_SOFTWARE_MODULE |
|
version | The distribution version. This option is ignored if the delivery type is MULTIPLE_DISTRIBUTION |
✔️ | - | |
ignoreProjects | List of all modules that mustn't be upload to Update Factory. | ✖️ | Empty list | |
softwareModuleName | The name of the software module and the distribution that will be created. If the delivery type is other than SINGLE_SOFTWARE_MODULE , the module name will added as a suffix to this value |
✖️ |
|
These are the most common errors message.
This error happens when the plugin tries to create some software modules or distributions that already exist.
It can occur even if the entity isn't visible by the ui. This can happen when an entity is deleted from Update Factory, as Update Factory sometimes retains metadata.
Change the version of your gradle module or the version field.
The distribution type doesn't support the software module type.
Change your distribution type or your software module type.
The distribution type doesn't exist.
Set the distributionType field with one value returned by the getSoftwareModuleTypes
task.
The software module type doesn't exist.
Set the softwareModuleType field with one value returned by the getDistributionTypes
task.
Wrong credentials
Check the username
and password
fields.
Copyright (c) 2024, Kynetics, Inc..
Released under the EPLv2.0 License.