org.gradle.api.logging.Logger.warn()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(233)

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

Logger.warn介绍

暂无

代码示例

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

  1. logger.warn( "Problem preparing class file for writing out enhancements [" + file.getName() + "]" );

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

  1. logger.warn("Extended enhancement is enabled. Classes other than entities may be modified. You should consider access the entities using getter/setter methods and disable this property. Use at your own risk." );

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

  1. private void applyEnhancement(final Project project, final HibernateExtension hibernateExtension) {
  2. if ( !hibernateExtension.enhance.shouldApply() ) {
  3. project.getLogger().warn( "Skipping Hibernate bytecode enhancement since no feature is enabled" );
  4. return;

代码示例来源:origin: diffplug/spotless

  1. /** Makes it possible to remove a format which was created earlier. */
  2. public void removeFormat(String name) {
  3. requireNonNull(name);
  4. FormatExtension toRemove = formats.remove(name);
  5. if (toRemove == null) {
  6. project.getLogger().warn("Called removeFormat('" + name + "') but there was no such format.");
  7. }
  8. }

代码示例来源:origin: diffplug/spotless

  1. private void fixParserToTypescript() {
  2. if (this.prettierConfig == null) {
  3. this.prettierConfig = Collections.singletonMap("parser", "typescript");
  4. } else {
  5. final Object replaced = this.prettierConfig.put("parser", "typescript");
  6. if (replaced != null) {
  7. getProject().getLogger().warn("overriding parser option to 'typescript'. Was set to '{}'", replaced);
  8. }
  9. }
  10. }
  11. }

代码示例来源:origin: diffplug/spotless

  1. /** Method interface has been changed to
  2. * {@link GroovyExtension#importOrder(String...)}.*/
  3. @Deprecated
  4. public void importOrder(List<String> importOrder) {
  5. getProject().getLogger().warn(
  6. StringPrinter.buildStringFromLines(
  7. "'importOrder([x, y, z])' is deprecated.",
  8. "Use 'importOrder x, y, z' instead.",
  9. "For details see https://github.com/diffplug/spotless/tree/master/plugin-gradle#applying-to-java-source"));
  10. importOrder(importOrder.toArray(new String[0]));
  11. }

代码示例来源:origin: diffplug/spotless

  1. /** Use {@link #eclipse(String)} instead */
  2. @Deprecated
  3. public void eclipseFormatFile(String eclipseVersion, Object eclipseFormatFile) {
  4. Objects.requireNonNull(eclipseVersion, "eclipseVersion");
  5. Objects.requireNonNull(eclipseFormatFile, "eclipseFormatFile");
  6. getProject().getLogger().warn(
  7. StringPrinter.buildStringFromLines(
  8. "'eclipseFormatFile [version] <file>' is deprecated.",
  9. "Use 'eclipse([version]).configFile(<file>)' instead.",
  10. "For details see https://github.com/diffplug/spotless/tree/master/plugin-gradle#applying-to-java-source"));
  11. eclipse(eclipseVersion).configFile(eclipseFormatFile);
  12. }

代码示例来源:origin: diffplug/spotless

  1. /** Method interface has been changed to
  2. * {@link JavaExtension#importOrder(String...)}.*/
  3. @Deprecated
  4. public void importOrder(List<String> importOrder) {
  5. getProject().getLogger().warn(
  6. StringPrinter.buildStringFromLines(
  7. "'importOrder([x, y, z])' is deprecated.",
  8. "Use 'importOrder x, y, z' instead.",
  9. "For details see https://github.com/diffplug/spotless/tree/master/plugin-gradle#applying-to-java-source"));
  10. addStep(ImportOrderStep.createFromOrder(importOrder));
  11. }

代码示例来源:origin: gradle.plugin.com.s390x/gogradle

  1. @Deprecated
  2. public void setContinueWhenFail(Boolean continueWhenFail) {
  3. LOGGER.warn("continueWhenFail is deprecated, please use continueOnFailure instead.");
  4. this.continueOnFailure = continueWhenFail;
  5. }

代码示例来源:origin: org.sonarsource.scanner.gradle/sonarqube-gradle-plugin

  1. private static boolean isSkippedWithProperty(Map<String, String> properties) {
  2. if ("true".equalsIgnoreCase(properties.getOrDefault(ScanProperties.SKIP, "false"))) {
  3. LOGGER.warn("SonarQube Scanner analysis skipped");
  4. return true;
  5. }
  6. return false;
  7. }

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

  1. @Override
  2. public void projectsEvaluated(Gradle gradle) {
  3. if (gradle.getParent() == null && !collected) {
  4. LOGGER.warn(
  5. "Build scan cannot be created because the build scan plugin was not applied.\n"
  6. + "For more information on how to apply the build scan plugin, please visit " + HELP_LINK + "."
  7. );
  8. }
  9. }
  10. });

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

  1. private void warnDeprecation(String old, String new_)
  2. {
  3. plugin.project.getLogger().warn("Warning, {} is deprecated! You should use {} instead.", old, new_);
  4. }
  5. }

