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

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

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

Project.getDescription介绍

暂无

代码示例

代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-node

@Override
public String call() throws Exception {
  return project.getDescription();
}

代码示例来源:origin: com.liferay/com.liferay.gradle.plugins.node

@Override
public String call() throws Exception {
  return project.getDescription();
}

代码示例来源:origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
 * Get the project description
 *
 * @return Project description
 */
public @Nullable String getDescription() {
  return getProject().getDescription();
}

代码示例来源:origin: me.seeber.gradle/gradle-project-config

/**
 * Get the project description
 *
 * @return Project description
 */
public @Nullable String getDescription() {
  return getProject().getDescription();
}

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

void startProject(final Project project) {
  this.output.println();
  this.output.println("------------------------------------------------------------");
  String heading;
  if (project.getRootProject().equals(project)) {
    heading = "Root project";
  }
  else {
    heading = "Project " + project.getPath();
  }
  if (project.getDescription() != null) {
    heading += " - " + project.getDescription();
  }
  this.output.println(heading);
  this.output.println("------------------------------------------------------------");
  this.output.println();
}

代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-app-javadoc-builder

@SuppressWarnings("unused")
public String doCall(Project subproject) {
  String groupName = subproject.getDescription();
  if (Validator.isNull(groupName)) {
    groupName = subproject.getName();
  }
  return groupName;
}

代码示例来源: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: org.sonarsource.scanner.gradle/sonarqube-gradle-plugin

private void addGradleDefaults(final Project project, final Map<String, Object> properties) {
 properties.put("sonar.projectName", project.getName());
 properties.put("sonar.projectDescription", project.getDescription());
 properties.put("sonar.projectVersion", project.getVersion());
 properties.put("sonar.projectBaseDir", project.getProjectDir());
 if (project.equals(targetProject)) {
  // Root project of the analysis
  properties.put("sonar.working.directory", new File(project.getBuildDir(), "sonar"));
 }
 if (project.getPlugins().hasPlugin(GroovyBasePlugin.class)) {
  // Groovy extends the Java plugin, so no need to configure twice
  configureForGroovy(project, properties);
 } else {
  configureForJava(project, properties);
 }
}

代码示例来源:origin: SonarSource/sonar-scanner-gradle

private void addGradleDefaults(final Project project, final Map<String, Object> properties) {
 properties.put("sonar.projectName", project.getName());
 properties.put("sonar.projectDescription", project.getDescription());
 properties.put("sonar.projectVersion", project.getVersion());
 properties.put("sonar.projectBaseDir", project.getProjectDir());
 if (project.equals(targetProject)) {
  // Root project of the analysis
  properties.put("sonar.working.directory", new File(project.getBuildDir(), "sonar"));
 }
 if (project.getPlugins().hasPlugin(GroovyBasePlugin.class)) {
  // Groovy extends the Java plugin, so no need to configure twice
  configureForGroovy(project, properties);
 } else {
  configureForJava(project, properties);
 }
}

代码示例来源:origin: me.tatarka.gradle/pom

private void applyUserPom(Project project, Node pomXml) {
    PomConvention pomExt = project.getConvention().getPlugin(PomConvention.class);
    if (pomExt.config != null) {
      XmlMerger.mergePom(pomXml, pomExt.config);
    }
    // apply defaults if required
    if (pomXml.get("name") == null) {
      pomXml.appendNode("name", project.getName());
    }
    if (project.getDescription() != null && pomXml.get("description") == null) {
      pomXml.appendNode("description", project.getDescription());
    }
  }
}

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

代码示例来源:origin: org.shipkit/shipkit

public void execute(XmlProvider xml) {
    String archivesBaseName = (String) project.getProperties().get("archivesBaseName");
    File contributorsFile = contributorsFile(project);
    LOG.info("  Read project contributors from file: " + contributorsFile.getAbsolutePath());
    // It can happens that contributorsFile doesn't exist e.g. when shipkit.team.contributors is NOT empty
    ProjectContributorsSet contributorsFromGitHub = new ProjectContributorsSerializer()
        .deserialize(IOUtil.readFullyOrDefault(contributorsFile, "[]"));
    LOG.info("  Customizing pom for publication " + publication.getName() + " in " + project.toString() +
        "\n   - Module name (project.archivesBaseName): " + archivesBaseName +
        "\n   - Description (project.description): " + project.getDescription() +
        "\n   - GitHub repository (project.rootProject.shipkit.gitHub.repository): "
            + conf.getGitHub().getRepository() +
        "\n   - Developers (project.rootProject.shipkit.team.developers): "
            + StringUtil.join(conf.getTeam().getDevelopers(), ", ") +
        "\n   - Contributors (project.rootProject.shipkit.team.contributors): "
            + StringUtil.join(conf.getTeam().getContributors(), ", ") +
        "\n   - Contributors read from GitHub: "
            + StringUtil.join(contributorsFromGitHub.toConfigNotation(), ", "));
    customizePom(xml.asNode(), conf, archivesBaseName, project.getDescription(), contributorsFromGitHub);
  }
});

