• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wooga / atlas-build-unity / 86 / 1
78%
master: 78%

Build:
DEFAULT BRANCH: master
Ran 02 Mar 2020 02:55PM UTC
Files 19
Run time 33s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Mar 2020 02:55PM UTC coverage: 80.072% (+0.2%) from 79.873%
86.1

push

jenkins

Refactor external build cache setup and configuration (#50)

* Refactor external build cache setup and configuration

Description
===========

Exporting and building an exported gradle project from unity will at the
moment move the `build` directory of all projects of the extported
project to a custom location. As an example:

_a project exported to `build/export/ios/project`_ will have its gradle
cache dir and build dir set to `build/export/ios/buildCache`.

This was achieved by loading a gradle init script from the current
project directory named `exportInit.gradle`. This script needed the
following content and was *not* part of this plugin:

```groovy
println "------------------------------------------------------------"
println "                        INIT                                "
println "------------------------------------------------------------"

projectsLoaded {
    def buildDirBase = rootProject.file(rootProject.properties.get("export.buildDirBase", rootProject.projectDir))

    allprojects(new Action<Project>() {
        @Override
        void execute(Project project) {
            def newBuildPath = new File(buildDirBase, "${project.path.replace(':','/')}/build")
            println("set buildDir for project ${project.name} to $newBuildPath")
            project.buildDir = newBuildPath
        }
    })
}
```

The main purpose of this script is to set the `buildDir` folder for all
projects of a gradle multiproject build. This all worked well but was
rather unintuitiv and the fact that the main part, the init script
itself, wasn't a part of the plugin, makes the setup difficult.

This patch changes the implementation and streamlines the process.
The `GradleBuild` task and the `UnityBuildPluginExtension` have some new
properties:

- `exportInitScript` / `initScript`
- `cleanBuildDirBeforeBuild`
- `exportBuildDirBase` / `buildDirBase`

There is no need for a custom `exportInit.gradle` i... (continued)

671 of 838 relevant lines covered (80.07%)

0.8 hits per line

Source Files on job 86.1
  • Tree
  • List 0
  • Changed 19
  • Source Changed 19
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 86
  • 91ed2fbb on github
  • Prev Job for on master (#85.1)
  • Next Job for on master (#88.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc