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

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

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

Project.getName介绍

暂无

代码示例

代码示例来源:origin: linkedin/rest.li

File destinationDir = new File(project.getBuildDir(), taskName);
destinationDir.mkdirs();
File pathingJarPath = new File(destinationDir, project.getName() + "-pathing.jar");
OutputStream pathingJar = new FileOutputStream(pathingJarPath);

代码示例来源:origin: hibernate/hibernate-orm

public void apply(Project project) {
  project.getPlugins().apply( "java" );
  final HibernateExtension hibernateExtension = new HibernateExtension( project );
  project.getLogger().debug( "Adding Hibernate extensions to the build [{}]", project.getName() );
  project.getExtensions().add( "hibernate", hibernateExtension );
  project.afterEvaluate(
      new Action<Project>() {
        @Override
        public void execute(Project project) {
          if ( hibernateExtension.enhance != null ) {
            applyEnhancement( project, hibernateExtension );
          }
        }
      }
  );
}

代码示例来源:origin: uber/okbuck

VersionlessDependency.builder()
    .setGroup((String) target.getProject().getGroup())
    .setName(target.getProject().getName())
    .build();
return firstLevelDependencies.contains(versionless);

代码示例来源:origin: jooby-project/jooby

String mId = project.getName();

代码示例来源:origin: uber/okbuck

