Source

javafx-gradle / samples / Ensemble2 / build.gradle

Full commit
apply from: 'http://dl.bintray.com/content/shemnon/javafx-gradle/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'

    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 {
            id = 'b533f663-1efd-489f-b910-4c7ec20c7fd0'
        }

        macosx {
            id = 'net.java.openjdk.openjfx.Ensemble2'
            category = 'public.app-category.developer-tools'
        }
    }
}

cssToBin {
    enabled = false //7u21 has some font bugs in the BSS code
}

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