apply plugin: 'java'
apply plugin: 'antlr'
apply plugin: 'maven-publish'

group = 'com.sandbox'
version = System.getProperty('sandbox_version') == null ? "1.0" : System.getProperty('sandbox_version')

publishing {
    repositories {
        maven {
            url "https://storage.googleapis.com/sandbox-maven/maven2"
        }
    }

    publications {
        mavenJava(MavenPublication) {
            from components.java
        }
    }
}


sourceSets {
    main {
        java {
            srcDirs 'src/generated/java'
        }
    }
}

dependencies {
    antlr "org.antlr:antlr:3.4"
    compile group: 'org.antlr', name: 'antlr', version: '3.4'
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.3'
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.3'
    compile group: 'org.jsoup', name: 'jsoup', version: '1.8.3'
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

generateGrammarSource {
    outputDirectory = file("${projectDir}/src/generated/java")
}