Source

javafx-gradle / samples / Ensemble8 / build.gradle

Full commit
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'
}

sourceSets {
    main {
        java {
            srcDir 'src/main/java'
            srcDir 'src/samples/java'
            srcDir 'build/generated'
        }
        resources {
            srcDir 'src/main/resources'
            srcDir 'src/samples/resources'
            srcDir 'build/generated'
        }
    }
}
javafx {
    mainClass = 'ensemble.EnsembleApp'

    icons {
        shortcut = [
                'icon-16.png', 'icon-16@2x.png',
                'icon-32.png', 'icon-32@2x.png',
                'icon-64.png',
                'icon-128.png', 'icon-128@2x.png',
                'icon-256.png',
        ]
        volume = shortcut
        setup = 'icon-32.png'
    }

    profiles {
        windows {
            appID = 'b533f663-1efd-489f-b910-4c7ec20c7fd0'
        }

        macosx {
            category = 'public.app-category.developer-tools'
        }
    }
}


// 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)
//


task generate() {
    doFirst {
        ensemble.compiletime.EnsembleCompiletimeMain.main(projectDir.toString(), 'samples', 'index')
    }
}