Source

deployer / deploy-runner / build.gradle

/*
 * Copyright 2000-2012 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.
 */



buildscript {
    repositories { mavenRepo url: 'http://evgenyg.artifactoryonline.com/evgenyg/repo/' }
    dependencies { classpath      'com.github.goldin.plugins:teamcity:0.1.4-SNAPSHOT'  }
}

ext.teamCityVersion = '7.0.4'
ext.pluginVersion = new Date().format("yyyyMMddHHmmss");



apply from: 'https://raw.github.com/evgeny-goldin/gradle-plugins/master/teamcity/teamcity.gradle'

allprojects {
    version = "0.1"
}

subprojects {
    apply plugin:'java'
    repositories {
        mavenRepo(name: "sonatype-public", urls: "https://oss.sonatype.org/content/groups/public/");
        mavenRepo(name: "daisycms", urls: "http://daisycms.org/maven/maven2/deploy/");
        mavenCentral()
    }

}


// 6 - Configuring the plugin.
assembleTeamcityPluginConfig {

    name        'artifactDeployer'
    displayName 'Artifact Deployer'
    description 'Plugin description'
    downloadUrl 'Plugin download URL'
    email       'Plugin author e-mail'
    vendorName  'Plugin vendor name'
    vendorUrl   'Plugin vendor URL'
    vendorLogo  'Plugin vendor logo URL'

    version     "snapshot-${pluginVersion}"

    server      project( ':deploy-runner-server' )
    agent       project( ':deploy-runner-agent'  )
    artifacts   project( ':deploy-runner-server' )
}

/**
 * Gradle subproject with agent-side sources of the plugin.
 */
project( ':deploy-runner-agent' ) {

    configurations {
        providedCompile
        compile { extendsFrom teamcityAgentEx }
        testCompile { extendsFrom teamcityTest }
    }

    dependencies {
        providedCompile 'org.apache.ant:ant:1.8.2',
                'log4j:log4j:1.2.12'

        compile project(":deploy-runner-common"),
                files("lib/ftp4j-1.7.2.jar"),
                'org.samba.jcifs:jcifs:1.3.17',
                'com.jcraft:jsch:0.1.47'
                compile("org.apache.tomcat:tomcat-catalina-ant:7.0.0") {
                    transitive = false
                }


        testCompile 'org.apache.sshd:apache-sshd:0.7.0',
                'org.apache.ftpserver:ftpserver-core:1.0.6',
                'org.testng:testng:6.8',
                'org.jmock:jmock:2.5.1'

    }

    sourceSets {
        main {
            compileClasspath += configurations.providedCompile
        }
    }

    test {
        useTestNG()
    }
}


/**
 * Gradle subproject with server-side sources of the plugin.
 */
project( ':deploy-runner-server' ) {
    configurations {
        compile { extendsFrom teamcityServer }
        testCompile { extendsFrom teamcityTest }
    }
    dependencies   {
        compile project(":deploy-runner-common")
    }
}

// 5 - Adding 'assembleTeamcityPlugin' task dependencies.
assembleTeamcityPlugin.dependsOn ':deploy-runner-server:jar', ':deploy-runner-agent:jar'

task wrapper(type: Wrapper) {
    gradleVersion = '1.0'
}

task copyToProduction(dependsOn: assembleTeamcityPlugin) << {
    final pluginsDir = "C:\\Job\\TeamCity\\Servers\\TeamCity_7.0.4\\.datadir\\plugins"
    final archive    = assembleTeamcityPlugin.archive

    copy { from archive; into pluginsDir }
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.