本文整理了Java中org.gradle.api.logging.Logger.warn()
方法的一些代码示例,展示了Logger.warn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.warn()
方法的具体详情如下:
包路径:org.gradle.api.logging.Logger
类名称:Logger
方法名:warn
暂无
代码示例来源:origin: hibernate/hibernate-orm
logger.warn( "Problem preparing class file for writing out enhancements [" + file.getName() + "]" );
代码示例来源:origin: hibernate/hibernate-orm
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
private void applyEnhancement(final Project project, final HibernateExtension hibernateExtension) {
if ( !hibernateExtension.enhance.shouldApply() ) {
project.getLogger().warn( "Skipping Hibernate bytecode enhancement since no feature is enabled" );
return;
代码示例来源:origin: diffplug/spotless
/** Makes it possible to remove a format which was created earlier. */
public void removeFormat(String name) {
requireNonNull(name);
FormatExtension toRemove = formats.remove(name);
if (toRemove == null) {
project.getLogger().warn("Called removeFormat('" + name + "') but there was no such format.");
}
}
代码示例来源:origin: diffplug/spotless
private void fixParserToTypescript() {
if (this.prettierConfig == null) {
this.prettierConfig = Collections.singletonMap("parser", "typescript");
} else {
final Object replaced = this.prettierConfig.put("parser", "typescript");
if (replaced != null) {
getProject().getLogger().warn("overriding parser option to 'typescript'. Was set to '{}'", replaced);
}
}
}
}
代码示例来源:origin: diffplug/spotless
/** Method interface has been changed to
* {@link GroovyExtension#importOrder(String...)}.*/
@Deprecated
public void importOrder(List<String> importOrder) {
getProject().getLogger().warn(
StringPrinter.buildStringFromLines(
"'importOrder([x, y, z])' is deprecated.",
"Use 'importOrder x, y, z' instead.",
"For details see https://github.com/diffplug/spotless/tree/master/plugin-gradle#applying-to-java-source"));
importOrder(importOrder.toArray(new String[0]));
}
代码示例来源:origin: diffplug/spotless
/** Use {@link #eclipse(String)} instead */
@Deprecated
public void eclipseFormatFile(String eclipseVersion, Object eclipseFormatFile) {
Objects.requireNonNull(eclipseVersion, "eclipseVersion");
Objects.requireNonNull(eclipseFormatFile, "eclipseFormatFile");
getProject().getLogger().warn(
StringPrinter.buildStringFromLines(
"'eclipseFormatFile [version] <file>' is deprecated.",
"Use 'eclipse([version]).configFile(<file>)' instead.",
"For details see https://github.com/diffplug/spotless/tree/master/plugin-gradle#applying-to-java-source"));
eclipse(eclipseVersion).configFile(eclipseFormatFile);
}
代码示例来源:origin: diffplug/spotless
/** Method interface has been changed to
* {@link JavaExtension#importOrder(String...)}.*/
@Deprecated
public void importOrder(List<String> importOrder) {
getProject().getLogger().warn(
StringPrinter.buildStringFromLines(
"'importOrder([x, y, z])' is deprecated.",
"Use 'importOrder x, y, z' instead.",
"For details see https://github.com/diffplug/spotless/tree/master/plugin-gradle#applying-to-java-source"));
addStep(ImportOrderStep.createFromOrder(importOrder));
}
代码示例来源:origin: gradle.plugin.com.s390x/gogradle
@Deprecated
public void setContinueWhenFail(Boolean continueWhenFail) {
LOGGER.warn("continueWhenFail is deprecated, please use continueOnFailure instead.");
this.continueOnFailure = continueWhenFail;
}
代码示例来源:origin: org.sonarsource.scanner.gradle/sonarqube-gradle-plugin
private static boolean isSkippedWithProperty(Map<String, String> properties) {
if ("true".equalsIgnoreCase(properties.getOrDefault(ScanProperties.SKIP, "false"))) {
LOGGER.warn("SonarQube Scanner analysis skipped");
return true;
}
return false;
}
代码示例来源:origin: org.gradle/gradle-core
@Override
public void projectsEvaluated(Gradle gradle) {
if (gradle.getParent() == null && !collected) {
LOGGER.warn(
"Build scan cannot be created because the build scan plugin was not applied.\n"
+ "For more information on how to apply the build scan plugin, please visit " + HELP_LINK + "."
);
}
}
});
代码示例来源:origin: MinecraftForge/ForgeGradle
private void warnDeprecation(String old, String new_)
{
plugin.project.getLogger().warn("Warning, {} is deprecated! You should use {} instead.", old, new_);
}
}
代码示例来源:origin: de.carne.common/java-gradle-plugins
private String write(String format, Object... args) {
String message = String.format(format, args);
this.project.getLogger().warn(message);
return message;
}
代码示例来源:origin: com.android.tools.build/gradle-core
private static void invalidNdkWarning(String message, File ndkDir) {
Logging.getLogger(NdkHandler.class).warn(
"{}\n"
+ "If you are using NDK, verify the ndk.dir is set to a valid NDK "
+ "directory. It is currently set to {}.\n"
+ "If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME "
+ "or local.properties to remove this warning.\n",
message,
ndkDir.getAbsolutePath());
}
代码示例来源:origin: com.google.cloud.tools/appengine-gradle-plugin
/** Deprecated in favor of "services". */
@Deprecated
public void setAppYamls(Object appYamls) {
project
.getLogger()
.warn(
"'appYamls' is deprecated, this parameter will set 'services'."
+ " Use 'services' in the future.");
setServices(appYamls);
}
代码示例来源:origin: gradle.plugin.com.github.rmee/helm
public void exec(HelmExecSpec spec) {
project.getLogger().warn("Executing: " + spec.getCommandLine());
if (kubeConfig != null) {
kubeConfig.getParentFile().mkdirs();
}
client.exec(spec);
}
代码示例来源:origin: io.freefair.gradle/jsass-gradle-plugin
@WarnFunction
@SuppressWarnings("unused")
public void warn(String message) {
getLogger().warn(message);
}
代码示例来源:origin: gradle.plugin.org.javamodularity/moduleplugin
private String getMainClass(String moduleName, JavaExec execTask) {
String main;
if (!execTask.getMain().contains("/")) {
LOGGER.warn("No module was provided for main class, assuming the current module. Prefer providing 'mainClassName' in the following format: '$moduleName/a.b.Main'");
main = moduleName + "/" + execTask.getMain();
} else {
main = execTask.getMain();
}
return main;
}
代码示例来源:origin: gradle.plugin.de.heinrichmarkus.gradle/dbp
@TaskAction
public void assemble() {
if (!assemblyConfiguration.getItems().isEmpty()) {
File destFile = calcDestFile();
deleteIfExists(destFile);
reportOptionalMissingFiles(assemblyConfiguration.getItems());
ZipAdapter.create(assemblyConfiguration.getItems(), destFile);
getLogger().lifecycle(String.format("%s created", destFile));
} else {
getLogger().warn("Nothing to assemble!");
}
}
代码示例来源:origin: gradle.plugin.org.wildfly.build/wildfly-gradle-tools
private void addDefaultRepositories(String artifactLabel) {
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 );
final RepositoryHandler repositories = project.getRepositories();
repositories.mavenLocal();
repositories.mavenCentral();
repositories.maven( mavenArtifactRepository -> {
mavenArtifactRepository.setUrl( JBOSS_REPOSITORY );
} );
}
内容来源于网络,如有侵权,请联系作者删除!