Package org.gradle.api.logging

Examples of org.gradle.api.logging.Logger


    long start = System.currentTimeMillis();
    //@todo provide gradle alternative.
    //if (context != null && !context.hasDelta(sourceDirectory)) return;

    Logger log = getLogger();
   
//    log.info("");
    log.info("CONFIGURATION");
    log.info(WeaverLog.LINE.replaceAll("\n", ""));
    log.info(WeaverLog.format("ideFriendlyPacking", ideFriendlyPacking));
    log.info(WeaverLog.format("enablePooledWeaving", enablePooledWeaving));
    log.info(WeaverLog.format("optimizeEntitySystems", optimizeEntitySystems));
    log.info(WeaverLog.format("outputDirectory",  classesDir));
    log.info(WeaverLog.LINE.replaceAll("\n", ""));
   
    Weaver.retainFieldsWhenPacking(ideFriendlyPacking);
    Weaver.enablePooledWeaving(enablePooledWeaving);
    Weaver.optimizeEntitySystems(optimizeEntitySystems);

    Weaver weaver = new Weaver(classesDir);
    WeaverLog processed = weaver.execute();
    for (String s : processed.getFormattedLog().split("\n")) {
      log.info(s);
    }
  }
View Full Code Here


        }
      }
    }

    private void setupInputOutputs(Jar jarTask, String classifier) {
      Logger logger = this.project.getLogger();
      logger.debug("Using classifier: " + classifier + " for task "
          + task.getName());
      File inputFile = jarTask.getArchivePath();
      String outputName = inputFile.getName();
      outputName = StringUtils.stripFilenameExtension(outputName) + "-"
          + classifier + "." + StringUtils.getFilenameExtension(outputName);
View Full Code Here

        }

        ComparableGradleBuildExecuter sourceBuildExecuter = new ComparableGradleBuildExecuter(sourceBuild);
        ComparableGradleBuildExecuter targetBuildExecuter = new ComparableGradleBuildExecuter(targetBuild);

        Logger logger = getLogger();
        ProgressLogger progressLogger = getProgressLoggerFactory().newOperation(getClass());
        progressLogger.setDescription("Gradle Build Comparison");
        progressLogger.setShortDescription(getName());

        GradleBuildComparison comparison = new GradleBuildComparison(
View Full Code Here

        JsHintResult result = rhinoHandle.process(spec);
        setDidWork(true);

        // TODO - this is all terribly lame. We need some proper reporting here (which means implementing Reporting).

        Logger logger = getLogger();
        boolean anyErrors = false;

        Map<String, Map<?, ?>> reportData = new LinkedHashMap<String, Map<?, ?>>(result.getResults().size());
        for (Map.Entry<File, Map<String, Object>> fileEntry: result.getResults().entrySet()) {
            File file = fileEntry.getKey();
            Map<String, Object> data = fileEntry.getValue();

            reportData.put(file.getAbsolutePath(), data);

            if (data.containsKey("errors")) {
                anyErrors = true;

                URI projectDirUri = getProject().getProjectDir().toURI();
                @SuppressWarnings("unchecked") Map<String, Object> errors = (Map<String, Object>) data.get("errors");
                if (!errors.isEmpty()) {
                    URI relativePath = projectDirUri.relativize(file.toURI());
                    logger.warn("JsHint errors for file: {}", relativePath.getPath());
                    for (Map.Entry<String, Object> errorEntry : errors.entrySet()) {
                        @SuppressWarnings("unchecked") Map<String, Object> error = (Map<String, Object>) errorEntry.getValue();
                        int line = Float.valueOf(error.get("line").toString()).intValue();
                        int character = Float.valueOf(error.get("character").toString()).intValue();
                        String reason = error.get("reason").toString();

                        logger.warn("  {}:{} > {}", new Object[] {line, character, reason});
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.gradle.api.logging.Logger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.