apply plugin: 'war'
//apply plugin: 'gaelyk'  // does not support latest app engine plugin
apply plugin: 'appengine'
//apply plugin: 'appengine-geb' // does not support latest app engine plugin

def compatibilityVersion = 1.8
sourceCompatibility = compatibilityVersion
targetCompatibility = compatibilityVersion

buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath 'com.google.appengine:gradle-appengine-plugin:1.9.59'
        //classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.7.0'
        classpath 'org.gradle.api.plugins:gradle-appengine-geb-plugin:0.4'
    }
}

repositories {
    mavenLocal()    
    mavenCentral()
    jcenter()
}

dependencies {
    def gaeVersion = '1.9.73'
    def groovyVersion = '2.4.17'

    compile "org.codehaus.groovy:groovy-all:${groovyVersion}"

    compile "com.google.appengine:appengine-api-1.0-sdk:$gaeVersion",
            "com.google.appengine:appengine-api-labs:$gaeVersion"

    compile 'org.sitemesh:sitemesh:3.0.1'

    //compile 'org.gaelyk:gaelyk:2.3.0-SNAPSHOT'
    compile project.files('gaelyk-info-0.1.jar')
    compile project.files('../core/build/libs/gaelyk-2.3.0-SNAPSHOT.jar')

    testCompile 'org.gaelyk:gaelyk-spock:0.4'
    testCompile "com.google.appengine:appengine-api-stubs:$gaeVersion",
            "com.google.appengine:appengine-testing:$gaeVersion"

    functionalTestCompile 'org.seleniumhq.selenium:selenium-firefox-driver:2.40.0'
    functionalTestCompile 'org.gebish:geb-spock:0.9.2'

    appengineSdk "com.google.appengine:appengine-java-sdk:$gaeVersion"


    /**
     * To add binary plugin just declare it as a dependency. For example,
     * uncomment following to add GPars support to your Gaelyk project.
     * @see https://github.com/musketyr/gpars-appengine
     */
    // compile 'org.codehaus.gpars:gpars-appengine:0.1'

    /**
     * Gaelyk console serves as playground or key-hole surgery tool for
     * your application
     * @see https://github.com/gaelyk/gaelyk-console-plugin
     */
     compile 'org.gaelyk:gaelyk-console:2.2.0', {
         exclude module: "gaelyk"
         exclude module: "appengine-testing"
         exclude module: "appengine-api-stubs"
     } 
}

appengine {
  downloadSdk = true
}

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