Skip to content

Commit

Permalink
Merge pull request #705 from asciidoctor/development-4.x
Browse files Browse the repository at this point in the history
Ready for 4.0.1 to go to master
  • Loading branch information
aalmiray authored Jan 9, 2024
2 parents d59ca0d + 73a98b2 commit 13b8663
Show file tree
Hide file tree
Showing 24 changed files with 406 additions and 361 deletions.
77 changes: 28 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,47 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
# Licensing
- name: Licensing
uses: gradle/gradle-build-action@v2
- uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain -S license
# Coding style
gradle-home-cache-cleanup: true
- name: Licensing
run: ./gradlew --console=plain -S license
- name: Coding style
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain -S codenarcAll
run: ./gradlew --console=plain -S codenarcAll
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
# use a short path to avoid exceeding the path limit on Windows... sigh
with:
path: 'w'
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Cache offline repository
uses: actions/cache@v3
with:
path: testfixtures/offline-repo/build/repo
key: ${{ runner.os }}-offline-repo-${{ hashFiles('module-versions.properties') }}
restore-keys: ${{ runner.os }}-offline-repo-
# Build
- name: Build offline repository
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
run: ./gradlew --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain --warning-mode=all -s clean assemble
# Test
run: ./gradlew --console=plain --warning-mode=all -s clean assemble
# TODO: Resolve the gem integration test issue. See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/694
- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain --warning-mode=all -s check --no-parallel -Djava.net.preferIPv4Stack=true -x gradleTest -x :asciidoctor-gradle-jvm-gems:IntTest --scan
run: ./gradlew --console=plain --warning-mode=all -s check --no-parallel -x gradleTest -x :asciidoctor-gradle-jvm-gems:IntTest --scan
env:
JAVA_TOOL_OPTIONS: -Djava.net.preferIPv4Stack=true
# Stop gradlew to avoid locking issues
- name: Cleanup
uses: gradle/gradle-build-action@v2
with:
arguments: --stop
run: ./gradlew --stop
build:
strategy:
matrix:
Expand All @@ -65,40 +54,30 @@ jobs:
# java: [ 8, 11 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: zulu
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Cache offline repository
uses: actions/cache@v3
with:
path: testfixtures/offline-repo/build/repo
key: ${{ runner.os }}-offline-repo-${{ hashFiles('module-versions.properties') }}
restore-keys: ${{ runner.os }}-offline-repo-
- name: Build offline repository
uses: gradle/gradle-build-action@v2
with:
arguments: --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
# Build
run: ./gradlew --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: -i -S --console=plain --no-build-cache assemble
# Integration tests
run: ./gradlew -i -S --console=plain --no-build-cache assemble
- name: Integration tests (without slides)
uses: gradle/gradle-build-action@v2
with:
arguments: -i -s --console=plain --no-build-cache test intTest remoteTest --scan
run: ./gradlew -i -s --console=plain --no-build-cache test intTest remoteTest --scan
# arguments: -i -s --console=plain --no-build-cache test intTest remoteTest -x asciidoctor-gradle-jvm-slides:intTest
# arguments: -i -s --console=plain --no-build-cache test intTest remoteTest -x asciidoctor-gradle-slides-export:intTest -x asciidoctor-gradle-jvm-slides:intTest
# TODO: See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/695
# - name: Integration tests (slides only)
# uses: eskatos/gradle-command-action@v2
# with:
# arguments: -i -s --console=plain --no-build-cache test asciidoctor-gradle-jvm-slides:intTest asciidoctor-gradle-slides-export:intTest
# Gradle tests
# uses: ./gradlew -i -s --console=plain --no-build-cache test asciidoctor-gradle-jvm-slides:intTest asciidoctor-gradle-slides-export:intTest
- name: Gradle tests
uses: gradle/gradle-build-action@v2
with:
arguments: -i -s --console=plain --no-build-cache gradleTest --scan
run: ./gradlew -i -s --console=plain --no-build-cache gradleTest --scan
20 changes: 9 additions & 11 deletions .github/workflows/push-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- name: Combine documentation
uses: gradle/gradle-build-action@v2
- uses: gradle/gradle-build-action@v2
with:
build-root-directory: docs
arguments: --console=plain -q combineDocs
gradle-home-cache-cleanup: true
- run: cd docs
- name: Combine documentation
run: ./gradlew --console=plain -q combineDocs
- name: Publish documentation
uses: gradle/gradle-build-action@v2
with:
build-root-directory: docs
arguments: "--console=plain --info :antora:publishDocs :gh-pages:publishDocs
run: ./gradlew --console=plain --info :antora:publishDocs :gh-pages:publishDocs
-Dorg.ajoberstar.grgit.auth.username=${{ secrets.GITHUB_PUBLISH_USER }}
-Dorg.ajoberstar.grgit.auth.password=${{ secrets.GITHUB_PUBLISH_KEY }}
-Dorg.ajoberstar.grgit.auth.force=hardcoded"
-Dorg.ajoberstar.grgit.auth.force=hardcoded
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<? super File> ACCEPT_ONLY_FILES = new Spec<File>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -36,8 +35,7 @@ class DeprecatedFeatures implements Plugin<Project> {

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 {
Expand Down
25 changes: 13 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
*/

plugins {
id 'net.nemerosa.versioning' version '2.6.1' apply false
id 'com.github.ben-manes.versions' version '0.17.0' apply false
id 'net.nemerosa.versioning' version '2.15.1' apply false
id 'com.github.ben-manes.versions' version '0.50.0' apply false
id 'com.github.hierynomus.license' version '0.16.1' apply false
id 'com.github.kt3k.coveralls' version '2.8.2' apply false
id 'net.ossindex.audit' version '0.1.1' apply false
id 'com.github.kt3k.coveralls' version '2.12.2' apply false
id 'net.ossindex.audit' version '0.4.11' apply false
id 'org.kordamp.jdeps' version '0.2.0' apply false
id 'fi.linuxbox.download.worker' version '0.3' apply false
id 'fi.linuxbox.download.worker' version '0.4' apply false
id 'org.ysb33r.ivypot' version '1.0.0' apply false
id 'org.ysb33r.os' version '0.9' apply false
id 'org.ysb33r.cloudci' version '2.5' apply false
id 'org.ysb33r.cloudci.appveyor.testreporter' version '2.5' apply false
id 'org.ysb33r.gradletest' version '3.0.0-alpha.3' apply false
id 'org.ysb33r.os' version '1.0.0' apply false
id 'org.ysb33r.cloudci' version '4.0.0' apply false
id 'org.ysb33r.cloudci.appveyor.testreporter' version '4.0.0' apply false
id 'org.ysb33r.gradletest' version '3.0.0-alpha.4' apply false
id 'idea'
}

Expand Down Expand Up @@ -145,9 +145,10 @@ subprojects {
}
}

compileGroovy {
sourceCompatibility = project.sourceCompatibility
targetCompatibility = project.targetCompatibility
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}

project.tasks.withType(Test) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class AsciidoctorGradleGroovyProject implements Plugin<Project> {
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}"
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'idea'
id 'org.asciidoctor.jvm.convert' apply false
id 'org.asciidoctor.editorconfig' apply false
id 'org.ajoberstar.git-publish' version '2.1.1' apply false
id 'org.ajoberstar.git-publish' version '4.2.1' apply false
}