代码示例来源:origin: de.carne.common/java-gradle-plugins

  1. private String write(String format, Object... args) {
  2. String message = String.format(format, args);
  3. this.project.getLogger().warn(message);
  4. return message;
  5. }

代码示例来源:origin: com.android.tools.build/gradle-core

  1. private static void invalidNdkWarning(String message, File ndkDir) {
  2. Logging.getLogger(NdkHandler.class).warn(
  3. "{}\n"
  4. + "If you are using NDK, verify the ndk.dir is set to a valid NDK "
  5. + "directory. It is currently set to {}.\n"
  6. + "If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME "
  7. + "or local.properties to remove this warning.\n",
  8. message,
  9. ndkDir.getAbsolutePath());
  10. }

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

  1. /** Deprecated in favor of "services". */
  2. @Deprecated
  3. public void setAppYamls(Object appYamls) {
  4. project
  5. .getLogger()
  6. .warn(
  7. "'appYamls' is deprecated, this parameter will set 'services'."
  8. + " Use 'services' in the future.");
  9. setServices(appYamls);
  10. }

代码示例来源:origin: gradle.plugin.com.github.rmee/helm

  1. public void exec(HelmExecSpec spec) {
  2. project.getLogger().warn("Executing: " + spec.getCommandLine());
  3. if (kubeConfig != null) {
  4. kubeConfig.getParentFile().mkdirs();
  5. }
  6. client.exec(spec);
  7. }

代码示例来源:origin: io.freefair.gradle/jsass-gradle-plugin

  1. @WarnFunction
  2. @SuppressWarnings("unused")
  3. public void warn(String message) {
  4. getLogger().warn(message);
  5. }

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

  1. private String getMainClass(String moduleName, JavaExec execTask) {
  2. String main;
  3. if (!execTask.getMain().contains("/")) {
  4. LOGGER.warn("No module was provided for main class, assuming the current module. Prefer providing 'mainClassName' in the following format: '$moduleName/a.b.Main'");
  5. main = moduleName + "/" + execTask.getMain();
  6. } else {
  7. main = execTask.getMain();
  8. }
  9. return main;
  10. }

代码示例来源:origin: gradle.plugin.de.heinrichmarkus.gradle/dbp

  1. @TaskAction
  2. public void assemble() {
  3. if (!assemblyConfiguration.getItems().isEmpty()) {
  4. File destFile = calcDestFile();
  5. deleteIfExists(destFile);
  6. reportOptionalMissingFiles(assemblyConfiguration.getItems());
  7. ZipAdapter.create(assemblyConfiguration.getItems(), destFile);
  8. getLogger().lifecycle(String.format("%s created", destFile));
  9. } else {
  10. getLogger().warn("Nothing to assemble!");
  11. }
  12. }

代码示例来源:origin: gradle.plugin.org.wildfly.build/wildfly-gradle-tools

  1. private void addDefaultRepositories(String artifactLabel) {
  2. logger.warn( "Error fetching WildFly component '{}' from configured repositories; check your repository configurations to prevent this problem.\nAttempting to resolve this by enabling additional repositories automatically! Adding: [mavenLocal(), mavenCentral() and {}]", artifactLabel, JBOSS_REPOSITORY );
  3. final RepositoryHandler repositories = project.getRepositories();
  4. repositories.mavenLocal();
  5. repositories.mavenCentral();
  6. repositories.maven( mavenArtifactRepository -> {
  7. mavenArtifactRepository.setUrl( JBOSS_REPOSITORY );
  8. } );
  9. }

相关文章