Child pages
  • Indore 10 EAP2 (build 41463) Release Notes

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
object Project : KProject({
    uuid = "my_project_id" // uuid should be some constant, never changing string; it is important for preserving history, new id means new entity with new history
    parentId = "_Root" // id of the parent project
    name = "Example of DSL"

    val vcsRoot = vcsRoot (KVcsRoot({
        uuid = "my_vcs_root_id" 
        extId = "ExampleOfDSL_VcsRoot"
        type = "jetbrains.git" // other available types: svn, perforce, tfs, mercurial, starteam, cvs, vault-vcs
        name = "Example of DSL VCS Root"
        param("url", "<url to my git repository>")
    }))

    buildType (KBuildType ({
        uuid = "my_build_type_id"
        extId = "ExampleOfDSL_Build"
        name = "Build"

        vcs {
             entry(vcsRoot) // thanks to Kotlin, here we can have static reference to project VCS root
        }

        steps {
             step {
                  type = "Maven2"
                  param("goals", "clean test")
             }
        }

        options {
             buildNumberPattern = "%build.counter%"
        }

        requirements {
             contains("teamcity.agent.jvm.os.name", "Linux")
        }
    }))
})
 

...