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

wooga / atlas-build-unity / 86
78%

Build:
DEFAULT BRANCH: master
Ran 02 Mar 2020 02:55PM UTC
Jobs 2
Files 19
Run time 1min
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

pending completion
86

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%)

1.24 hits per line

Jobs
ID Job ID Ran Files Coverage
1 86.1 02 Mar 2020 02:55PM UTC 0
80.07
2 86.2 02 Mar 2020 02:56PM UTC 0
44.03
Source Files on build 86
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #86
  • 91ed2fbb on github
  • Prev Build on master (#85)
  • Next Build on master (#88)
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