gradle integration: how can I use %system.teamcity.buildType.id% in build.gradle

Hi,

We have a project that has gradle and is run by teamcity. Currently we are able to use thing like this:

    if (project.hasProperty("teamcity")) {
        ext.patch = teamcity['build.number']

    }

and now I need to use %system.teamcity.buildType.id% in build.gradle. How do I see this variable there?
Things I've tried with no success:

//        ext.buildId = teamcity['buildType.id']
//        ext.buildId = teamcity['system.teamcity.buildType.id']
//        ext.buildId = system.teamcity.buildType.id
//        ext.buildId = project.ext.system.teamcity.buildType.id


Gavriel
1 comment
Comment actions Permalink

Hello Gavriel,

      ext.buildId = teamcity['teamcity.buildType.id']

should work.

0

Please sign in to leave a comment.