Source

javafx-gradle / samples / Ensemble2 / build.gradle

apply from: 'https://repository-javafx-gradle-plugin.forge.cloudbees.com/snapshot/javafx.plugin'

repositories {
    mavenLocal()
    mavenCentral()
}

dependencies {
    compile 'org.apache.lucene:lucene-core:3.2.0'
    compile 'org.apache.lucene:lucene-grouping:3.2.0'
}

javafx {
    mainClass = 'ensemble.Ensemble2'
}


// App specific stuff, take the local sample sources in as resources and index them
task copySamples (type:Copy) {
    from('src/main/java') {
        include '**/samples/**/*.java'
    }
    into sourceSets.main.output.resourcesDir
}

task buildSearchIndex(type:JavaExec) {
    dependsOn copySamples
    main = 'ensemble.search.BuildEnsembleSearchIndex'
    classpath {
        sourceSets.main.runtimeClasspath
    }
    workingDir = sourceSets.main.output.resourcesDir
}

jar.dependsOn(buildSearchIndex)
run.dependsOn(buildSearchIndex)
debug.dependsOn(buildSearchIndex)