org.gradle.api.provider.Provider.map()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中org.gradle.api.provider.Provider.map()方法的一些代码示例,展示了Provider.map()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Provider.map()方法的具体详情如下:
包路径:org.gradle.api.provider.Provider
类名称:Provider
方法名:map

Provider.map介绍

暂无

代码示例

代码示例来源:origin: io.github.gradle-clojure/gradle-clojure-plugin

Provider<Set<String>> getAllNamespaces() {
 return getSourceRoots().map(roots -> {
  return Namespaces.findNamespaces(roots, Namespaces.CLOJURE_EXTENSIONS);
 });
}

代码示例来源:origin: gradle-clojure/gradle-clojure

Provider<Set<String>> getAllNamespaces() {
 return getSourceRoots().map(roots -> {
  return Namespaces.findNamespaces(roots, Namespaces.CLOJURE_EXTENSIONS);
 });
}

代码示例来源:origin: gradle.plugin.com.palantir.graal/gradle-graal

@OutputFile
public final Provider<RegularFile> getTgz() {
  return getProject().getLayout()
      .file(getCacheSubdirectory().map(dir -> dir.resolve(render(FILENAME_PATTERN)).toFile()));
}

代码示例来源:origin: palantir/gradle-graal

@OutputFile
public final Provider<RegularFile> getTgz() {
  return getProject().getLayout()
      .file(getCacheSubdirectory().map(dir -> dir.resolve(render(FILENAME_PATTERN)).toFile()));
}

代码示例来源:origin: palantir/sls-packaging

task.setBaseName(ext.getDistributionServiceName().get());
task.setVersion(project.getVersion().toString());
task.setExtension(ext.getProductType().map(productType -> {
  try {
    String productTypeString = CreateManifestTask.jsonMapper.writeValueAsString(productType);

代码示例来源:origin: io.github.gradle-clojure/gradle-clojure-plugin

private void configureBuilds(Project project, ClojureExtension extension) {
  ClojureBuild main = extension.getBuilds().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
  main.checkAll();

  // any test ns needs this config to work with the Test task
  extension.getBuilds().matching(build -> build.getName().toLowerCase().contains("test")).all(test -> {
   test.aotAll();
   test.getAotNamespaces().add("gradle-clojure.tools.logger");
   test.getAotNamespaces().add("gradle-clojure.tools.clojure-test-junit4");
  });

  ClojureBuild dev = extension.getBuilds().getByName(ClojureCommonPlugin.DEV_SOURCE_SET_NAME);
  // REPL crashes if the user namespace doesn't compile, so make sure it does before starting
  // but also have to account project not having a user ns
  dev.getCheckNamespaces().set(dev.getAllNamespaces().map(nses -> {
   return nses.stream()
     .filter("user"::equals)
     .collect(Collectors.toSet());
  }));
 }
}

代码示例来源:origin: gradle-clojure/gradle-clojure

private void configureBuilds(Project project, ClojureExtension extension) {
  ClojureBuild main = extension.getBuilds().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
  main.checkAll();

  // any test ns needs this config to work with the Test task
  extension.getBuilds().matching(build -> build.getName().toLowerCase().contains("test")).all(test -> {
   test.aotAll();
   test.getAotNamespaces().add("gradle-clojure.tools.logger");
   test.getAotNamespaces().add("gradle-clojure.tools.clojure-test-junit4");
  });

  ClojureBuild dev = extension.getBuilds().getByName(ClojureCommonPlugin.DEV_SOURCE_SET_NAME);
  // REPL crashes if the user namespace doesn't compile, so make sure it does before starting
  // but also have to account project not having a user ns
  dev.getCheckNamespaces().set(dev.getAllNamespaces().map(nses -> {
   return nses.stream()
     .filter("user"::equals)
     .collect(Collectors.toSet());
  }));
 }
}

代码示例来源:origin: palantir/gradle-graal

public NativeImageTask() {
  setGroup(GradleGraalPlugin.TASK_GROUP);
  setDescription("Runs GraalVM's native-image command with configured options and parameters.");
  this.outputFile.set(getProject().getLayout().getBuildDirectory()
      .dir("graal")
      .map(d -> d.file(outputName.get())));
  // must use an anonymous inner class instead of a lambda to get Gradle staleness checking
  doLast(new LogAction());
}

代码示例来源:origin: gradle.plugin.com.palantir.graal/gradle-graal

public NativeImageTask() {
  setGroup(GradleGraalPlugin.TASK_GROUP);
  setDescription("Runs GraalVM's native-image command with configured options and parameters.");
  this.outputFile.set(getProject().getLayout().getBuildDirectory()
      .dir("graal")
      .map(d -> d.file(outputName.get())));
  // must use an anonymous inner class instead of a lambda to get Gradle staleness checking
  doLast(new LogAction());
}

相关文章