@Internal private Set<Report> getEnabledInputReports() { Set<NamedDomainObjectSet<? extends Report>> enabledReportSets = CollectionUtils.collect(aggregated, new Transformer<NamedDomainObjectSet<? extends Report>, Reporting<? extends ReportContainer<?>>>() { public NamedDomainObjectSet<? extends Report> transform(Reporting<? extends ReportContainer<?>> reporting) { return reporting.getReports().getEnabled(); } }); return new LinkedHashSet<Report>(CollectionUtils.flattenCollections(Report.class, enabledReportSets)); }
@Nullable @Internal private String getPathToOverview() { TextResource overview = getOverviewText(); if (overview!=null) { return overview.asFile().getAbsolutePath(); } return null; }
@Internal public AntGroovydoc getAntGroovydoc() { if (antGroovydoc == null) { IsolatedAntBuilder antBuilder = getServices().get(IsolatedAntBuilder.class); ClassPathRegistry classPathRegistry = getServices().get(ClassPathRegistry.class); antGroovydoc = new AntGroovydoc(antBuilder, classPathRegistry); } return antGroovydoc; }
/** * Gets the class directories that coverage will be reported for. All classes in these directories will be included in the report. * * @return class dirs to report coverage of */ @Internal public FileCollection getAllClassDirs() { FileCollection additionalDirs = getAdditionalClassDirs(); if (additionalDirs == null) { return classDirectories; } return classDirectories.plus(getAdditionalClassDirs()); }
/** * Returns the single signature generated by this task. * * @return The signature. * @throws IllegalStateException if there is not exactly one signature. */ @Internal public Signature getSingleSignature() { final DomainObjectSet<Signature> signatureSet = getSignatures(); if (signatureSet.size() == 0) { throw new IllegalStateException("Expected %s to contain exactly one signature, however, it contains no signatures."); } else if (signatureSet.size() == 1) { return signatureSet.iterator().next(); } else { throw new IllegalStateException("Expected %s to contain exactly one signature, however, it contains no " + String.valueOf(signatureSet.size()) + " signatures."); } }
@Internal private Set<String> getSourceRoots() { return getSourceRootsFiles().stream().map(it -> { try { return it.getCanonicalPath(); } catch (IOException e) { throw new UncheckedIOException(e); } }).collect(Collectors.toSet()); }
@Internal private List<File> getSourceRootsFiles() { // accessing the List<Object> field not the FileTree from getSource return source.stream() .filter(it -> it instanceof SourceDirectorySet) .flatMap(it -> ((SourceDirectorySet) it).getSrcDirs().stream()) .collect(Collectors.toList()); }
/** * Returns the archive name. If the name has not been explicitly set, the pattern for the name is: * <code>[baseName]-[appendix]-[version]-[classifier].[extension]</code> * * @return the archive name. */ @Internal("Represented as part of archivePath") public String getArchiveName() { if (customName != null) { return customName; } String name = GUtil.elvis(getBaseName(), "") + maybe(getBaseName(), getAppendix()); name += maybe(name, getVersion()); name += maybe(name, getClassifier()); name += GUtil.isTrue(getExtension()) ? "." + getExtension() : ""; return name; }
@Internal protected ZipCompressor getCompressor() { switch (entryCompression) { case DEFLATED: return new DefaultZipCompressor(allowZip64, ZipOutputStream.DEFLATED); case STORED: return new DefaultZipCompressor(allowZip64, ZipOutputStream.STORED); default: throw new IllegalArgumentException(String.format("Unknown Compression type %s", entryCompression)); } }
@Override @Internal Namer<T> getNamer();
/** * Returns the TCP port for Jetty to listen on for incoming HTTP requests. */ @Internal public Integer getHttpPort() { return httpPort; }
@Override @Internal SortedSet<String> getNames();
@Internal public List<Scanner.Listener> getScannerListeners() { return this.scannerListeners; }
/** * Returns the key to use to stop Jetty. */ @Internal public String getStopKey() { return stopKey; }
@Internal JavaVersion getTargetCompatibility();
@Internal public JettyPluginServer getServer() { return this.server; }
/** * The tool chain used for compilation. */ @Internal public NativeToolChain getToolChain() { return toolChain; }
@Internal private Compiler<TwirlCompileSpec> getCompiler() { ToolProvider toolProvider = ((PlayToolChainInternal) getToolChain()).select(platform); return toolProvider.newCompiler(TwirlCompileSpec.class); }
@Internal private Compiler<JavaScriptCompileSpec> getCompiler() { ToolProvider select = ((PlayToolChainInternal) getToolChain()).select(playPlatform); return select.newCompiler(JavaScriptCompileSpec.class); }
@Internal public Set<File> getExtraScanTargets() { return extraScanTargets; }
/** * The filename of a filter specifying which bugs are reported. */ @Internal public File getIncludeFilter() { TextResource config = getIncludeFilterConfig(); return config == null ? null : config.asFile(); }
/** * The filename of a filter specifying bugs to exclude from being reported. */ @Internal public File getExcludeFilter() { TextResource config = getExcludeFilterConfig(); return config == null ? null : config.asFile(); }
/** * Specifies whether the Jetty server should run in the background. When {@code true}, this task completes as soon as the server has started. When {@code false}, this task blocks until the Jetty * server is stopped. */ @Internal public boolean isDaemon() { return daemon; }
@Internal SingleFileReport getFirstEnabled();
/** * Returns the full path to the Windows script. The target directory is represented by the output directory, the file name is the application name plus the file extension .bat. */ @Internal public File getWindowsScript() { return new File(getOutputDir(), getApplicationName() + ".bat"); }
/** * The tool chain being used to build. */ @Internal public NativeToolChain getToolChain() { return toolChain; }
@Internal public List<File> getClassPathFiles() { return classPathFiles; }
@Internal public Transformer<String, File> getTransformer() { return RelativeFileNameTransformer.forFile(getProject().getRootDir(), visualStudioProject.getProjectFile().getLocation()); }
@Internal public VisualStudioProject getVisualStudioProject() { return visualStudioProject; }
/** * Returns the context path to use to deploy the web application. */ @Internal public String getContextPath() { return contextPath; }
@Internal protected MavenPublicationInternal getPublicationInternal() { return toPublicationInternal(getPublication()); }
@Internal public Connector[] getConnectors() { return connectors; }
@Internal public JettyPluginWebAppContext getWebAppConfig() { return webAppConfig; }
@Internal("Represented as part of args") public List<String> getScriptArgs() { return CollectionUtils.stringize(scriptArgs); }
@Internal public Compiler<GroovyJavaJointCompileSpec> getCompiler() { return getCompiler(createSpec()); }
/** * Returns the directory where Java stubs for Groovy classes will be stored during Java/Groovy joint * compilation. Defaults to {@code null}, in which case a temporary directory will be used. */ @Internal // TOOD:LPTR Should be just a relative path public File getStubDir() { return stubDir; }
@Internal ListenerBroadcast<TestListener> getTestListenerBroadcaster() { return testListenerBroadcaster; }
/** * Returns the extension part of the archive name. */ @Internal("Represented as part of archiveName") public String getExtension() { return extension; }
@Internal public TestFramework getTestFramework() { return testFramework(null); }