throw new IllegalStateException(
   "module `"
     + project.getName()
     + "` must specify minSdkVersion and targetSdkVersion in build.gradle");
} else {

代码示例来源:origin: gradle.plugin.org.itsallcode/openfasttrace-gradle

private String getItemNamePrefix()
{
  if (coveredItemNamePrefix == null)
  {
    return project.getName() + ".";
  }
  return coveredItemNamePrefix;
}

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

private String composeDefaultName()
{
  if ( this.project.getGroup().equals( "" ) )
  {
    return this.project.getName();
  }
  return this.project.getGroup().toString() + "." + this.project.getName();
}

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

private String composeDefaultName()
{
  if ( this.project.getGroup().equals( "" ) )
  {
    return this.project.getName();
  }
  return this.project.getGroup().toString() + "." + this.project.getName();
}

代码示例来源:origin: linkedin/pygradle

@Override
public Map<String, String> buildSubstitutions(PythonExtension extension, String entry) {
    Map<String, String> substitutions = new HashMap<>();
    substitutions.putAll(extraProperties);
    substitutions.put("entryPoint", entry);
    substitutions.put("pythonExecutable", extension.getDetails().getSystemPythonInterpreter().getAbsolutePath());
    substitutions.put("toolName", project.getName());
    return substitutions;
}

代码示例来源:origin: gradle.plugin.com.linkedin.pygradle/pygradle-plugin

@Override
public Map<String, String> buildSubstitutions(PythonExtension extension, String entry) {
    Map<String, String> substitutions = new HashMap<>();
    substitutions.putAll(extraProperties);
    substitutions.put("entryPoint", entry);
    substitutions.put("pythonExecutable", extension.getDetails().getSystemPythonInterpreter().getAbsolutePath());
    substitutions.put("toolName", project.getName());
    return substitutions;
}

代码示例来源:origin: spring-gradle-plugins/dependency-management-plugin

private Set<String> getAllLocalProjectNames(Project rootProject) {
  Set<String> names = new HashSet<String>();
  for (Project localProject: rootProject.getAllprojects()) {
    names.add(localProject.getGroup() + ":" + localProject.getName());
  }
  return names;
}

代码示例来源:origin: linkedin/pygradle

@Override
public Map<String, String> buildSubstitutions(PythonExtension extension, String entry) {
  Map<String, String> substitutions = super.buildSubstitutions(extension, entry);
  substitutions.put("realPex", PexFileUtil.createThinPexFilename(project.getName()));
  return substitutions;
}

代码示例来源:origin: linkedin/pygradle

@OutputFile
public File getSdistOutput() {
  Project project = getProject();
  return new File(
    getDistDir(),
    String.format(
      "%s-%s.tar.gz",
      project.getName(),
      // TODO: Is this replace here really necessary?
      project.getVersion().toString().replace("_", "-")));
}

代码示例来源:origin: gradle.plugin.com.linkedin.pygradle/pygradle-plugin

@OutputFile
public File getSdistOutput() {
  Project project = getProject();
  return new File(
    getDistDir(),
    String.format(
      "%s-%s.tar.gz",
      project.getName(),
      // TODO: Is this replace here really necessary?
      project.getVersion().toString().replace("_", "-")));
}

代码示例来源:origin: MinecraftForge/ForgeGradle

LiteModJson(Project project, String minecraftVersion, String revision)
{
  this.project = project;
  this.mcversion = this.minecraftVersion = minecraftVersion;
  this.revision = revision;
  this.name = project.getName();
  this.displayName = project.hasProperty("displayName") ? project.property("displayName").toString() : project.getDescription();
  this.version = project.getVersion().toString();
}

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

private void setDefaults(GatewayExportPluginConfig pluginConfig, @NotNull Project project) {
  if (!pluginConfig.getSolutionDir().isPresent()) {
    pluginConfig.getSolutionDir().set(new File(project.getProjectDir(), "src/main/gateway"));
  }
  if (!pluginConfig.getRawBundle().isPresent()) {
    pluginConfig.getRawBundle().set(new File(new File(project.getBuildDir(), "gateway"), project.getName() + ".raw.bundle"));
  }
  if (!pluginConfig.getSanitizedBundle().isPresent()) {
    pluginConfig.getSanitizedBundle().set(new File(new File(project.getBuildDir(), "gateway"), project.getName() + ".sanitized.bundle"));
  }
}

代码示例来源:origin: org.gradle/gradle-core

private LoadProjectsBuildOperationType.Result.Project convert(org.gradle.api.Project project) {
  return new BuildStructureOperationProject(
    project.getName(),
    project.getPath(),
    ((ProjectInternal) project).getIdentityPath().toString(),
    project.getProjectDir().getAbsolutePath(),
    project.getBuildFile().getAbsolutePath(),
    convert(project.getChildProjects().values()));
}

代码示例来源:origin: linkedin/pygradle

public DefaultPythonDetails(Project project, File venvDir) {
  this.project = project;
  activateLink = new File(project.getProjectDir(), OperatingSystem.current().getScriptName("activate"));
  virtualEnvPrompt = String.format("(%s)", project.getName());
  searchPath = OperatingSystem.current().getPath();
  venvOverride = venvDir;
  this.virtualEnvironment = new DefaultVirtualEnvironment(this);
  pythonDefaultVersions = new PythonDefaultVersions();
}

代码示例来源:origin: gradle.plugin.com.linkedin.pygradle/pygradle-plugin

public DefaultPythonDetails(Project project, File venvDir) {
  this.project = project;
  activateLink = new File(project.getProjectDir(), OperatingSystem.current().getScriptName("activate"));
  virtualEnvPrompt = String.format("(%s)", project.getName());
  searchPath = OperatingSystem.current().getPath();
  venvOverride = venvDir;
  this.virtualEnvironment = new DefaultVirtualEnvironment(this);
  pythonDefaultVersions = new PythonDefaultVersions();
}

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

private ProjectDescriptor deriveProjectDescription(Project project) {
  ProjectDescriptor projectDescriptor = new ProjectDescriptor(project.getName(), project.getGroup().toString(), project.getDescription(), project.getVersion().toString(), new EnvironmentDescriptor(project.getGradle().getGradleVersion()));
  addPluginDescription(project, projectDescriptor);
  addTasksDescription(project, projectDescriptor);
  addJavaDescription(project, projectDescriptor);
  return projectDescriptor;
}

相关文章