diff --git a/src/main/java/com/ly/doc/gradle/chain/CommonArtifactFilterChain.java b/src/main/java/com/ly/doc/gradle/chain/CommonArtifactFilterChain.java index 99494db..c7019ed 100644 --- a/src/main/java/com/ly/doc/gradle/chain/CommonArtifactFilterChain.java +++ b/src/main/java/com/ly/doc/gradle/chain/CommonArtifactFilterChain.java @@ -90,6 +90,7 @@ public boolean ignoreArtifactById(CustomArtifact artifact) { case "java-driver-core": case "java-driver-query-builder": case "java-driver-mapper-runtime": + case "resteasy-core": return true; default: return this.ignore(filterChain, artifact); diff --git a/src/main/java/com/ly/doc/gradle/extension/SmartDocPluginExtension.java b/src/main/java/com/ly/doc/gradle/extension/SmartDocPluginExtension.java index 17d11a6..e6c581c 100644 --- a/src/main/java/com/ly/doc/gradle/extension/SmartDocPluginExtension.java +++ b/src/main/java/com/ly/doc/gradle/extension/SmartDocPluginExtension.java @@ -50,7 +50,7 @@ public class SmartDocPluginExtension { /** * Whether build documents incrementally or not */ - private boolean increment = false; + private Boolean increment = false; /** * Smart doc config file, like smart-doc.json @@ -96,11 +96,11 @@ public Set getInclude() { return include; } - public boolean isIncrement() { + public Boolean getIncrement() { return increment; } - public void setIncrement(boolean increment) { + public void setIncrement(Boolean increment) { this.increment = increment; } } diff --git a/src/main/java/com/ly/doc/gradle/task/DocBaseTask.java b/src/main/java/com/ly/doc/gradle/task/DocBaseTask.java index 5d75d11..9f69c05 100644 --- a/src/main/java/com/ly/doc/gradle/task/DocBaseTask.java +++ b/src/main/java/com/ly/doc/gradle/task/DocBaseTask.java @@ -103,7 +103,7 @@ public void action() { if (Objects.isNull(file)) { file = new File(GlobalConstants.DEFAULT_CONFIG); } - boolean increment = pluginExtension.isIncrement(); + Boolean increment = pluginExtension.getIncrement(); ApiConfig apiConfig = GradleUtil.buildConfig(file, project, increment, logger); if (apiConfig == null) { logger.quiet(GlobalConstants.ERROR_MSG); diff --git a/src/main/java/com/ly/doc/gradle/util/GradleUtil.java b/src/main/java/com/ly/doc/gradle/util/GradleUtil.java index 5c25e0e..8fb8be1 100644 --- a/src/main/java/com/ly/doc/gradle/util/GradleUtil.java +++ b/src/main/java/com/ly/doc/gradle/util/GradleUtil.java @@ -64,7 +64,7 @@ public boolean shouldSkipClass(Class aClass) { * @param log gradle plugin log * @return com.power.doc.model.ApiConfig */ - public static ApiConfig buildConfig(File configFile, Project project, boolean increment, Logger log) { + public static ApiConfig buildConfig(File configFile, Project project, Boolean increment, Logger log) { try { ClassLoader classLoader = ClassLoaderUtil.getRuntimeClassLoader(project); String data = FileUtil.getFileContent(new FileInputStream(configFile)); @@ -110,8 +110,11 @@ public static ApiConfig buildConfig(File configFile, Project project, boolean in apiConfig.setProjectName(project.getName()); } addSourcePaths(project, apiConfig, log); + if (Objects.nonNull(increment)) { + // overwrite by plugin + apiConfig.setIncrement(increment); + } - apiConfig.setIncrement(increment); apiConfig.setBaseDir(project.getProjectDir().getAbsolutePath()); return apiConfig;