Skip to content

Commit

Permalink
Merge pull request #66 from abelsromero/ci-maintenance
Browse files Browse the repository at this point in the history
Ci maintenance
  • Loading branch information
robertpanzer authored Dec 23, 2021
2 parents 16f42c5 + 6620d3d commit 90e81f4
Show file tree
Hide file tree
Showing 14 changed files with 315 additions and 293 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
java:
- '8'
- '11'
- '17'
os:
- ubuntu-latest
- macos-latest
Expand All @@ -26,11 +27,36 @@ jobs:
steps:
- name: Fetch Sources
uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Build
run: |
./gradlew -S -Pskip.signing assemble
./gradlew -S -Pskip.signing check
build-windows:
name: Build on Windows
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 2
matrix:
java:
- '11'
- '17'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Assemble
shell: cmd
run: |
gradlew.bat -S -Pskip.signing assemble
gradlew -S -Pskip.signing check
10 changes: 5 additions & 5 deletions asciidoctorj-pdf/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies {
testCompile ("org.asciidoctor:asciidoctorj:$asciidoctorJVersion") {
testImplementation ("org.asciidoctor:asciidoctorj:$asciidoctorJVersion") {
exclude group:'org.jruby'
}

testCompile "org.jruby:jruby-complete:$jrubyVersion"
testImplementation "org.jruby:jruby-complete:$jrubyVersion"


gems("rubygems:asciidoctor-pdf:$asciidoctorPdfGemVersion") {
Expand All @@ -28,7 +28,7 @@ dependencies {
gems "rubygems:text-hyphen:$textHyphenVersion"
gems "rubygems:ttfunk:$ttfunkGemVersion"

testCompile "org.apache.pdfbox:pdfbox:$pdfboxVersion"
testImplementation "org.apache.pdfbox:pdfbox:$pdfboxVersion"
}

def gemFiles = fileTree("${project.buildDir}/.gems") {
Expand All @@ -37,7 +37,7 @@ def gemFiles = fileTree("${project.buildDir}/.gems") {
include "gems/*/data/fonts/**"
include "gems/*/data/themes/**"
include "gems/asciidoctor-pdf-$asciidoctorPdfGemVersion/data/**"
// Accomodate Prawn's non-conforming packaging
// Accommodate Prawn's non-conforming packaging
include "gems/prawn-*/VERSION"
include "gems/prawn-*/data/*.txt"
include "gems/prawn-*/data/encodings/*"
Expand All @@ -61,4 +61,4 @@ jrubyPrepare {
ext.publicationName = "mavenAsciidoctorJPdf"

apply from: rootProject.file('gradle/publish.gradle')
apply from: rootProject.file('gradle/signing.gradle')
apply from: rootProject.file('gradle/signing.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
import java.util.Map;

import static org.asciidoctor.OptionsBuilder.options;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;

public class WhenBackendIsPdf {

public static final String DOCUMENT = "= A document\n\n Test";

private Asciidoctor asciidoctor;


Expand Down
52 changes: 26 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,17 @@ buildscript {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}

// modern plugins config
plugins {
id "signing"
id "io.codearte.nexus-staging" version "0.22.0"
id "de.marcphilipp.nexus-publish" version "0.4.0"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'com.github.jruby-gradle.base' version '2.0.0'
}

apply plugin: 'io.codearte.nexus-staging'


nexusStaging {
if (project.hasProperty("sonatypeUsername")) {
username = project.sonatypeUsername
}
if (project.hasProperty("sonatypePassword")) {
password = project.sonatypePassword
}
repositoryDescription = "Release ${project.group} ${project.version}"
}

// TIP use -PpublishRelease=true to active release behavior regardless of the version
status = project.hasProperty('publishRelease') && project.publishRelease.toBoolean() ?
'release' : ((version == 'unspecified' || version.endsWith('-SNAPSHOT')) ? 'snapshot' : 'release')
Expand All @@ -49,15 +35,15 @@ ext {
arquillianSpockVersion = '1.0.0.Beta3'
commonsioVersion = '2.4'
guavaVersion = '18.0'
hamcrestVersion = '1.3'
jrubyVersion = '9.2.17.0'
junitVersion = '4.12'
saxonVersion = '9.5.1-6'
xmlMatchersVersion = '1.0-RC1'
pdfboxVersion = '1.8.16'
junitVersion = '4.13.2'
hamcrestVersion = '2.2'

// gem versions
asciidoctorJVersion = project.hasProperty('asciidoctorJVersion') ? project.asciidoctorJVersion : '2.5.1'
asciidoctorJVersion = project.hasProperty('asciidoctorJVersion') ? project.asciidoctorJVersion : '2.5.2'
asciidoctorPdfGemVersion = project.hasProperty('asciidoctorPdfGemVersion') ? project.asciidoctorPdfGemVersion : project(':asciidoctorj-pdf').version.replace('-', '.')

groovyVersion = '2.1.8'
Expand Down Expand Up @@ -112,15 +98,14 @@ subprojects {
}

dependencies {
testCompile "junit:junit:$junitVersion"
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
testCompile("org.spockframework:spock-core:$spockVersion") {
testImplementation "junit:junit:$junitVersion"
testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion"
testImplementation("org.spockframework:spock-core:$spockVersion") {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
testCompile "org.jboss.arquillian.junit:arquillian-junit-container:$arquillianVersion"
testCompile "org.jboss.arquillian.spock:arquillian-spock-container:$arquillianSpockVersion"

testImplementation "org.codehaus.groovy:groovy-all:$groovyVersion"
testImplementation "org.jboss.arquillian.junit:arquillian-junit-container:$arquillianVersion"
testImplementation "org.jboss.arquillian.spock:arquillian-spock-container:$arquillianSpockVersion"
}

test {
Expand Down Expand Up @@ -197,3 +182,18 @@ configure(subprojects.findAll { it.name != 'itest'}) {
// IMPORTANT The TMP or TEMP environment variable must be set for the gem install command to work on Windows
processResources.dependsOn jrubyPrepare
}

nexusPublishing {
repositories {
sonatype {
if (project.hasProperty("sonatypeUsername")) {
username = project.sonatypeUsername
}
if (project.hasProperty("sonatypePassword")) {
password = project.sonatypePassword
}
repositoryDescription = "Release ${project.group} ${project.version}"
}
}
clientTimeout = Duration.ofMinutes(5)
}
57 changes: 0 additions & 57 deletions config/codenarc/codenarc.groovy

This file was deleted.

2 changes: 1 addition & 1 deletion gradle/deploy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bintray {

licenses = ['Apache-2.0']
labels = ['asciidoctor', 'asciidoctorj', 'asciidoc']
websiteUrl = 'http://asciidoctor.org/docs/asciidoctorj-pdf'
websiteUrl = 'https://github.com/asciidoctor/asciidoctorj-pdf/blob/main/README.adoc'
issueTrackerUrl = 'https://github.com/asciidoctor/asciidoctorj-pdf/issues'
vcsUrl = 'https://github.com/asciidoctor/asciidoctorj-pdf'
publicDownloadNumbers = true
Expand Down
8 changes: 1 addition & 7 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply plugin: 'de.marcphilipp.nexus-publish'
apply plugin: 'maven-publish'

publishing {
publications.create(project.ext.publicationName, MavenPublication) {
Expand Down Expand Up @@ -86,9 +86,3 @@ publishing {
}
}
}

nexusPublishing {
repositories {
sonatype()
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri May 27 23:04:37 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
Loading

0 comments on commit 90e81f4

Please sign in to comment.