/** * Create a new task */ public EclipseAnnotationsTask() { this.jars = Collections.emptySet(); this.destinationDir = new File(getProject().getBuildDir(), "annotations"); }
/** * Create a new task */ public EclipseAnnotationsTask() { this.jars = Collections.emptySet(); this.destinationDir = new File(getProject().getBuildDir(), "annotations"); }
/** * Get the URLs for the classpath during annotation processing * * @return Classpath URLs */ @Input @Classpath protected Set<URL> getClasspathUrls() { Configuration compileConfiguration = getProject().getConfigurations() .getByName(EclipseConfigPlugin.ECLIPSE_ANNOTATIONS_CONFIGURATION); getLogger().info("Using classpath '{}'", compileConfiguration.getAsPath()); Set<URL> urls = compileConfiguration.getFiles().stream().map(f -> { try { return f.toURI().toURL(); } catch (MalformedURLException e) { throw new GradleException( String.format("Could not create classpath for annotations task %s.", getName()), e); } }).collect(Collectors.toSet()); return ImmutableSet.copyOf(urls); } }
/** * Get the URLs for the classpath during annotation processing * * @return Classpath URLs */ @Input @Classpath protected Set<URL> getClasspathUrls() { Configuration compileConfiguration = getProject().getConfigurations() .getByName(EclipseConfigPlugin.ECLIPSE_ANNOTATIONS_CONFIGURATION); getLogger().info("Using classpath '{}'", compileConfiguration.getAsPath()); Set<URL> urls = compileConfiguration.getFiles().stream().map(f -> { try { return f.toURI().toURL(); } catch (MalformedURLException e) { throw new GradleException( String.format("Could not create classpath for annotations task %s.", getName()), e); } }).collect(Collectors.toSet()); return ImmutableSet.copyOf(urls); } }