build.gradle 1.76 KB
/* Plugins
---------------------------------*/
apply plugin: 'war'


/* Repositories
---------------------------------*/


/* Dependencies
---------------------------------*/
/*dependencies {

    compile 'org.jboss.resteasy:resteasy-jaxrs-all:3.1.3.Final'

    compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
    compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.1'

    compile "org.jboss.spec:jboss-javaee-7.0:1.1.0.Final",
            "org.json:json:20160810",
            "com.github.pengrad:java-telegram-bot-api:3.0.0",
            "com.mashape.unirest:unirest-java:1.4.9",
            "org.drools:drools-compiler:7.0.0.Final",
            "commons-cli:commons-cli:1.3.1",
            "org.jsoup:jsoup:1.10.2",
            "net.jodah:expiringmap:0.5.8"

    providedCompile "org.slf4j:slf4j-api:1.7.25",
                    "org.jboss.resteasy:resteasy-client:3.1.3.Final",
                    "org.infinispan:infinispan-core:8.2.4.Final"

    testCompile "org.jboss.arquillian.junit:arquillian-junit-container:1.1.13.Final",
                "junit:junit:4.12"

    testRuntime "org.wildfly.arquillian:wildfly-arquillian-container-remote:2.0.2.Final",
                "org.slf4j:slf4j-simple:1.7.25"
}*/


/* Configurations
---------------------------------*/



/* Tasks
---------------------------------*/
task wrapper(type: Wrapper) {
    gradleVersion = '3.5'
}


task chatbotRun(type: Exec, dependsOn: war) {
    workingDir 'docker'
    commandLine 'docker-compose', 'up', '--build'
}

task chatbotStop(type: Exec) {
    workingDir 'docker'
    commandLine 'docker-compose', 'down'
}

task cleanWar(type: Delete) {
    delete fileTree(dir: 'docker/wildfly/volumes/deployments/', include: '*.war')
}

tasks.war.dependsOn(cleanWar)