repositories {
Expand Down
12 changes: 5 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
version = 4.0.0
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.
Expand All @@ -10,16 +8,16 @@ project_issues = https://github.com/asciidoctor/asciidoctor-gradle-plugin/i
project_vcs = https://github.com/asciidoctor/asciidoctor-gradle-plugin.git

cglibVersion = 3.3.0
jsoupVersion = 1.13.1
jsoupVersion = 1.17.2
spockVersion = 2.3-groovy-3.0
grolifantVersion = 2.2.1
grolifantVersion = 2.2.3
jacocoVersion = 0.8.6
codenarcVersion = 3.3.0
nodejsGradleVersion = 2.2.0
pluginJrubySimpleVersion = 1.0.0
pluginJrubySimpleVersion = 1.0.1
pluginPublishPlugin = 1.2.1

org.gradle.daemon = true
org.gradle.caching = true
org.gradle.parallel = true

org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=768m
8 changes: 4 additions & 4 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tasks.named('jar', Jar) {
ext {
pomConfig = {
name project.name
description project.project_description
// description project.project_description
url project.project_website
inceptionYear '2013'
licenses {
Expand Down Expand Up @@ -115,9 +115,9 @@ ext {
}

publishing.publications.withType(MavenPublication).configureEach {
pom.withXml {
asNode().appendNode('description', project.project_description)
}
// pom.withXml {
// asNode().appendNode('description', project.project_description)
// }
}

pluginBundle {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion jvm/src/gradleTest/complex-jvm-setup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {

asciidoctorj {
modules {
diagram.version '1.5.16'
diagram.version '1.5.16'
}
logLevel 'INFO'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id 'groovy'
}


dependencies {
compileOnly "org.codehaus.groovy:groovy:${System.getProperty('GROOVY_VERSION')}"
compileOnly "org.asciidoctor:asciidoctorj:${System.getProperty('ASCIIDOCTORJ_VERSION')}"
Expand Down
Loading

0 comments on commit 13b8663

Please sign in to comment.