Java Code Examples for org.gradle.api.file.FileCollection#isEmpty()
The following examples show how to use
org.gradle.api.file.FileCollection#isEmpty() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CompositeFileCollection.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public boolean isEmpty() { for (FileCollection collection : getSourceCollections()) { if (!collection.isEmpty()) { return false; } } return true; }
Example 2
Source File: GenerateAvroSchemaTask.java From gradle-avro-plugin with Apache License 2.0 | 5 votes |
private void failOnUnsupportedFiles() { FileCollection unsupportedFiles = filterSources(new NotSpec<>(new FileExtensionSpec(PROTOCOL_EXTENSION))); if (!unsupportedFiles.isEmpty()) { throw new GradleException( String.format("Unsupported file extension for the following files: %s", unsupportedFiles)); } }
Example 3
Source File: GenerateAvroProtocolTask.java From gradle-avro-plugin with Apache License 2.0 | 5 votes |
private void failOnUnsupportedFiles() { FileCollection unsupportedFiles = filterSources(new NotSpec<>(new FileExtensionSpec(IDL_EXTENSION))); if (!unsupportedFiles.isEmpty()) { throw new GradleException( String.format("Unsupported file extension for the following files: %s", unsupportedFiles)); } }
Example 4
Source File: GenerateAvroJavaTask.java From gradle-avro-plugin with Apache License 2.0 | 5 votes |
private void failOnUnsupportedFiles() { FileCollection unsupportedFiles = filterSources(new NotSpec<>(new FileExtensionSpec(SUPPORTED_EXTENSIONS))); if (!unsupportedFiles.isEmpty()) { throw new GradleException( String.format("Unsupported file extension for the following files: %s", unsupportedFiles)); } }
Example 5
Source File: ResolveAvroDependenciesTask.java From gradle-avro-plugin with Apache License 2.0 | 5 votes |
private void failOnUnsupportedFiles() { FileCollection unsupportedFiles = filterSources(new NotSpec<>(new FileExtensionSpec(SCHEMA_EXTENSION))); if (!unsupportedFiles.isEmpty()) { throw new GradleException( String.format("Unsupported file extension for the following files: %s", unsupportedFiles)); } }
Example 6
Source File: JvmOptions.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
/** * @return the list of jvm args we manage explicitly, for example, max heaps size or file encoding. * The result is a subset of options returned by {@link #getAllImmutableJvmArgs()} */ public List<String> getManagedJvmArgs() { List<String> args = new ArrayList<String>(); if (minHeapSize != null) { args.add(String.format("-Xms%s", minHeapSize)); } if (maxHeapSize != null) { args.add(String.format("-Xmx%s", maxHeapSize)); } FileCollection bootstrapClasspath = getBootstrapClasspath(); if (!bootstrapClasspath.isEmpty()) { args.add(String.format("-Xbootclasspath:%s", bootstrapClasspath.getAsPath())); } // These are implemented as a system property, but don't really function like one // So we include it in this “no system property” set. formatSystemProperties(immutableSystemProperties, args); if (assertionsEnabled) { args.add("-ea"); } if (debug) { args.add("-Xdebug"); args.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"); } return args; }
Example 7
Source File: CompositeFileCollection.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public boolean isEmpty() { for (FileCollection collection : getSourceCollections()) { if (!collection.isEmpty()) { return false; } } return true; }
Example 8
Source File: JvmOptions.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
/** * @return the list of jvm args we manage explicitly, for example, max heaps size or file encoding. * The result is a subset of options returned by {@link #getAllImmutableJvmArgs()} */ public List<String> getManagedJvmArgs() { List<String> args = new ArrayList<String>(); if (minHeapSize != null) { args.add(String.format("-Xms%s", minHeapSize)); } if (maxHeapSize != null) { args.add(String.format("-Xmx%s", maxHeapSize)); } FileCollection bootstrapClasspath = getBootstrapClasspath(); if (!bootstrapClasspath.isEmpty()) { args.add(String.format("-Xbootclasspath:%s", bootstrapClasspath.getAsPath())); } // These are implemented as a system property, but don't really function like one // So we include it in this “no system property” set. formatSystemProperties(immutableSystemProperties, args); if (assertionsEnabled) { args.add("-ea"); } if (debug) { args.add("-Xdebug"); args.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"); } return args; }
Example 9
Source File: JvmOptions.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * @return the list of jvm args we manage explicitly, for example, max heaps size or file encoding. * The result is a subset of options returned by {@link #getAllImmutableJvmArgs()} */ public List<String> getManagedJvmArgs() { List<String> args = new ArrayList<String>(); if (minHeapSize != null) { args.add(String.format("-Xms%s", minHeapSize)); } if (maxHeapSize != null) { args.add(String.format("-Xmx%s", maxHeapSize)); } FileCollection bootstrapClasspath = getBootstrapClasspath(); if (!bootstrapClasspath.isEmpty()) { args.add(String.format("-Xbootclasspath:%s", bootstrapClasspath.getAsPath())); } // These are implemented as a system property, but don't really function like one // So we include it in this “no system property” set. formatSystemProperties(immutableSystemProperties, args); if (assertionsEnabled) { args.add("-ea"); } if (debug) { args.add("-Xdebug"); args.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"); } return args; }
Example 10
Source File: CompositeFileCollection.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public boolean isEmpty() { for (FileCollection collection : getSourceCollections()) { if (!collection.isEmpty()) { return false; } } return true; }
Example 11
Source File: JvmOptions.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * @return the list of jvm args we manage explicitly, for example, max heaps size or file encoding. * The result is a subset of options returned by {@link #getAllImmutableJvmArgs()} */ public List<String> getManagedJvmArgs() { List<String> args = new ArrayList<String>(); if (minHeapSize != null) { args.add(String.format("-Xms%s", minHeapSize)); } if (maxHeapSize != null) { args.add(String.format("-Xmx%s", maxHeapSize)); } FileCollection bootstrapClasspath = getBootstrapClasspath(); if (!bootstrapClasspath.isEmpty()) { args.add(String.format("-Xbootclasspath:%s", bootstrapClasspath.getAsPath())); } // These are implemented as a system property, but don't really function like one // So we include it in this “no system property” set. formatSystemProperties(immutableSystemProperties, args); if (assertionsEnabled) { args.add("-ea"); } if (debug) { args.add("-Xdebug"); args.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"); } return args; }
Example 12
Source File: CompositeFileCollection.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public boolean isEmpty() { for (FileCollection collection : getSourceCollections()) { if (!collection.isEmpty()) { return false; } } return true; }
Example 13
Source File: FindBugsSpecBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public FindBugsSpecBuilder(FileCollection classes) { if(classes == null || classes.isEmpty()){ throw new InvalidUserDataException("No classes configured for FindBugs analysis."); } this.classes = classes; }
Example 14
Source File: FindBugsSpecBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
private boolean has(FileCollection fileCollection) { return fileCollection != null && !fileCollection.isEmpty(); }
Example 15
Source File: FindBugsSpecBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public FindBugsSpecBuilder(FileCollection classes) { if(classes == null || classes.isEmpty()){ throw new InvalidUserDataException("No classes configured for FindBugs analysis."); } this.classes = classes; }
Example 16
Source File: FindBugsSpecBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public FindBugsSpecBuilder(FileCollection classes) { if(classes == null || classes.isEmpty()){ throw new InvalidUserDataException("No classes configured for FindBugs analysis."); } this.classes = classes; }
Example 17
Source File: FindBugsSpecBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
private boolean has(FileCollection fileCollection) { return fileCollection != null && !fileCollection.isEmpty(); }
Example 18
Source File: FindBugsSpecBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
private boolean has(FileCollection fileCollection) { return fileCollection != null && !fileCollection.isEmpty(); }
Example 19
Source File: FindBugsSpecBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public FindBugsSpecBuilder(FileCollection classes) { if(classes == null || classes.isEmpty()){ throw new InvalidUserDataException("No classes configured for FindBugs analysis."); } this.classes = classes; }
Example 20
Source File: FindBugsSpecBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
private boolean has(FileCollection fileCollection) { return fileCollection != null && !fileCollection.isEmpty(); }