{
  "name" : "qooxdoo framework configuration",

  "include" :
  [
    {
      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
    },

    {
      "path" : "image.json"
    }
  ],

  "export":
  [
    "api",
    "api-data",
    "api-verify",
    //"build-all",
    "dependencies",
    "clean",
    "clean-cache",
    "compile-framework-scss",
    "distclean",
    "fix",
    "images",
    "info",
    "lint",
    "lint-test",
    "provider",
    "pretty-test",
    "test",
    "test-inline",
    "test-source",
    "test-performance",
    "test-performance-source",
    "test-mobile",
    "test-mobile-compile-scss",
    "test-mobile-source",
    "translation",
    "validate-config",
    "validate-manifest",
    "watch-scss"
  ],


  "let" :
  {
    "APPLICATION"  : "qx",
    "QOOXDOO_PATH" : "..",
    "API_INCLUDE"    : ["q", "qxWeb", "qx.*"],
    "API_EXCLUDE"  : ["qx.test.*"],
    "TEST_INCLUDE" : "qx.test.*",
    "TEST_PERFORMANCE_INCLUDE" : "qx.test.performance.*",
    "LOCALES"      : [
       "cs",  // Czech
       "de",
       "en",
       "es",
       "fr",
       "it",
       "nl",
       "nb",  // Norwegian
       "pl",
       "pt",  // Portuguese
       "ro",
       "sl",  // Slovene
       "sv"   // Swedish
    ],
    "CACHE"        : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache"
  },

  "config-warnings" :
  {
    "job-shadowing" :
    [
      "api",
      "common",
      "dependencies",
      "lint",
      "provider-deps",
      "provider-classes",
      "test",
      "test-source",
      "test-inline",
      "test-mobile",
      "test-mobile-source",
      "testrunner::tests-common",
      "translation"
    ],
    "exclude" :
    [
      "qx.test.*"
    ]
  },

  "jobs":
  {

    "build-all" :
    {
      "library" :
      [
        {
          "manifest" : "Manifest.json"
        }
      ],

      "extend" : [ "cache" ],

      "include": ["qx.*"],
      "exclude": ["qx.test.*"],

      "environment" :
      {
        "qx.debug" : true,
        "qx.aspects" : false
      },

      "compile-options" :
      {
        "paths" :
        {
          "file"     : "build/script/qx.js",
          "app-root" : "./build"
        },
        "code"  :
        {
          "format"   : true,
          "except"   : [],
          "optimize" : ["basecalls", "variables", "privates", "strings", "whitespace"]
        }
      },

      "compile" : { "type" : "build" },

      "copy-resources" :
      {
        "target" : "build"
      }
    },

    // suppress addtl. lint checks when building with framework classes
    "no-compile-lint" : {
      "compile-options" : {
        "code" : {
          "lint-check" : false
        }
      }
    },


    // -- Test Jobs ------------------------------------------------------------

    // This one is used in all jobs relating to the generated AUT
    "testrunner::tests-common" :
    {
      "extend" : [ "no-compile-lint" ],
      "environment" :
      {
        "qx.test.bool_true" : true,
        "qx.test.bool_false" : false
      }
    },

    "test" :
    {
      "extend" : [ "no-compile-lint" ],
      "config-warnings" : {
        "environment" : ["non-literal-keys"]
      },
      "run" : ["test-copy-files"],

      "let" :
      {
        "LOCALES" : ["de", "de_DE", "en", "en_GB", "en_US"],
        "TEST_EXCLUDE" : "${TEST_PERFORMANCE_INCLUDE}"
      }
    },

    "test-inline" :
    {
      "run" : ["test-copy-files"],

      "let" :
      {
        "LOCALES" : ["de", "de_DE", "en", "en_GB", "en_US"],
        "TEST_EXCLUDE" : "${TEST_PERFORMANCE_INCLUDE}"
      }
    },

    "test-copy-files" :
    {
      "extend" : [ "cache" ],

      "copy-files" :
      {
        "files"    : [ "test" ],
        "source"   : "source/resource/qx",
        "target"   : "test/resource/qx"
      }
    },


    "test-source" :
    {
      "extend" : [ "no-compile-lint" ],
      "let" :
      {
        "LOCALES" : ["de", "de_DE", "en", "en_GB", "en_US"],
        "TEST_EXCLUDE" : "${TEST_PERFORMANCE_INCLUDE}",
        "TEST_INCLUDE" : "qx.*"
      }
    },

    "test-performance" :
    {
      "desc" : "Create a Performance Test Runner for the qx.test.performance namespace",

      "extend" : ["testrunner::build"],

      "let" :
      {
        "TESTRUNNER_ROOT" : "${QOOXDOO_PATH}/component/testrunner",
        "TEST_INCLUDE"    : "${TEST_PERFORMANCE_INCLUDE}",
        "TEST_EXCLUDE"    : "",
        "BUILD_PATH"      : "${ROOT}/test-performance"
      }
    },

    "test-performance-source" :
    {
      "desc" : "Create a Performance Test Runner for the qx.test.performance namespace",

      "extend" : ["testrunner::build-with-tests-source"],

      "let" :
      {
        "TESTRUNNER_ROOT" : "${QOOXDOO_PATH}/component/testrunner",
        "TEST_INCLUDE"    : "${TEST_PERFORMANCE_INCLUDE}",
        "TEST_EXCLUDE"    : "",
        "BUILD_PATH"      : "${ROOT}/test-performance"
      }
    },

    "test-mobile-compile-scss" :
    {
      "desc"   : "Compile the theme scss once",
      "extend" : ["cache"],
      "let" :
      {
        "QX_MOBILE_THEME_PATH" : "${QOOXDOO_PATH}/framework/source/resource/qx/mobile/scss",
        "QX_SHARED_THEME_PATH" : "${QOOXDOO_PATH}/framework/source/resource/qx/scss",
        "MOBILE_RESOURCE_PATH" : "${QOOXDOO_PATH}/component/testrunner/source/resource/testrunner/view/mobile"
      },
      "shell" :
      {
        "command" : "sass -C -t compressed -I ${QX_MOBILE_THEME_PATH} -I ${QX_SHARED_THEME_PATH} --update ${MOBILE_RESOURCE_PATH}/scss:${MOBILE_RESOURCE_PATH}/css",
        "command-not-found" : "It seems that Sass (http://sass-lang.com/) is not installed and/or executable, which is needed for the SCSS-compilation."
      }
    },

    "test-mobile" :
    {
      "let" :
      {
        "TEST_INCLUDE"    : "qx.test.mobile.*",
        "BUILD_PATH"      : "${ROOT}/test-mobile"
      },

      "run" : [
        "test-mobile-compile-scss"
      ]
    },

    "test-mobile-source" :
    {
      "let" :
      {
        "TEST_INCLUDE"    : "qx.test.mobile.*",
        "BUILD_PATH"      : "${ROOT}/test-mobile"
      }
    },

    "provider-classes" :
    {
      "provider" :
      {
        "include" : [ "q", "qxWeb" ]
      }
    },

    "provider-deps" :
    {
      "include" : [ "q", "qxWeb" ]
    },

    "images" :
    {
      "desc" : "clip and combine all images used in the framework",
      "run" : [ "image-clipping", "image-combine" ]
    },

    "lint" :
    {
      "exclude": ["qx.test.*"]
    },

    "lint-test" :
    {
      "include": ["=qx.test.*"]
    },

    "translation" :
    {
      "=include": ["qx.*"],
      "translate" : { "poentry-with-occurrences" : false  }
    },

    "api" :
    {
      "extend" : [ "no-compile-lint" ],
      "config-warnings" :
      {
        "environment" : [ "non-literal-keys" ]
      }
    },

    "api-verify" :
    {
      "desc" : "creates an Apiviewer while checking internal links. Also creates an XML sitemap with a link for each class",
      "extend" : [ "api" ],
      "api" : {
        "verify" : [ "links", "types", "statistics" ],
        "sitemap" :
        {
          "link-uri" : "http://api.qooxdoo.org/#%s",
          "file" : "api/sitemap.xml"
        }
      }
    },

    "watch-scss" :
    {
      "desc": "Watch and compile the theme scss",
      "extend": ["cache"],
      "let": {
        "QX_MOBILE_THEME_PATH": "source/resource/qx/mobile",
        "QX_SHARED_THEME_PATH": "source/resource/qx/scss"
      },
      "shell": {
        "command": "sass -C -t compressed -I ${QX_MOBILE_THEME_PATH}/scss -I ${QX_SHARED_THEME_PATH} --watch ${QX_MOBILE_THEME_PATH}/scss:${QX_MOBILE_THEME_PATH}/css"
      }
    },

    "pretty-test" :
    {
      "desc" : "This is just to test pretty-printing - don't commit after running.",
      "extend" : ["pretty"]
    },

    "dependencies" :
    {
      "=exclude" : [ "${APPLICATION}.test.*" ]
    }
  }
}
