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

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

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

Project.getObjects介绍

暂无

代码示例

代码示例来源:origin: lenskit/lenskit

@SuppressWarnings("unchecked")
public LenskitExtension(Project project) {
  ObjectFactory objF = project.getObjects();
  threadCount = objF.property(Integer.class);
  threadCount.set(0);
  maxMemory = objF.property(String.class);
  classpath = project.files();
  logLevel = objF.property(String.class);
  logLevel.set("INFO");
  logFileLevel = objF.property(String.class);
  jvmArgs = objF.property((Class) List.class);
}

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

public GatewayImportConnectionProperties(Project project) {
  url = project.getObjects().property(String.class);
  user = project.getObjects().property(String.class);
  password = project.getObjects().property(String.class);
}

代码示例来源:origin: gradle.plugin.com.rhtech/spring-boot-version-plugin

public VersionConfigExtension(Project project)
  {
    this.appVersion = project.getObjects().property(String.class);
    this.appTitle = project.getObjects().property(String.class);
  }
}

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

public GatewayExportConnectionProperties(Project project) {
  userName = project.getObjects().property(String.class);
  url = project.getObjects().property(String.class);
  userPass = project.getObjects().property(String.class);
}

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

public GraalExtension(Project project) {
  downloadBaseUrl = project.getObjects().property(String.class);
  graalVersion = project.getObjects().property(String.class);
  mainClass = project.getObjects().property(String.class);
  outputName = project.getObjects().property(String.class);
  options = project.getObjects().listProperty(String.class).empty(); // .empty() required to initialize
  // defaults
  downloadBaseUrl.set(DEFAULT_DOWNLOAD_BASE_URL);
  graalVersion.set(DEFAULT_GRAAL_VERSION);
}

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

public GraalExtension(Project project) {
  downloadBaseUrl = project.getObjects().property(String.class);
  graalVersion = project.getObjects().property(String.class);
  mainClass = project.getObjects().property(String.class);
  outputName = project.getObjects().property(String.class);
  options = project.getObjects().listProperty(String.class).empty(); // .empty() required to initialize
  // defaults
  downloadBaseUrl.set(DEFAULT_DOWNLOAD_BASE_URL);
  graalVersion.set(DEFAULT_GRAAL_VERSION);
}

代码示例来源: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.org.itsallcode/openfasttrace-gradle

public TracingConfig(Project project)
{
  this.project = project;
  this.inputDirectories = project.files();
  this.reportFile = DeprecationUtil.createFileProperty(project);
  this.reportVerbosity = project.getObjects().property(ReportVerbosity.class);
  this.reportVerbosity.set(DEFAULT_REPORT_VERBOSITY);
  this.reportFormat = DEFAULT_REPORT_FORMAT;
  this.importedRequirements = new ArrayList<>();
  this.filteredTags = new ArrayList<>();
  this.filteredArtifactTypes = new ArrayList<>();
}

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

public ClojureNRepl() {
 this.clojureExecutor = new ClojureExecutor(getProject());
 this.handler = getProject().getObjects().property(String.class);
 this.userMiddleware = getProject().getObjects().listProperty(String.class);
 this.defaultMiddleware = getProject().getObjects().listProperty(String.class);
 this.contextData = new HashMap<>();
 contextData.put("output-dir", getTemporaryDir().getAbsolutePath());
 // task is never up-to-date, if you ask for REPL, you get REPL
 this.getOutputs().upToDateWhen(t -> false);
}

代码示例来源:origin: gradle.plugin.com.enonic.gradle/xp-gradle-plugin

public XpExtension( final Project project )
{
  this.project = project;
  this.objectFactory = project.getObjects();
  this.version = objectFactory.property( String.class );
  this.homeDir = objectFactory.property( File.class );
  this.installDir = objectFactory.property( File.class );
}

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

@Inject
public ExplodeBundleTask() {
  folderPath = getProject().getObjects().property(String.class);
  inputBundleFile = newInputFile();
  exportDir = newOutputDirectory();
  exportEntities = getProject().getObjects().property(Map.class);
  JsonTools.INSTANCE.setOutputType(JsonTools.YAML);
  getOutputs().upToDateWhen(t -> false);
}

代码示例来源: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: gradle.plugin.io.apioo.versioning/versioning-plugin

public ResolveNextSemanticVersionTask() {
  prefix = getProject().getObjects().property(String.class);
  setGroup(GROUP);
  setDescription("Resolves the next version based on the git tags of this repository.");
}

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

@Inject
public BuildFullBundleTask() {
  environmentConfig = getProject().getObjects().property(Map.class);
  environmentConfigurationUtils = getInstance(EnvironmentConfigurationUtils.class);
  dependencyBundles = getProject().files();
  outputBundle = newOutputFile();
}

代码示例来源:origin: gradle.plugin.com.google.cloud.tools/jib-gradle-plugin

public JibExtension(Project project) {
 ObjectFactory objectFactory = project.getObjects();
 from = objectFactory.newInstance(BaseImageParameters.class);
 to = objectFactory.newInstance(TargetImageParameters.class);
 container = objectFactory.newInstance(ContainerParameters.class);
 extraDirectory =
   objectFactory.newInstance(ExtraDirectoryParameters.class, project.getProjectDir().toPath());
 allowInsecureRegistries = objectFactory.property(Boolean.class);
 // Sets defaults.
 allowInsecureRegistries.set(DEFAULT_ALLOW_INSECURE_REGISTIRIES);
}

代码示例来源:origin: gradle.plugin.io.apioo.versioning/versioning-plugin

public PushTagToOriginTask() {
  version = getProject().getObjects().property(String.class);
  setGroup(GROUP);
  setDescription("Pushes the created next version tag to origin.");
  dependsOn("tagAndSign");
}

代码示例来源:origin: gradle.plugin.com.github.spotbugs/spotbugs-gradle-plugin

private SpotBugsReportsInternal createReports(Task task) {
  return DeprecationLogger.whileDisabled(() -> {
    if (GradleVersion.current().compareTo(GRADLE_42()) < 0) {
      return new SpotBugsReportsImpl(task);
    } else {
      //ObjectFactory#newInstance was introduced in Gradle 4.2
      return getProject().getObjects().newInstance(SpotBugsReportsImpl.class, task);
    }
  });
}

代码示例来源: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: com.ca.apim.gateway/gateway-export-plugin

public ExportTask() {
  this.gatewayClient = getInstance(GatewayClient.class);
  gatewayConnectionProperties = new GatewayExportConnectionProperties(getProject());
  exportQuery = getProject().getObjects().property(String.class);
  exportFile = newOutputFile();
  // makes it so that the export is always run
  getOutputs().upToDateWhen(t -> false);
}

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

相关文章