org.gradle.api.Project.getLayout()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(138)

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

Project.getLayout介绍

暂无

代码示例

代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin

@Inject
public CCv2Extension(Project project, Manifest manifest) {
  generatedConfiguration = project.getLayout().directoryProperty();
  this.manifest = manifest;
}

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

public Module(Project project, DirectoryProperty destinationDir) {
 this.destinationDir = destinationDir;
 this.outputTo = project.getLayout().fileProperty();
}

代码示例来源:origin: io.freefair.gradle/android-gradle-plugins

/**
 * The custom rule set files to be used. See the <a href="http://pmd.sourceforge.net/howtomakearuleset.html">official documentation</a> for how to author a rule set file.
 *
 * Example: ruleSetFiles = files("config/pmd/myRuleSet.xml")
 */
public void setRuleSetFiles(FileCollection ruleSetFiles) {
  this.ruleSetFiles = project.getLayout().configurableFiles(ruleSetFiles);
}

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

public ClojureScriptCompileOptions(Project project, DirectoryProperty destinationDir) {
 this.project = project;
 this.destinationDir = destinationDir;
 this.outputTo = project.getLayout().fileProperty();
 this.outputDir = project.getLayout().directoryProperty();
 this.sourceMapFile = project.getLayout().fileProperty();
}

代码示例来源:origin: com.ca.apim.gateway/gateway-developer-plugin

public GatewayDeveloperPluginConfig(Project project) {
  solutionDir = project.getLayout().directoryProperty();
  builtBundleDir = project.getLayout().directoryProperty();
  environmentConfig = project.getObjects().property(Map.class);
  builtEnvironmentBundleDir = project.getLayout().directoryProperty();
}

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

public FigwheelOptions(Project project, DirectoryProperty destinationDir) {
 this.destinationDir = destinationDir;
 this.watchDirs = project.files();
 this.cssDirs = project.files();
 this.ringServerOptions = new HashMap<>();
 this.logFile = project.getLayout().fileProperty();
}

代码示例来源:origin: com.ca.apim.gateway/gateway-export-plugin

public GatewayExportPluginConfig(Project project) {
  solutionDir = project.getLayout().directoryProperty();
  rawBundle = project.getLayout().fileProperty();
  sanitizedBundle = project.getLayout().fileProperty();
  exportEntities = project.getObjects().property(Map.class);
  folderPath = project.getObjects().property(String.class);
}

代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin

@javax.inject.Inject
public HybrisPlatform(Project project) {
  projectRoot = project.getProjectDir().toPath();
  platformDir = project.provider(() -> project.getLayout().getProjectDirectory().dir("hybris/bin/platform"));
  platformVersion = project.provider(this::readVersion);
  antHome = project.provider(() -> project.getLayout().getProjectDirectory().dir(getRelativeAntHomepath()));
}

代码示例来源:origin: typelead/gradle-eta

public EtaResolveDependencies() {
  this.project        = getProject();
  this.dependencies   = getDefaultDependencyProvider();
  this.destinationDir = project.getLayout().directoryProperty();
  destinationDir.set
    (project.getLayout().getBuildDirectory().dir(DEFAULT_DESTINATION_DIR));
  setDescription("Resolve dependencies for all the projects in a multi-project" +
          " to get a consistent snapshot of all the dependencies.");
}

代码示例来源:origin: io.freefair.gradle/android-gradle-plugins

private Provider<Directory> determineConfigurationDirectory() {
  return project.provider(() -> {
    if (usesSubprojectCheckstyleConfiguration()) {
      DeprecationLogger.nagUserWithDeprecatedIndirectUserCodeCause("Setting the Checkstyle configuration file under 'config/checkstyle' of a sub project", "Use the root project's 'config/checkstyle' directory instead.");
      return project.getLayout().getProjectDirectory().dir(CONFIG_DIR_NAME);
    }
    return project.getRootProject().getLayout().getProjectDirectory().dir(CONFIG_DIR_NAME);
  });
}