代码示例来源:origin: gradle.plugin.org.shipkit/shipkit

public void execute(XmlProvider xml) {
    String archivesBaseName = (String) project.getProperties().get("archivesBaseName");
    File contributorsFile = contributorsFile(project);
    LOG.info("  Read project contributors from file: " + contributorsFile.getAbsolutePath());
    // It can happens that contributorsFile doesn't exist e.g. when shipkit.team.contributors is NOT empty
    ProjectContributorsSet contributorsFromGitHub = new AllContributorsSerializer()
        .deserialize(IOUtil.readFullyOrDefault(contributorsFile, "[]"));
    LOG.info("  Customizing pom for publication " + publication.getName() + " in " + project.toString() +
        "\n   - Module name (project.archivesBaseName): " + archivesBaseName +
        "\n   - Description (project.description): " + project.getDescription() +
        "\n   - GitHub repository (project.rootProject.shipkit.gitHub.repository): "
            + conf.getGitHub().getRepository() +
        "\n   - Developers (project.rootProject.shipkit.team.developers): "
            + StringUtil.join(conf.getTeam().getDevelopers(), ", ") +
        "\n   - Contributors (project.rootProject.shipkit.team.contributors): "
            + StringUtil.join(conf.getTeam().getContributors(), ", ") +
        "\n   - Contributors read from GitHub: "
            + StringUtil.join(contributorsFromGitHub.toConfigNotation(), ", "));
    customizePom(xml.asNode(), conf, archivesBaseName, project.getDescription(), contributorsFromGitHub);
  }
});

代码示例来源:origin: mockito/shipkit

public void execute(XmlProvider xml) {
    String archivesBaseName = (String) project.getProperties().get("archivesBaseName");
    File contributorsFile = contributorsFile(project);
    LOG.info("  Read project contributors from file: " + contributorsFile.getAbsolutePath());
    // It can happens that contributorsFile doesn't exist e.g. when shipkit.team.contributors is NOT empty
    ProjectContributorsSet contributorsFromGitHub = new ProjectContributorsSerializer()
        .deserialize(IOUtil.readFullyOrDefault(contributorsFile, "[]"));
    LOG.info("  Customizing pom for publication " + publication.getName() + " in " + project.toString() +
        "\n   - Module name (project.archivesBaseName): " + archivesBaseName +
        "\n   - Description (project.description): " + project.getDescription() +
        "\n   - GitHub repository (project.rootProject.shipkit.gitHub.repository): "
            + conf.getGitHub().getRepository() +
        "\n   - Developers (project.rootProject.shipkit.team.developers): "
            + StringUtil.join(conf.getTeam().getDevelopers(), ", ") +
        "\n   - Contributors (project.rootProject.shipkit.team.contributors): "
            + StringUtil.join(conf.getTeam().getContributors(), ", ") +
        "\n   - Contributors read from GitHub: "
            + StringUtil.join(contributorsFromGitHub.toConfigNotation(), ", "));
    customizePom(xml.asNode(), conf, archivesBaseName, project.getDescription(), contributorsFromGitHub);
  }
});

代码示例来源:origin: gradle.plugin.org.shipkit/shipkit

public void run() {
    //Below overwrites prior value in case the user configured dry run directly on the bintray extension.
    //It should be ok.
    bintray.setDryRun(conf.isDryRun());
    if (pkg.getDesc() == null) {
      pkg.setDesc(project.getDescription());
    }
    if (pkg.getVersion().getVcsTag() == null) {
      pkg.getVersion().setVcsTag("v" + project.getVersion());
    }
    if (pkg.getWebsiteUrl() == null) {
      pkg.setWebsiteUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository());
    }
    if (pkg.getIssueTrackerUrl() == null) {
      pkg.setIssueTrackerUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository() + "/issues");
    }
    if (pkg.getVcsUrl() == null) {
      pkg.setVcsUrl(conf.getGitHub().getUrl() + "/" + conf.getGitHub().getRepository() + ".git");
    }
  }
});

代码示例来源:origin: mockito/shipkit

pkg.setDesc(project.getDescription());

代码示例来源:origin: org.shipkit/shipkit

pkg.setDesc(project.getDescription());

相关文章