[':enioka_scan',
 ':enioka_scan_camera',
 'enioka_scan_mock',
 'enioka_scan_zebra_dw',
 'enioka_scan_athesi_spa43lte',
 'enioka_scan_athesi_rd50te',
 ':enioka_scan_bluebird',
 ':enioka_scan_generalscan',
 ':enioka_scan_honeywelloss_spp',
 ':enioka_scan_honeywelloss_integrated',
 ':enioka_scan_zebraoss',
 ':enioka_scan_postech',
 ':enioka_scan_proglove',
 ':demoscannerapp'].each({ include it })

// Projects with either local libs or inside a private Maven repository
gradle.ext.gpr = ext.find('gpr.user') ?: System.getenv("GH_DRIVER_REPOSITORY_USERNAME")
["Zebra", "Honeywell", "Koamtac", "M3", "Proglove"].each { sdkName ->
    def propertyName = "with" + sdkName
    def subprojectName = "enioka_scan_" + sdkName.toLowerCase()

    def path = subprojectName + "/libs"
    def files = file(path).list()
    if (files.any { it.endsWith(".jar") || it.endsWith(".aar") } || gradle.ext.gpr != null) {
        gradle.ext.setProperty(propertyName, true)
        include ":" + subprojectName
    } else {
        gradle.ext.setProperty(propertyName, false)
    }
}
