From d60b01196f7536f10bb720a6e170e16b5e4bade4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 23:11:35 +0800 Subject: [PATCH] Gradle 7.6.3 * chore(deps): update dependency gradle to v7.6.3 * Migrate Copy task * Remove outdated Gradle version checkers * Try to fix `Can generate a asciidoctorconfigfile` * Remove sourceCompatibility & targetCompatibility after using toolchain --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Goooler --- .../AsciidoctorEditorConfigIntegrationSpec.groovy | 7 +++++-- .../org/asciidoctor/gradle/base/AsciidoctorUtils.groovy | 3 --- .../gradle/base/internal/DeprecatedFeatures.groovy | 4 +--- build.gradle | 5 ----- .../src/main/groovy/AsciidoctorGradleGroovyProject.groovy | 4 ++-- gradle.properties | 2 -- gradle/wrapper/gradle-wrapper.properties | 2 +- .../slides/export/base/AbstractExportBaseTask.groovy | 7 +------ 8 files changed, 10 insertions(+), 24 deletions(-) diff --git a/asciidoctoreditorconfig/src/intTest/groovy/org/asciidoctor/gradle/editorconfig/AsciidoctorEditorConfigIntegrationSpec.groovy b/asciidoctoreditorconfig/src/intTest/groovy/org/asciidoctor/gradle/editorconfig/AsciidoctorEditorConfigIntegrationSpec.groovy index 4711b45dc..cc9a89c5a 100644 --- a/asciidoctoreditorconfig/src/intTest/groovy/org/asciidoctor/gradle/editorconfig/AsciidoctorEditorConfigIntegrationSpec.groovy +++ b/asciidoctoreditorconfig/src/intTest/groovy/org/asciidoctor/gradle/editorconfig/AsciidoctorEditorConfigIntegrationSpec.groovy @@ -34,9 +34,12 @@ class AsciidoctorEditorConfigIntegrationSpec extends FunctionalSpecification { File attrFile = new File(projectDir, 'inputs.adoc') attrFile.text = ":${key3}: ${value3}\n" + new File(projectDir, 'gradle.properties').text = """ + group=${groupName} + version=${projVer} + """.stripIndent() + getGroovyBuildFile(""" - group = '${groupName}' - version = '${projVer}' apply plugin : 'org.asciidoctor.jvm.base' asciidoctorj { diff --git a/base/src/main/groovy/org/asciidoctor/gradle/base/AsciidoctorUtils.groovy b/base/src/main/groovy/org/asciidoctor/gradle/base/AsciidoctorUtils.groovy index 20f36750a..32beaa4d2 100644 --- a/base/src/main/groovy/org/asciidoctor/gradle/base/AsciidoctorUtils.groovy +++ b/base/src/main/groovy/org/asciidoctor/gradle/base/AsciidoctorUtils.groovy @@ -27,7 +27,6 @@ import org.gradle.api.provider.Property import org.gradle.api.provider.Provider import org.gradle.api.specs.Spec import org.gradle.api.tasks.util.PatternSet -import org.gradle.util.GradleVersion import org.ysb33r.grolifant.api.core.OperatingSystem import org.ysb33r.grolifant.api.core.ProjectOperations @@ -48,8 +47,6 @@ class AsciidoctorUtils { public static final OperatingSystem OS = OperatingSystem.current() public static final String UNDERSCORE_LED_FILES = '**/_*' public static final PatternSet UNDERSCORE_LED_PATTERN = new PatternSet().include(UNDERSCORE_LED_FILES) - public static final boolean GRADLE_LT_5_0 = GradleVersion.current() < GradleVersion.version('5.0') - public static final boolean GRADLE_LT_5_1 = GradleVersion.current() < GradleVersion.version('5.1') static final Spec ACCEPT_ONLY_FILES = new Spec() { @Override diff --git a/base/src/main/groovy/org/asciidoctor/gradle/base/internal/DeprecatedFeatures.groovy b/base/src/main/groovy/org/asciidoctor/gradle/base/internal/DeprecatedFeatures.groovy index c6d207a70..b1bf24b54 100644 --- a/base/src/main/groovy/org/asciidoctor/gradle/base/internal/DeprecatedFeatures.groovy +++ b/base/src/main/groovy/org/asciidoctor/gradle/base/internal/DeprecatedFeatures.groovy @@ -21,7 +21,6 @@ import org.gradle.api.NamedDomainObjectContainer import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.plugins.ExtraPropertiesExtension -import org.gradle.util.GradleVersion /** * A simplified way of grouping deprecation messages. @@ -36,8 +35,7 @@ class DeprecatedFeatures implements Plugin { private static final String EXTENSION_NAME = '$$asciidoctor-deprecated-features$$' private static final String BASE_MESSAGE = 'You are using one or more deprecated Asciidoctor Gradle plugin features.' - private static final boolean GRADLE_4_5_OR_LATER = GradleVersion.current() >= GradleVersion.version('4.5') - private static final String COMMAND_LINE = GRADLE_4_5_OR_LATER ? '--warning-mode=all' : '-i or --info' + private static final String COMMAND_LINE = '--warning-mode=all' static void addDeprecationMessage(Project project, String identifier, String message) { try { diff --git a/build.gradle b/build.gradle index ac381bd8e..9e67e2716 100644 --- a/build.gradle +++ b/build.gradle @@ -145,11 +145,6 @@ subprojects { } } - compileGroovy { - sourceCompatibility = project.sourceCompatibility - targetCompatibility = project.targetCompatibility - } - java { toolchain { languageVersion = JavaLanguageVersion.of(8) diff --git a/buildSrc/src/main/groovy/AsciidoctorGradleGroovyProject.groovy b/buildSrc/src/main/groovy/AsciidoctorGradleGroovyProject.groovy index 1bdb1f11b..cf9f97c75 100644 --- a/buildSrc/src/main/groovy/AsciidoctorGradleGroovyProject.groovy +++ b/buildSrc/src/main/groovy/AsciidoctorGradleGroovyProject.groovy @@ -29,8 +29,8 @@ class AsciidoctorGradleGroovyProject implements Plugin { SourceSetContainer sourceSets = project.extensions.getByType(SourceSetContainer) SourceSet main = sourceSets.getByName('main') - project.tasks.named(main.processResourcesTaskName).configure { Copy copy -> - copy.from generateModuleVersions, { CopySpec cs -> + project.tasks.named(main.processResourcesTaskName, Copy).configure { copy -> + copy.from(generateModuleVersions.get().outputs.files) { CopySpec cs -> cs.into "${ModuleVersions.INTERMEDIATE_FOLDER_PATH}" } } diff --git a/gradle.properties b/gradle.properties index c8b9c2174..3d7cd2cb4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,5 @@ version = 4.0.1 group = org.asciidoctor -sourceCompatibility = 1.8 -targetCompatibility = 1.8 copyrightYear = 2013-2024 project_description = A Gradle plugin suite that uses Asciidoctor via JRuby/Node.js to process AsciiDoc source files within the project. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f80bbf51..068cdb2dc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/slides-export/src/main/groovy/org/asciidoctor/gradle/slides/export/base/AbstractExportBaseTask.groovy b/slides-export/src/main/groovy/org/asciidoctor/gradle/slides/export/base/AbstractExportBaseTask.groovy index fc3b0e2c8..ece96d51c 100644 --- a/slides-export/src/main/groovy/org/asciidoctor/gradle/slides/export/base/AbstractExportBaseTask.groovy +++ b/slides-export/src/main/groovy/org/asciidoctor/gradle/slides/export/base/AbstractExportBaseTask.groovy @@ -29,12 +29,10 @@ import org.gradle.api.provider.Provider import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFiles import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.PathSensitive import org.gradle.api.tasks.SkipWhenEmpty import org.gradle.api.tasks.options.Option -import org.gradle.util.GradleVersion import org.ysb33r.grolifant.api.core.ProjectOperations import java.util.concurrent.Callable @@ -46,7 +44,6 @@ import static org.gradle.api.tasks.PathSensitivity.RELATIVE */ @CompileStatic abstract class AbstractExportBaseTask extends DefaultTask { - private final static boolean GRADLE_GE_4_8 = GradleVersion.current() >= GradleVersion.version('4.8') private final static String HTML_EXT = '.html' private final List slideInputFiles = [] private final ProjectOperations projectOperations @@ -280,10 +277,8 @@ abstract class AbstractExportBaseTask extends DefaultTask { dependsOn tasks.findAll { if (it instanceof Task) { true - } else if (GRADLE_GE_4_8) { - it instanceof org.gradle.api.tasks.TaskProvider } else { - false + it instanceof org.gradle.api.tasks.TaskProvider } }.toSet() }