defaultTasks 'idea', 'cleanIdea'

allprojects {
    apply plugin: 'idea'
}

subprojects {
    apply plugin: 'java'

    ideaModule {
        downloadJavadoc = true
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        testCompile 'junit:junit:4.7'
    }

    group = 'org.gradle'
    version = '1.0'
}

cleanIdea.doLast {
    assert !file("${project.name}.iml").isFile()
    assert !file("${project.name}.ipr").isFile()
    assert !file("${project.name}.iws").isFile()
}
