Java Code Examples for org.gradle.api.tasks.compile.CompileOptions#isVerbose()
The following examples show how to use
org.gradle.api.tasks.compile.CompileOptions#isVerbose() .
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: MinimalJavaCompileOptions.java From javaide with GNU General Public License v3.0 | 6 votes |
public MinimalJavaCompileOptions(final CompileOptions compileOptions) { FileCollection sourcepath = compileOptions.getSourcepath(); this.sourcepath = sourcepath == null ? null : ImmutableList.copyOf(sourcepath.getFiles()); this.compilerArgs = Lists.newArrayList(compileOptions.getAllCompilerArgs()); this.encoding = compileOptions.getEncoding(); this.bootClasspath = DeprecationLogger.whileDisabled(new Factory<String>() { @Nullable @Override @SuppressWarnings("deprecation") public String create() { return compileOptions.getBootClasspath(); } }); this.extensionDirs = compileOptions.getExtensionDirs(); this.forkOptions = compileOptions.getForkOptions(); this.debugOptions = compileOptions.getDebugOptions(); this.debug = compileOptions.isDebug(); this.deprecation = compileOptions.isDeprecation(); this.failOnError = compileOptions.isFailOnError(); this.listFiles = compileOptions.isListFiles(); this.verbose = compileOptions.isVerbose(); this.warnings = compileOptions.isWarnings(); this.annotationProcessorGeneratedSourcesDirectory = compileOptions.getAnnotationProcessorGeneratedSourcesDirectory(); }
Example 2
Source File: JavaCompilerArgumentsBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
private void addMainOptions() { if (!includeMainOptions) { return; } String sourceCompatibility = spec.getSourceCompatibility(); if (sourceCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(sourceCompatibility))) { args.add("-source"); args.add(sourceCompatibility); } String targetCompatibility = spec.getTargetCompatibility(); if (targetCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(targetCompatibility))) { args.add("-target"); args.add(targetCompatibility); } File destinationDir = spec.getDestinationDir(); if (destinationDir != null) { args.add("-d"); args.add(destinationDir.getPath()); } CompileOptions compileOptions = spec.getCompileOptions(); if (compileOptions.isVerbose()) { args.add("-verbose"); } if (compileOptions.isDeprecation()) { args.add("-deprecation"); } if (!compileOptions.isWarnings()) { args.add("-nowarn"); } if (compileOptions.isDebug()) { if (compileOptions.getDebugOptions().getDebugLevel() != null) { args.add("-g:" + compileOptions.getDebugOptions().getDebugLevel().trim()); } else { args.add("-g"); } } else { args.add("-g:none"); } if (compileOptions.getEncoding() != null) { args.add("-encoding"); args.add(compileOptions.getEncoding()); } if (compileOptions.getBootClasspath() != null) { //TODO: move bootclasspath to platform args.add("-bootclasspath"); args.add(compileOptions.getBootClasspath()); } if (compileOptions.getExtensionDirs() != null) { args.add("-extdirs"); args.add(compileOptions.getExtensionDirs()); } if (compileOptions.getCompilerArgs() != null) { args.addAll(compileOptions.getCompilerArgs()); } }
Example 3
Source File: JavaCompilerArgumentsBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
private void addMainOptions() { if (!includeMainOptions) { return; } String sourceCompatibility = spec.getSourceCompatibility(); if (sourceCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(sourceCompatibility))) { args.add("-source"); args.add(sourceCompatibility); } String targetCompatibility = spec.getTargetCompatibility(); if (targetCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(targetCompatibility))) { args.add("-target"); args.add(targetCompatibility); } File destinationDir = spec.getDestinationDir(); if (destinationDir != null) { args.add("-d"); args.add(destinationDir.getPath()); } CompileOptions compileOptions = spec.getCompileOptions(); if (compileOptions.isVerbose()) { args.add("-verbose"); } if (compileOptions.isDeprecation()) { args.add("-deprecation"); } if (!compileOptions.isWarnings()) { args.add("-nowarn"); } if (compileOptions.isDebug()) { if (compileOptions.getDebugOptions().getDebugLevel() != null) { args.add("-g:" + compileOptions.getDebugOptions().getDebugLevel().trim()); } else { args.add("-g"); } } else { args.add("-g:none"); } if (compileOptions.getEncoding() != null) { args.add("-encoding"); args.add(compileOptions.getEncoding()); } if (compileOptions.getBootClasspath() != null) { args.add("-bootclasspath"); args.add(compileOptions.getBootClasspath()); } if (compileOptions.getExtensionDirs() != null) { args.add("-extdirs"); args.add(compileOptions.getExtensionDirs()); } if (compileOptions.getCompilerArgs() != null) { args.addAll(compileOptions.getCompilerArgs()); } }
Example 4
Source File: JavaCompilerArgumentsBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
private void addMainOptions() { if (!includeMainOptions) { return; } String sourceCompatibility = spec.getSourceCompatibility(); if (sourceCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(sourceCompatibility))) { args.add("-source"); args.add(sourceCompatibility); } String targetCompatibility = spec.getTargetCompatibility(); if (targetCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(targetCompatibility))) { args.add("-target"); args.add(targetCompatibility); } File destinationDir = spec.getDestinationDir(); if (destinationDir != null) { args.add("-d"); args.add(destinationDir.getPath()); } CompileOptions compileOptions = spec.getCompileOptions(); if (compileOptions.isVerbose()) { args.add("-verbose"); } if (compileOptions.isDeprecation()) { args.add("-deprecation"); } if (!compileOptions.isWarnings()) { args.add("-nowarn"); } if (compileOptions.isDebug()) { if (compileOptions.getDebugOptions().getDebugLevel() != null) { args.add("-g:" + compileOptions.getDebugOptions().getDebugLevel().trim()); } else { args.add("-g"); } } else { args.add("-g:none"); } if (compileOptions.getEncoding() != null) { args.add("-encoding"); args.add(compileOptions.getEncoding()); } if (compileOptions.getBootClasspath() != null) { //TODO: move bootclasspath to platform args.add("-bootclasspath"); args.add(compileOptions.getBootClasspath()); } if (compileOptions.getExtensionDirs() != null) { args.add("-extdirs"); args.add(compileOptions.getExtensionDirs()); } if (compileOptions.getCompilerArgs() != null) { args.addAll(compileOptions.getCompilerArgs()); } }
Example 5
Source File: JavaCompilerArgumentsBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
private void addMainOptions() { if (!includeMainOptions) { return; } String sourceCompatibility = spec.getSourceCompatibility(); if (sourceCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(sourceCompatibility))) { args.add("-source"); args.add(sourceCompatibility); } String targetCompatibility = spec.getTargetCompatibility(); if (targetCompatibility != null && !JavaVersion.current().equals(JavaVersion.toVersion(targetCompatibility))) { args.add("-target"); args.add(targetCompatibility); } File destinationDir = spec.getDestinationDir(); if (destinationDir != null) { args.add("-d"); args.add(destinationDir.getPath()); } CompileOptions compileOptions = spec.getCompileOptions(); if (compileOptions.isVerbose()) { args.add("-verbose"); } if (compileOptions.isDeprecation()) { args.add("-deprecation"); } if (!compileOptions.isWarnings()) { args.add("-nowarn"); } if (compileOptions.isDebug()) { if (compileOptions.getDebugOptions().getDebugLevel() != null) { args.add("-g:" + compileOptions.getDebugOptions().getDebugLevel().trim()); } else { args.add("-g"); } } else { args.add("-g:none"); } if (compileOptions.getEncoding() != null) { args.add("-encoding"); args.add(compileOptions.getEncoding()); } if (compileOptions.getBootClasspath() != null) { args.add("-bootclasspath"); args.add(compileOptions.getBootClasspath()); } if (compileOptions.getExtensionDirs() != null) { args.add("-extdirs"); args.add(compileOptions.getExtensionDirs()); } if (compileOptions.getCompilerArgs() != null) { args.addAll(compileOptions.getCompilerArgs()); } }