wooga / atlas-build-unity

a gradle companion plugin for the wooga internal unity build system
Apache License 2.0
2 stars 2 forks source link

Improve property mapping for net.wooga.build-unity-ios #176

Closed Larusso closed 2 years ago

Larusso commented 2 years ago

Description

This patch includes three kind of related changes.

  1. use new ExecSpec for PodInstall task
  2. bind cocoapods executable name / path to extension
  3. bind extension properties to conventions (env, property)

Pod Install

The cocoapods task used a utility class to find the nearest pod executable in the PATH. This system works but is not future proof. We are in the works to provide a way to lazy install the tool during a build and need an internal property to set the executable name / path. We developed the ExecSpec class which we also already used in the net.wooga.fastlane plugin for the same reason.

Bind to extension

To make this new value easily setable, also in case we create more cocoapod task types, I added a new nested object inside the IOSBuildPluginExtension called 'cocoapodswhich interally is also just anExecSpec` to set the values for executable name and path etc.

iosBuild {
    cocoapods {
        executableDirectory = file("/yada/yada/yada")
    executableName = "pod"
    }
}

Bind to conventions

Most of our plugins provide a way to fetch default / convention values from the gradle properties / system environment. We never did this for the net.wooga.build-unity-ios plugin. I decided to implement this now before we split and release this plugin.

Changes