Skip to content

Commit

Permalink
Baseline 4.0.0 codebase
Browse files Browse the repository at this point in the history
- Upgraded Grolifant libray and adjusted use of ProjectOperations
  to avoid messages about configuration cache.
  Also updated package names where there were breaking changes.
- Updated NPM modules for exporting slides.
- Changed many 'compile' configurations to 'implementation' or
  'api'. Some are still there and needs fixing.
  • Loading branch information
ysb33r committed Aug 23, 2022
1 parent 5925e41 commit 2b79b6f
Show file tree
Hide file tree
Showing 85 changed files with 450 additions and 437 deletions.
40 changes: 2 additions & 38 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ test:integration_slides:
expire_in: 10 days
when: on_failure

test:gradle_4.9,4.10.2:
test:gradle_7.0.2,7.1.1,7.3.3:
stage: test
image: $JDK11_TEST_IMAGE
except:
Expand All @@ -136,43 +136,7 @@ test:gradle_4.9,4.10.2:
expire_in: 10 days
when: on_failure

test:gradle_5.0,5.1.1,5.3.1:
stage: test
image: $JDK11_TEST_IMAGE
except:
- pages
- gh-pages
- tags
dependencies:
- testrepo
- jdk11
script: ./run-compatibility-test-on-ci.sh
artifacts:
paths:
- '*/build/reports'
- '*/build/jacoco'
expire_in: 10 days
when: on_failure

test:gradle_5.4.1,5.5.1,5.6.4:
stage: test
image: $JDK12_TEST_IMAGE
except:
- pages
- gh-pages
- tags
dependencies:
- testrepo
- jdk11
script: ./run-compatibility-test-on-ci.sh
artifacts:
paths:
- '*/build/reports'
- '*/build/jacoco'
expire_in: 10 days
when: on_failure

test:gradle_6.0.1:
test:gradle_7.4.2,7.5.1:
stage: test
image: $JDK12_TEST_IMAGE
except:
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ The {doctitle} is the official means of using {asciidoctor-url}[Asciidoctor] to
Documentation:: We are migrating our documentation to the new Asciidoctor Antora-based site when it is ready. In the meantime you can read a snapshot of the new documentation at {asciidoctor-development-docs}{github-branch}

ifdef::env-github[]
Structure:: `master` now represents the code for the latest 3.x release of these plugins. Development for for 3.x is against the link:https://github.com/asciidoctor/asciidoctor-gradle-plugin/tree/development-3.x[{github-branch}] branch. PRs are preferably taking against this branch. The 2.x & 1.5.x series of the plugin is now in maintenance only mode. PRs for that should be raised against the respective link:https://github.com/asciidoctor/asciidoctor-gradle-plugin/tree/maintenance-2.x[maintenance-2.x] and https://github.com/asciidoctor/asciidoctor-gradle-plugin/tree/maintenance-1.5[maintenance-1.5] branches.
Structure:: `master` now represents the code for the latest 3.x release of these plugins. Development for for 4.x is against the link:https://github.com/asciidoctor/asciidoctor-gradle-plugin/tree/development-4.x[{github-branch}] branch. PRs are preferably taking against this branch. The 2.x & 1.5.x series of the plugin is now in maintenance only mode. PRs for that should be raised against the respective link:https://github.com/asciidoctor/asciidoctor-gradle-plugin/tree/maintenance-2.x[maintenance-2.x] and https://github.com/asciidoctor/asciidoctor-gradle-plugin/tree/maintenance-1.5[maintenance-1.5] branches.
endif::[]

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import org.gradle.api.tasks.TaskAction

import java.util.concurrent.Callable

import static org.ysb33r.grolifant.api.MapUtils.stringizeValues
import static org.ysb33r.grolifant.api.v4.MapUtils.stringizeValues

