org.gradle.api.invocation.Gradle.addBuildListener()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(312)

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

Gradle.addBuildListener介绍

暂无

代码示例

代码示例来源:origin: gradle.plugin.org.hibernate.build/database-profile-plugin

private DatabaseAllocator(Project rootProject) {
  this.rootProject = rootProject;
  cleanUpListener = new DatabaseAllocationCleanUp();
  rootProject.getGradle().addBuildListener( cleanUpListener );
}

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

/**
 * @see org.gradle.api.Plugin#apply(java.lang.Object)
 */
@Override
public void apply(Project project) {
  this.project = project;
  if (VersionNumber.parse(project.getGradle().getGradleVersion()).compareTo(MIN_GRADLE_VERSION) < 0) {
    throw new GradleException(format("Base project plugin requires Gradle %s or higher", MIN_GRADLE_VERSION));
  }
  getLogger().info("Applying plugin {} to {}", this, getProject());
  initialize();
  getProject().afterEvaluate(p -> configure());
  getProject().getGradle().addBuildListener(new BuildAdapter() {
    @Override
    public void projectsEvaluated(@Nullable Gradle gradle) {
      complete();
    }
  });
}

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

project.getLogging().addStandardOutputListener(listener);
project.getLogging().addStandardErrorListener(listener);
project.getGradle().addBuildListener(listener);

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

/**
 * @see org.gradle.api.Plugin#apply(java.lang.Object)
 */
@Override
public void apply(Project project) {
  this.project = project;
  if (VersionNumber.parse(project.getGradle().getGradleVersion()).compareTo(MIN_GRADLE_VERSION) < 0) {
    throw new GradleException(format("Base project plugin requires Gradle %s or higher", MIN_GRADLE_VERSION));
  }
  getLogger().info("Applying plugin {} to {}", this, getProject());
  initialize();
  getProject().afterEvaluate(p -> configure());
  getProject().getGradle().addBuildListener(new BuildAdapter() {
    @Override
    public void projectsEvaluated(@Nullable Gradle gradle) {
      complete();
    }
  });
}

相关文章