代码示例来源:origin: gradle.plugin.de.acetous/gradle-require-dependency-compliance-plugin

public DependencyComplianceExtension(Project project) {
  outputFile = project.getLayout().fileProperty(project.provider(() -> project.getLayout().getProjectDirectory().file("dependency-compliance-report.json")));
  ignore = project.getObjects().listProperty(String.class);
  ignoreMavenLocal = project.getObjects().property(Boolean.class);
}

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

public ExtractGraalTask() {
  setGroup(GradleGraalPlugin.TASK_GROUP);
  setDescription("Extracts GraalVM tooling from downloaded tgz archive using the system's tar command.");
  onlyIf(task -> !getOutputDirectory().get().getAsFile().exists());
  outputDirectory.set(graalVersion.map(v ->
      getProject().getLayout().getProjectDirectory()
          .dir(cacheDir.get().toFile().getAbsolutePath())
          .dir(v)
          .dir("graalvm-ce-" + v)));
}

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

public ClojureScriptExtension(Project project) {
 this.outputDir = project.getLayout().directoryProperty();
 this.builds = project.container(ClojureScriptBuild.class, name -> {
  ClojureScriptBuild build = new ClojureScriptBuild(project, name);
  build.getOutputDir().set(outputDir.dir(name));
  return build;
 });
}

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

public ClojureExtension(Project project) {
 this.outputDir = project.getLayout().directoryProperty();
 this.builds = project.container(ClojureBuild.class, name -> {
  ClojureBuild build = new ClojureBuild(project, name);
  build.getOutputDir().set(outputDir.dir(name));
  return build;
 });
}

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

public ExtractGraalTask() {
  setGroup(GradleGraalPlugin.TASK_GROUP);
  setDescription("Extracts GraalVM tooling from downloaded tgz archive using the system's tar command.");
  onlyIf(task -> !getOutputDirectory().get().getAsFile().exists());
  outputDirectory.set(graalVersion.map(v ->
      getProject().getLayout().getProjectDirectory()
          .dir(cacheDir.get().toFile().getAbsolutePath())
          .dir(v)
          .dir("graalvm-ce-" + v)));
}

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

public ClojureScriptBuild(Project project, String name) {
 this.name = name;
 this.outputDir = project.getLayout().directoryProperty();
 this.sourceSet = project.getObjects().property(SourceSet.class);
 this.compiler = new ClojureScriptCompileOptions(project, outputDir);
 this.figwheel = new FigwheelOptions(project, outputDir);
 figwheel.getWatchDirs().from(getSourceRoots());
}

代码示例来源:origin: gradle.plugin.edu.wpi.first/gradle-jni

public ExtractJniFilesTask() {
 getOutputs().dir(outputDirectory);
 outputDirectory.set(getProject().getLayout().getBuildDirectory().dir("embeddedJniHeaders"));
 setGroup("JNI");
 setDescription("Extracts the embedded JNI headers");
}

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

public ClojureScriptCompile() {
 this.clojureExecutor = new ClojureExecutor(getProject());
 this.destinationDir = getProject().getLayout().directoryProperty();
 this.sourceRoots = getProject().files();
 this.classpath = getProject().files();
 this.options = new ClojureScriptCompileOptions(getProject(), destinationDir);
 this.forkOptions = new ForkOptions();
}

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

public ClojureBuild(Project project, String name) {
 this.name = name;
 this.outputDir = project.getLayout().directoryProperty();
 this.sourceSet = project.getObjects().property(SourceSet.class);
 this.checkNamespaces = project.getObjects().setProperty(String.class);
 this.reflection = project.getObjects().property(ClojureReflection.class);
 this.aotNamespaces = project.getObjects().setProperty(String.class);
 this.compiler = new ClojureCompileOptions();
 this.reflection.set(ClojureReflection.silent);
}

代码示例来源: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());
}

相关文章