org.gradle.api.tasks.Classpath Java Examples

The following examples show how to use org.gradle.api.tasks.Classpath. 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: GenerateHensonNavigatorTask.java    From dart with Apache License 2.0 6 votes vote down vote up
@InputFiles
@Classpath
FileCollection getJarDependencies() {
  //Thanks to Xavier Durcrohet for this
  //https://android.googlesource.com/platform/tools/base/+/gradle_3.0.0/build-system/gradle-core/src/main/java/com/android/build/gradle/internal/scope/VariantScopeImpl.java#1037
  Action<AttributeContainer> attributes =
      container ->
          container.attribute(ARTIFACT_TYPE, AndroidArtifacts.ArtifactType.CLASSES.getType());
  boolean lenientMode = false;
  return variant
      .getCompileConfiguration()
      .getIncoming()
      .artifactView(
          config -> {
            config.attributes(attributes);
            config.lenient(lenientMode);
          })
      .getArtifacts()
      .getArtifactFiles();
}
 
Example #2
Source File: QuarkusBuild.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Classpath
public FileCollection getClasspath() {
    SourceSet mainSourceSet = QuarkusGradleUtils.getSourceSet(getProject(), SourceSet.MAIN_SOURCE_SET_NAME);
    return mainSourceSet.getCompileClasspath().plus(mainSourceSet.getRuntimeClasspath())
            .plus(mainSourceSet.getAnnotationProcessorPath())
            .plus(mainSourceSet.getResources());
}
 
Example #3
Source File: GenerateAvroProtocolTask.java    From gradle-avro-plugin with Apache License 2.0 4 votes vote down vote up
@Classpath
public FileCollection getClasspath() {
    return this.classpath;
}
 
Example #4
Source File: ModelMapGenTask.java    From doov with Apache License 2.0 4 votes vote down vote up
@Classpath
public FileCollection getClasspath() {
    return classpath;
}
 
Example #5
Source File: CheckForbiddenApis.java    From forbidden-apis with Apache License 2.0 4 votes vote down vote up
/**
 * A {@link FileCollection} used to configure the classpath.
 * Defaults to current sourseSet's compile classpath.
 */
@InputFiles
@Classpath
public FileCollection getClasspath() {
  return classpath;
}
 
Example #6
Source File: LombokTask.java    From gradle-plugins with MIT License 4 votes vote down vote up
@Classpath
ConfigurableFileCollection getLombokClasspath();
 
Example #7
Source File: LombokTask.java    From gradle-plugins with MIT License 4 votes vote down vote up
@Classpath
ConfigurableFileCollection getLombokClasspath();
 
Example #8
Source File: ClojureNRepl.java    From clojurephant with Apache License 2.0 4 votes vote down vote up
@Classpath
public FileCollection getClasspath() {
  return classpath;
}
 
Example #9
Source File: ClojureCheck.java    From clojurephant with Apache License 2.0 4 votes vote down vote up
@Classpath
public ConfigurableFileCollection getClasspath() {
  return classpath;
}
 
Example #10
Source File: ClojureCompile.java    From clojurephant with Apache License 2.0 4 votes vote down vote up
@Classpath
public ConfigurableFileCollection getClasspath() {
  return classpath;
}
 
Example #11
Source File: ClojureScriptCompile.java    From clojurephant with Apache License 2.0 4 votes vote down vote up
@Classpath
public ConfigurableFileCollection getClasspath() {
  return classpath;
}
 
Example #12
Source File: RoutesCompile.java    From playframework with Apache License 2.0 4 votes vote down vote up
@Classpath
public ConfigurableFileCollection getRoutesCompilerClasspath() {
    return routesCompilerClasspath;
}
 
Example #13
Source File: JavaScriptMinify.java    From playframework with Apache License 2.0 4 votes vote down vote up
@Classpath
public ConfigurableFileCollection getCompilerClasspath() {
    return compilerClasspath;
}
 
Example #14
Source File: TwirlCompile.java    From playframework with Apache License 2.0 4 votes vote down vote up
@Classpath
public ConfigurableFileCollection getTwirlCompilerClasspath() {
    return twirlCompilerClasspath;
}
 
Example #15
Source File: JavaCompile.java    From javaide with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the path to use for annotation processor discovery. Returns an empty collection when no processing should be performed, for example when no annotation processors are present in the compile classpath or annotation processing has been disabled.
 * <p>
 * <p>You can specify this path using {@link CompileOptions#setAnnotationProcessorPath(FileCollection)} or {@link CompileOptions#setCompilerArgs(java.util.List)}. When not explicitly set using one of the methods on {@link CompileOptions}, the compile classpath will be used when there are annotation processors present in the compile classpath. Otherwise this path will be empty.
 * <p>
 * <p>This path is always empty when annotation processing is disabled.</p>
 *
 * @since 3.4
 */
@Incubating
@Classpath
public FileCollection getEffectiveAnnotationProcessorPath() {
    AnnotationProcessorPathFactory annotationProcessorPathFactory = getServices().get(AnnotationProcessorPathFactory.class);
    return annotationProcessorPathFactory.getEffectiveAnnotationProcessorClasspath(compileOptions, getClasspath());
}
 
Example #16
Source File: AbstractCompile.java    From javaide with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Returns the classpath to use to compile the source files.
 *
 * @return The classpath.
 */
@Classpath
public FileCollection getClasspath() {
    return classpath;
}
 
Example #17
Source File: PlayRun.java    From playframework with Apache License 2.0 2 votes vote down vote up
/**
 * The changing classpath for the Play application.
 *
 * @return The changing classpath
 */
@Classpath
public ConfigurableFileCollection getChangingClasspath() {
    return changingClasspath;
}
 
Example #18
Source File: PlayRun.java    From playframework with Apache License 2.0 2 votes vote down vote up
/**
 * The runtime classpath for the Play application.
 *
 * @return The runtime classpath
 */
@Classpath
public ConfigurableFileCollection getRuntimeClasspath() {
    return runtimeClasspath;
}
 
Example #19
Source File: PlayRun.java    From playframework with Apache License 2.0 2 votes vote down vote up
/**
 * The assets jar to run with the Play application.
 *
 * @return The assets jar
 */
@Classpath
public RegularFileProperty getAssetsJar() {
    return assetsJar;
}
 
Example #20
Source File: PlayRun.java    From playframework with Apache License 2.0 2 votes vote down vote up
/**
 * The Play application jar to run.
 *
 * @return The Play application jar
 */
@Classpath
public RegularFileProperty getApplicationJar() {
    return applicationJar;
}
 
Example #21
Source File: Cpd.java    From gradle-cpd-plugin with Apache License 2.0 2 votes vote down vote up
/**
 * The classpath containing the PMD library which contains the CPD library to be used.
 *
 * @return CPD libraries classpath
 */
@Classpath
public FileCollection getPmdClasspath() {
    return pmdClasspath;
}