/* * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ def TeamCityVersion = "2017.2" def teamCityDir = project.getProperties()["path.variable.teamcitydistribution"] allprojects { apply plugin: 'java' } subprojects { repositories { maven { name = "sonatype-public" url = "https://oss.sonatype.org/content/groups/public/" } maven { name = "jetbrains-teamcity" url = "http://download.jetbrains.com/teamcity-repository" } mavenCentral() } dependencies { testCompile "org.jetbrains.teamcity:tests-support:$TeamCityVersion" } clean { delete "target" } } project (':gradle-runner-common') { dependencies { compile "org.jetbrains.teamcity:common-api:$TeamCityVersion" } } project (':gradle-runner-agent') { configurations { integTestClasspath { extendsFrom testRuntime } } dependencies { compile project(':gradle-runner-common') // integTestClasspath zipTree(teamCityDir + "/webapps/ROOT/update/buildAgent.zip").matching { // include 'lib/*.jar' // } compile zipTree(teamCityDir + "/webapps/ROOT/update/buildAgent.zip").matching { include 'lib/*.jar' } compile "org.jetbrains.teamcity:agent-api:$TeamCityVersion" compile "org.jetbrains.teamcity.internal:agent:$TeamCityVersion" } } project (':gradle-runner-server') { dependencies { compile project(':gradle-runner-common') compile "org.jetbrains.teamcity:server-api:$TeamCityVersion" } } def gradlePluginDist = new File(distsDir, 'gradle-runner') task initDistrDestinations << { def gradleServer = new File(gradlePluginDist, 'server') gradleServer.mkdirs() copy { from project(':gradle-runner-server').libsDir from project(':gradle-runner-common').libsDir into gradleServer } copy { from projectDir include 'teamcity-plugin.xml' into gradlePluginDist } } task zipAgent(type: Zip, dependsOn: ['initDistrDestinations', ':gradle-runner-agent:dist']) { from project(':gradle-runner-agent').distsDir include 'gradle-runner/**' archiveName ='gradle-runner.zip' destinationDir = new File(gradlePluginDist, 'agent') } task zipPlugin(type: Zip, dependsOn: ['initDistrDestinations', 'zipAgent']) { from gradlePluginDist archiveName = 'gradle-runner.zip' } task dist(dependsOn: [ 'zipPlugin' ]) { description = 'Create Gradle Runner plugin package for TeamCity' } task wrapper(type: Wrapper) { gradleVersion = '3.0' }