group 'com.example'

buildscript {
    repositories {
        if (System.getProperty("maven.local", "true") == "true") {
            mavenLocal()
        }
        maven { url 'https://asakusafw.s3.amazonaws.com/maven/releases' }
        maven { url 'https://asakusafw.s3.amazonaws.com/maven/snapshots' }
    }
    dependencies {
        classpath group: 'com.asakusafw', name: 'asakusa-gradle-plugins', version: System.getProperty("asakusafw.version")
    }
}

if (System.getProperty("maven.local", "true") == "true") {
    repositories {
        mavenLocal()
    }
}

apply plugin: 'asakusafw-sdk'
apply plugin: 'asakusafw-organizer'

asakusafwOrganizer {
    hadoop {
        embed !System.getenv("HADOOP_CMD")
    }
    profiles.dev {
        assembly.into('.') {
            from 'src/main/conf'
            process {
                filesMatching('**/*.sh') { it.setMode(0755) }
            }
        }
        assembly.into('batchapps/whadoop/lib') {
            from jar
        }
    }
}

jar {
    archiveName = 'jobflow-work.jar'
}
