Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/gradle-versions-watchdog.yml

This file was deleted.

20 changes: 7 additions & 13 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ jobs:
CI: true
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 1.8
- uses: eskatos/gradle-command-action@v1
with:
arguments: check coveralls --stacktrace
- name: Show Reports
uses: actions/upload-artifact@v1
if: failure()
with:
name: reports
path: build/reports/
java-version: '11'
distribution: 'zulu'
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew check coveralls --stacktrace
28 changes: 10 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,24 @@ jobs:
env:
GRADLE_OPTS: "-Xmx6g -Xms4g"
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 1.8
- name: Semantic Version
id: version
uses: ncipollo/semantic-version-action@v1
java-version: '11'
distribution: 'zulu'
- name: Decode PGP
id: write_file
uses: timheuer/base64-to-file@v1
with:
fileName: 'secret.pgp'
encodedString: ${{ secrets.SIGNING_SECRET_KEY_BASE64 }}
- uses: eskatos/gradle-command-action@v1
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- uses: gradle/actions/setup-gradle@v4
- env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_PATH: ${{ steps.write_file.outputs.filePath }}
with:
arguments: gitPublishPush publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=${{ steps.version.outputs.tag }} -Prelease=true -Dorg.ajoberstar.grgit.auth.username=${{ secrets.AGORAPULSE_BOT_PERSONAL_TOKEN }} --stacktrace
run: ./gradlew gitPublishPush publishAndReleaseToMavenCentral "-Pversion=${{ github.ref_name }}" -PmavenCentralUsername=${{ secrets.SONATYPE_USERNAME }} -PmavenCentralPassword=${{ secrets.SONATYPE_PASSWORD }} -Prelease=true "-Dorg.ajoberstar.grgit.auth.username=${{ secrets.AGORAPULSE_BOT_PERSONAL_TOKEN }}" --stacktrace
ping:
name: Notify Upstream Repositories
runs-on: ubuntu-latest
Expand All @@ -43,14 +38,11 @@ jobs:
- agorapulse/agorapulse-bom
- agorapulse/agorapulse-oss
steps:
- uses: actions/checkout@v1
- name: Semantic Version
id: version
uses: ncipollo/semantic-version-action@v1
- uses: actions/checkout@v4
- name: Dispatch to ${{ matrix.repository }}
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.AGORAPULSE_BOT_PERSONAL_TOKEN }}
repository: ${{ matrix.repository }}
event-type: ap-new-version-released-event
client-payload: '{ "group": "com.agorapulse.testing", "module": "testing-libraries", "version": "${{ steps.version.outputs.tag }}", "property" : "testing.libraries.version", "github" : ${{ toJson(github) }} }'
client-payload: '{ "group": "com.agorapulse.testing", "module": "testing-libraries", "version": "${{ github.ref_name }}", "property" : "testing.libraries.version", "github" : ${{ toJson(github) }} }'
87 changes: 56 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
* Copyright 2018-2025 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,14 +20,13 @@ plugins {
id 'org.kordamp.gradle.checkstyle'
id 'org.kordamp.gradle.codenarc'
id 'org.kordamp.gradle.coveralls'
id 'io.github.gradle-nexus.publish-plugin'
}

if (!project.hasProperty('ossrhUsername')) ext.ossrhUsername = System.getenv('SONATYPE_USERNAME') ?: '**UNDEFINED**'
if (!project.hasProperty('ossrhPassword')) ext.ossrhPassword = System.getenv('SONATYPE_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingKeyId')) ext.signingKeyId = System.getenv('SIGNING_KEY_ID') ?: '**UNDEFINED**'
if (!project.hasProperty('signingPassword')) ext.signingPassword = System.getenv('SIGNING_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingSecretKey')) ext.signingSecretKey = System.getenv('SIGNING_SECRET_KEY_PATH') ? rootProject.file(System.getenv('SIGNING_SECRET_KEY_PATH')).text : '**UNDEFINED**'
if (!project.hasProperty('mavenCentralUsername')) ext.mavenCentralUsername = System.getenv('SONATYPE_USERNAME') ?: '**UNDEFINED**'
if (!project.hasProperty('mavenCentralPassword')) ext.mavenCentralPassword = System.getenv('SONATYPE_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingInMemoryKeyId')) ext.signingInMemoryKeyId = System.getenv('SIGNING_KEY_ID') ?: '**UNDEFINED**'
if (!project.hasProperty('signingInMemoryKeyPassword')) ext.signingInMemoryKeyPassword = System.getenv('SIGNING_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingInMemoryKey')) ext.signingInMemoryKey = System.getenv('SIGNING_SECRET_KEY_PATH') ? rootProject.file(System.getenv('SIGNING_SECRET_KEY_PATH')).text : '**UNDEFINED**'