/** Generates {@code .asciidoctorconfig} file.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import org.gradle.api.tasks.SkipWhenEmpty
import org.gradle.api.tasks.util.PatternFilterable
import org.gradle.api.tasks.util.PatternSet
import org.gradle.util.GradleVersion
import org.ysb33r.grolifant.api.FileUtils
import org.ysb33r.grolifant.api.StringUtils
import org.ysb33r.grolifant.api.v4.FileUtils
import org.ysb33r.grolifant.api.v4.StringUtils

import java.nio.file.Path
import java.util.concurrent.Callable
Expand All @@ -58,7 +58,7 @@ import static org.asciidoctor.gradle.base.AsciidoctorUtils.executeDelegatingClos
import static org.asciidoctor.gradle.base.AsciidoctorUtils.getSourceFileTree
import static org.asciidoctor.gradle.base.AsciidoctorUtils.mapToDirectoryProvider
import static org.gradle.api.tasks.PathSensitivity.RELATIVE
import static org.ysb33r.grolifant.api.FileUtils.filesFromCopySpec
import static org.ysb33r.grolifant.api.v4.FileUtils.filesFromCopySpec

/** Abstract base task for Asciidoctor that can be shared between AsciidoctorJ and Asciidoctor.js.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import groovy.transform.CompileStatic
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.UnknownDomainObjectException
import org.ysb33r.grolifant.api.git.AbstractCloudGit
import org.ysb33r.grolifant.api.git.GitRepoArchiveDownloader
import org.ysb33r.grolifant.api.v4.git.AbstractCloudGit
import org.ysb33r.grolifant.api.v4.git.GitRepoArchiveDownloader

import static org.asciidoctor.gradle.base.AsciidoctorUtils.executeDelegatingClosure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ package org.asciidoctor.gradle.base
import groovy.transform.CompileStatic
import org.gradle.api.Project
import org.gradle.api.Task
import org.ysb33r.grolifant.api.AbstractCombinedProjectTaskExtension
import org.ysb33r.grolifant.api.v4.AbstractCombinedProjectTaskExtension

import static org.ysb33r.grolifant.api.StringUtils.stringize
import static org.ysb33r.grolifant.api.v4.StringUtils.stringize

/** Base class for implementing extensions in the Asciidoctor Gradle suite.
*
Expand Down Expand Up @@ -249,8 +249,8 @@ abstract class AbstractImplementationEngineExtension
super(project)
this.safeMode = SafeMode.UNSAFE
this.attributes['gradle-project-name'] = project.name
this.attributes['gradle-project-group'] = { project.group ?: '' }
this.attributes['gradle-project-version'] = { project.version ?: '' }
this.attributes['gradle-project-group'] = projectOperations.groupProvider.orElse('')
this.attributes['gradle-project-version'] = projectOperations.versionProvider.orElse('')
this.defaultVersionMap = ModuleVersionLoader.load(moduleResourceName)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.gradle.api.Task
import org.gradle.api.UnknownTaskException
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.diagnostics.DependencyReportTask
import org.ysb33r.grolifant.api.TaskProvider
import org.ysb33r.grolifant.api.v4.TaskProvider

import java.util.regex.Matcher
import java.util.regex.Pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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.OperatingSystem
import org.ysb33r.grolifant.api.core.OperatingSystem

import java.nio.file.Path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package org.asciidoctor.gradle.base
* @since 2.0
*/
@SuppressWarnings('ClassNameSameAsSuperclass')
class GitHubArchive extends org.ysb33r.grolifant.api.git.GitHubArchive {
class GitHubArchive extends org.ysb33r.grolifant.api.v4.git.GitHubArchive {

/** Relative path to locate the them inside the GitHub archive.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package org.asciidoctor.gradle.base
* @since 2.0
*/
@SuppressWarnings('ClassNameSameAsSuperclass')
class GitLabArchive extends org.ysb33r.grolifant.api.git.GitLabArchive {
class GitLabArchive extends org.ysb33r.grolifant.api.v4.git.GitLabArchive {

/** Relative path to locate the them inside the GitLab archive.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package org.asciidoctor.gradle.base

import groovy.transform.CompileStatic
import org.ysb33r.grolifant.api.MapUtils
import org.ysb33r.grolifant.api.v4.MapUtils

/** Loads the versions of Asciidoctor modules that are required for a specific plugin.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import org.asciidoctor.gradle.base.Transform
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.provider.Provider
import org.ysb33r.grolifant.api.StringUtils
import org.ysb33r.grolifant.api.v4.StringUtils

/** Utilities for dealing with Configurations
*
Expand Down
26 changes: 13 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

plugins {
id 'com.gradle.build-scan' version '2.0.2'
// id 'com.gradle.build-scan' version '3.11.1'
id 'com.jfrog.bintray' version '1.8.0' apply false
id 'net.nemerosa.versioning' version '2.6.1' apply false
id 'com.github.ben-manes.versions' version '0.17.0' apply false
Expand All @@ -25,24 +25,24 @@ plugins {
id 'net.ossindex.audit' version '0.1.1' apply false
id 'org.kordamp.jdeps' version '0.2.0' apply false
id 'fi.linuxbox.download.worker' version '0.3' apply false
id 'org.ysb33r.ivypot' version '0.11' apply false
id 'org.ysb33r.ivypot' version '0.13.3' 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 '2.0-rc.4' apply false
id 'org.ysb33r.gradletest' version '2.0' apply false
id 'idea'
}

buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'

buildFinished { buildResult ->
buildScanPublished { scan ->
['curl', '-s', '-d', "message=asciidoctor-gradle-plugin build scan: ${scan.buildScanUri}", 'https://webhooks.gitter.im/e/6ba348eef26407adc22a'].execute()
}
}
}
//buildScan {
// termsOfServiceUrl = 'https://gradle.com/terms-of-service'
// termsOfServiceAgree = 'yes'
//
// buildFinished { buildResult ->
// buildScanPublished { scan ->
// ['curl', '-s', '-d', "message=asciidoctor-gradle-plugin build scan: ${scan.buildScanUri}", 'https://webhooks.gitter.im/e/6ba348eef26407adc22a'].execute()
// }
// }
//}


import org.gradle.util.GradleVersion
Expand Down
9 changes: 5 additions & 4 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ plugins {
apply from: 'gradle/load-gradle-properties.gradle'

repositories {
jcenter()
mavenCentral()
gradlePluginPortal()
}

dependencies {
compile localGroovy()
compile gradleApi()
compile "gradle.plugin.org.ysb33r.gradle:nodejs-gradle-plugin:${gradleProperties.nodejsGradleVersion}"
implementation localGroovy()
implementation gradleApi()
api "org.ysb33r.gradle:nodejs-gradle-plugin:${gradleProperties.nodejsGradleVersion}"
api "org.ysb33r.gradle:grolifant70:${gradleProperties.grolifantVersion}"
}

7 changes: 5 additions & 2 deletions gems/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

dependencies {
compile "com.github.jruby-gradle:jruby-gradle-core-plugin:${jrubyGradleVersion}"
compile project(':asciidoctor-gradle-jvm')
implementation "com.github.jruby-gradle:jruby-gradle-core-plugin:${jrubyGradleVersion}"
api project(':asciidoctor-gradle-jvm')
}

test {
Expand All @@ -15,6 +15,9 @@ gradleTest {
// Expecting external-gems to fail due to JRuby issue
expectFailure ~/external-gems/
}

gradleArguments '-d'

}

configurePlugin 'org.asciidoctor.jvm.gems',
Expand Down
5 changes: 2 additions & 3 deletions gems/src/gradleTest/external-gems/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ repositories {
}

dependencies {
asciidoctorGems 'rubygems:asciidoctor-bibtex:0.3.1'
asciidoctorGems 'rubygems:bibtex-ruby:4.4.7', {
force = true
asciidoctorGems 'rubygems:asciidoctor-bibtex:0.8.0', {
exclude module: 'asciidoctor'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class AsciidoctorGemPrepareTaskCachingFunctionalSpec extends FunctionalSpecifica
private static final String OUTPUT_DIR_PATH = 'build/.asciidoctorGems'
private static final String DEFAULT_GEM_NAME = 'asciidoctor-revealjs'
private static final String DEFAULT_GEM_VERSION = '2.0.0'
private static final String BIBTEX_GEM_NAME = 'asciidoctor-bibtex'
private static final String BIBTEX_GEM_VERSION = '0.8.0'

void setup() {
setupCache()
Expand All @@ -38,6 +40,7 @@ class AsciidoctorGemPrepareTaskCachingFunctionalSpec extends FunctionalSpecifica
asciidoctorGems("rubygems:${DEFAULT_GEM_NAME}:${DEFAULT_GEM_VERSION}") {
exclude module: 'asciidoctor'
}
asciidoctorGems("rubygems:${BIBTEX_GEM_NAME}:${BIBTEX_GEM_VERSION}")
}
""")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import org.apache.commons.io.FileUtils
import org.gradle.testkit.runner.GradleRunner
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import org.ysb33r.grolifant.api.OperatingSystem
import org.ysb33r.grolifant.api.core.OperatingSystem
import spock.lang.Specification

class FunctionalSpecification extends Specification {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import org.gradle.api.Action
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.ysb33r.grolifant.api.TaskProvider
import org.ysb33r.grolifant.api.v4.TaskProvider

import static org.ysb33r.grolifant.api.TaskProvider.registerTask
import static org.ysb33r.grolifant.api.v4.TaskProvider.registerTask

/** Plugin that simplifies that management of external GEMs.
*
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ bintray_dryRun = false
cglibVersion = 3.3.0
jsoupVersion = 1.13.1
spockVersion = 1.3-groovy-2.5
grolifantVersion = 0.16.1
grolifantVersion = 1.3.3
jacocoVersion = 0.8.6
jrubyGradleVersion = 2.0.2
codenarcVersion = 1.3
nodejsGradleVersion = 0.6.2
nodejsGradleVersion = 0.12.3

org.gradle.daemon = true
org.gradle.parallel = true
Expand Down
21 changes: 4 additions & 17 deletions gradle/compatibility-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,14 @@ apply plugin: 'org.ysb33r.gradletest'

pluginManager.withPlugin('org.ysb33r.cloudci') {
ci {
travisci {
gradleTest {
if (JavaVersion.current().java11) {
versions '4.9', '6.7'
} else {
versions '4.9', '6.0.1'
}
}
}
appveyor {
gradleTest {
versions '4.9', '5.0', '5.6.4', '6.0.1', '6.7'
versions '7.0.2', '7.5.1'
}
}
no_ci {
gradleTest {
if (JavaVersion.current().java12) {
versions '5.4.1', '6.0.1', '6.7'
} else {
versions '4.9', '5.0', '5.5.1', '6.0.1', '6.7'
}
versions '7.0.2', '7.5.1'
}
}
}
Expand All @@ -41,7 +28,7 @@ licenseGradleTest.enabled = false

pluginManager.withPlugin('jacoco') {
jacocoTestReport {
executionData gradleTest
mustRunAfter gradleTest
executionData 'gradleTest'
mustRunAfter 'gradleTest'
}
}
Loading

0 comments on commit 2b79b6f

Please sign in to comment.