config {
release = (rootProject.findProperty('release') ?: false).toBoolean()
Expand Down Expand Up @@ -74,13 +73,20 @@ config {
publishing {
enabled = false
signing {
enabled = true
keyId = signingKeyId
secretKey = signingSecretKey
password = signingPassword
enabled = false
}
}

artifacts {
source {
enabled = false
}
}

docs {
javadoc {
enabled = false
}
releasesRepository = 'localRelease'
snapshotsRepository = 'localSnapshot'
}

quality {
Expand Down Expand Up @@ -110,32 +116,15 @@ allprojects {
}
}

nexusPublishing {
repositories {
sonatype {
nexusUrl = uri('https://s01.oss.sonatype.org/service/local/')
snapshotRepositoryUrl = uri('https://s01.oss.sonatype.org/content/repositories/snapshots/')
username = ossrhUsername
password = ossrhPassword
}
}
}

subprojects { Project subproject ->
if (subproject.name == 'guide') return

apply plugin: 'groovy'
apply plugin: 'com.vanniktech.maven.publish'

targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8

config {
bintray {
name = subproject.name
githubRepo = "agorapulse/$rootProject.name"
}
}

test {
systemProperty 'TEST_RESOURCES_FOLDER', new File(subproject.projectDir, 'src/test/resources').canonicalPath
systemProperty 'user.timezone', 'UTC'
Expand All @@ -147,6 +136,42 @@ subprojects { Project subproject ->
}

clean.dependsOn cleanOut

mavenPublishing {
publishToMavenCentral(true)
signAllPublications()

pom {
name = "Agorapulse Testing Libraries"
description = 'Set of useful testing libraries'
inceptionYear = "2018"
url = "https://github.com/agorapulse/testing-libraries"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "musketyr"
name = "Vladimir Orany"
url = "https://github.com/musketyr/"
}
}
scm {
url = "https://github.com/agorapulse/testing-libraries.git"
connection = "scm:git:git://github.com/agorapulse/testing-libraries.git"
developerConnection = "scm:git:ssh://git@github.com/agorapulse/testing-libraries.git"
}
}
}

signing {
useInMemoryPgpKeys(rootProject.ext.signingInMemoryKey, rootProject.ext.signingInMemoryKeyPassword)
sign publishing.publications
}
}

check.dependsOn('aggregateCheckstyle', 'aggregateCodenarc', 'aggregateAllTestReports', 'coveralls')
2 changes: 1 addition & 1 deletion docs/guide/guide.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
* Copyright 2018-2025 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
45 changes: 3 additions & 42 deletions docs/guide/src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Fixt guarantee that the directories are created before the test run so adding ne
.Gradle
----
repositories {
jcenter()
mavenCentral()
}

dependencies {
Expand Down Expand Up @@ -76,45 +76,6 @@ include::{root-dir}/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/FixtSp
<8> Copy whole directory from the test resources
<9> All thehe files from the fixture directory are available in the new destination

== Grails Job Testing Support

Grails Job Testing Support brings the same trait-based tesing support to jobs created by the http://plugins.grails.org/plugin/grails/quartz[Quartz plugin] as the original
https://testing.grails.org/]Grails Testing Support]. It provides `JobUnitTest<J>` trait which your specification can implement
in order to test the job more easily.

=== Installation

[source,indent=0,role="primary",subs='verbatim,attributes']
.Gradle
----
repositories {
jcenter()
}

dependencies {
testCompile 'com.agorapulse.testing:grails-job-testing-support:{project-version}'
}
----

=== Usage

[source,groovy,indent=0,options="nowrap"]
.Example Job
----
include::{root-dir}/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJob.groovy[lines=18..-1]
----

[source,groovy,indent=0,options="nowrap"]
.Example Specification
----
include::{root-dir}/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJobSpec.groovy[lines=18..-1]
----
<1> Implement `JobUnitTest` with the particular job under test
<2> You can inject any mocks into the job instance
<3> Trigger the job
<4> Access the list of configured triggers
<5> Access the job metadata

== Office Unit

Office Unit is trivial tool for matching Microsoft Office documents. It leverage their nature of
Expand All @@ -131,7 +92,7 @@ instead.
.Gradle
----
repositories {
jcenter()
mavenCentral()
}

dependencies {
Expand Down Expand Up @@ -178,7 +139,7 @@ Set of useful http://spockframework.org/[Spock Framework] extensions.
.Gradle
----
repositories {
jcenter()
mavenCentral()
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2018-2021 Agorapulse.
# Copyright 2018-2025 Agorapulse.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,8 +19,8 @@
slug=agorapulse/testing-libraries
group=com.agorapulse.testing

kordampVersion=0.46.0
nexusPluginVersion=1.0.0
kordampVersion=0.54.0
mavenCentralPublishPluginVersion=0.34.0
version = 0.2.0-SNAPSHOT
groovyVersion = 2.5.4
junitVersion = 4.13
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
Copy link

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider using the 'all' distribution instead of 'bin' (gradle-8.8-all.zip) to include sources and documentation, which can be helpful for IDE integration and debugging.

Suggested change
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip

Copilot uses AI. Check for mistakes.
2 changes: 1 addition & 1 deletion libs/fixt/fixt.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
* Copyright 2018-2025 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
* Copyright 2018-2025 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libs/fixt/src/test/groovy/FixtSpecNoPackageSpec.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
* Copyright 2018-2025 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
* Copyright 2018-2025 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2018-2021 Agorapulse.
* Copyright 2018-2025 Agorapulse.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading