diff --git a/.github/workflows/gradle-versions-watchdog.yml b/.github/workflows/gradle-versions-watchdog.yml deleted file mode 100644 index 3764b07..0000000 --- a/.github/workflows/gradle-versions-watchdog.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Gradle RC Watchdog - -on: - schedule: - - cron: '0 0 13 * *' - -jobs: - check: - name: Verify the Latest Gradle Version - runs-on: ubuntu-latest - env: - GRADLE_OPTS: "-Xmx6g -Xms4g" - CI: true - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - uses: eskatos/gradle-command-action@v1 - with: - arguments: check --stacktrace - gradle-version: rc diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b392167..66061ff 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9cc22a8..fac2165 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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) }} }' diff --git a/build.gradle b/build.gradle index b3626b8..dde413e 100644 --- a/build.gradle +++ b/build.gradle @@ -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. @@ -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() @@ -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 { @@ -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' @@ -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') diff --git a/docs/guide/guide.gradle b/docs/guide/guide.gradle index 832330f..f2970c8 100644 --- a/docs/guide/guide.gradle +++ b/docs/guide/guide.gradle @@ -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. diff --git a/docs/guide/src/docs/asciidoc/index.adoc b/docs/guide/src/docs/asciidoc/index.adoc index ca2cc91..8648be2 100644 --- a/docs/guide/src/docs/asciidoc/index.adoc +++ b/docs/guide/src/docs/asciidoc/index.adoc @@ -40,7 +40,7 @@ Fixt guarantee that the directories are created before the test run so adding ne .Gradle ---- repositories { - jcenter() + mavenCentral() } dependencies { @@ -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` 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 @@ -131,7 +92,7 @@ instead. .Gradle ---- repositories { - jcenter() + mavenCentral() } dependencies { @@ -178,7 +139,7 @@ Set of useful http://spockframework.org/[Spock Framework] extensions. .Gradle ---- repositories { - jcenter() + mavenCentral() } dependencies { diff --git a/gradle.properties b/gradle.properties index 075f33a..4c19d1c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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. @@ -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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e1def65..ee4dc7c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/libs/fixt/fixt.gradle b/libs/fixt/fixt.gradle index e0a975b..33e28fb 100644 --- a/libs/fixt/fixt.gradle +++ b/libs/fixt/fixt.gradle @@ -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. diff --git a/libs/fixt/src/main/groovy/com/agorapulse/testing/fixt/Fixt.java b/libs/fixt/src/main/groovy/com/agorapulse/testing/fixt/Fixt.java index 534cc8c..5925790 100644 --- a/libs/fixt/src/main/groovy/com/agorapulse/testing/fixt/Fixt.java +++ b/libs/fixt/src/main/groovy/com/agorapulse/testing/fixt/Fixt.java @@ -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. diff --git a/libs/fixt/src/test/groovy/FixtSpecNoPackageSpec.groovy b/libs/fixt/src/test/groovy/FixtSpecNoPackageSpec.groovy index 35b008a..c07ec60 100644 --- a/libs/fixt/src/test/groovy/FixtSpecNoPackageSpec.groovy +++ b/libs/fixt/src/test/groovy/FixtSpecNoPackageSpec.groovy @@ -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. diff --git a/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/FixtSpec.groovy b/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/FixtSpec.groovy index 7afd6d0..67c356b 100644 --- a/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/FixtSpec.groovy +++ b/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/FixtSpec.groovy @@ -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. diff --git a/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/ReferenceClass.java b/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/ReferenceClass.java index a2fd6c1..d422008 100644 --- a/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/ReferenceClass.java +++ b/libs/fixt/src/test/groovy/com/agorapulse/testing/fixt/ReferenceClass.java @@ -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. diff --git a/libs/grails-job-testing-support/grails-job-testing-support.gradle b/libs/grails-job-testing-support/grails-job-testing-support.gradle deleted file mode 100644 index 959ef39..0000000 --- a/libs/grails-job-testing-support/grails-job-testing-support.gradle +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright 2018-2021 Agorapulse. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -config { - publishing { - enabled = true - } -} - -dependencies { - compile 'org.grails.plugins:quartz:2.0.13' - compile 'org.grails:grails-core:3.3.9' - compile "org.codehaus.groovy:groovy:${groovyVersion}" - compile 'org.grails:grails-testing-support:1.1.5' - compile 'org.grails:grails-gorm-testing-support:1.1.5' - compile 'org.grails:grails-datastore-gorm-support:6.1.9.RELEASE' - compile 'org.quartz-scheduler:quartz:2.2.3' - compile 'org.springframework:spring-beans:4.3.22.RELEASE' - compile 'org.springframework:spring-context-support:4.3.22.RELEASE' - compile "org.spockframework:spock-core:${spockVersion}" -} diff --git a/libs/grails-job-testing-support/src/main/groovy/com/agorapulse/testing/grails/job/JobExceptionListener.java b/libs/grails-job-testing-support/src/main/groovy/com/agorapulse/testing/grails/job/JobExceptionListener.java deleted file mode 100644 index a42257b..0000000 --- a/libs/grails-job-testing-support/src/main/groovy/com/agorapulse/testing/grails/job/JobExceptionListener.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright 2018-2021 Agorapulse. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.agorapulse.testing.grails.job; - -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.quartz.listeners.JobListenerSupport; - -import java.util.function.Consumer; - -public class JobExceptionListener extends JobListenerSupport { - - private final Consumer finished; - - public JobExceptionListener(Consumer finished) { - this.finished = finished; - } - - @Override - public String getName() { - return getClass().getName(); - } - - @Override - public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) { - finished.accept(jobException); - } -} diff --git a/libs/grails-job-testing-support/src/main/groovy/com/agorapulse/testing/grails/job/JobUnitTest.groovy b/libs/grails-job-testing-support/src/main/groovy/com/agorapulse/testing/grails/job/JobUnitTest.groovy deleted file mode 100644 index 2f8908b..0000000 --- a/libs/grails-job-testing-support/src/main/groovy/com/agorapulse/testing/grails/job/JobUnitTest.groovy +++ /dev/null @@ -1,157 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright 2018-2021 Agorapulse. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.agorapulse.testing.grails.job - -import grails.plugins.quartz.GrailsJobClass -import grails.plugins.quartz.JobDetailFactoryBean -import grails.plugins.quartz.GrailsJobFactory -import grails.plugins.quartz.DefaultGrailsJobClass -import grails.plugins.quartz.CustomTriggerFactoryBean -import grails.plugins.quartz.listeners.SessionBinderJobListener -import grails.testing.gorm.DataTest -import groovy.transform.CompileDynamic -import groovy.transform.CompileStatic -import org.grails.datastore.gorm.support.DatastorePersistenceContextInterceptor -import org.grails.testing.ParameterizedGrailsUnitTest -import org.quartz.Scheduler -import org.quartz.JobExecutionException -import org.quartz.SchedulerFactory -import org.quartz.Trigger -import org.quartz.JobKey -import org.quartz.ListenerManager -import org.quartz.JobDetail -import org.quartz.impl.StdSchedulerFactory -import org.quartz.impl.matchers.KeyMatcher -import org.slf4j.LoggerFactory -import spock.util.concurrent.BlockingVariable - -import java.util.concurrent.TimeUnit -import java.util.function.Consumer - -@CompileStatic -trait JobUnitTest implements ParameterizedGrailsUnitTest, DataTest { - - @SuppressWarnings('FieldName') - private GrailsJobClass _jobClass - - @SuppressWarnings('FieldName') - private List _triggers - - J getJob() { - return artefactInstance - } - - GrailsJobClass getJobClass() { - if (_jobClass == null) { - _jobClass = new DefaultGrailsJobClass(job.getClass()) - } - return _jobClass - } - - @CompileDynamic - List getTriggers() { - if (_triggers == null) { - JobDetail jobDetail = createJobDetail() - _triggers = jobClass.triggers.collect { name, Expando descriptor -> - CustomTriggerFactoryBean factory = new CustomTriggerFactoryBean() - factory.triggerClass = descriptor.triggerClass - factory.triggerAttributes = descriptor.triggerAttributes - factory.jobDetail = jobDetail - factory.afterPropertiesSet() - return factory.object - } - } - return _triggers - } - - @CompileDynamic @Override - void mockArtefact(Class artefactClass) { - defineBeans { - "${getBeanName(artefactClass)}"(artefactClass) - } - } - - @Override - String getBeanName(Class artefactClass) { - return typeUnderTest.name - } - - @SuppressWarnings('UnusedMethodParameter') - boolean trigger(J job) { - JobDetail jobDetail = createJobDetail() - - SchedulerFactory schedulerFactory = new StdSchedulerFactory() - // Retrieve a scheduler from schedule factory - Scheduler scheduler = schedulerFactory.scheduler - scheduler.jobFactory = new GrailsJobFactory(applicationContext: applicationContext) - - definePersistentInterceptor(scheduler, jobDetail) - - BlockingVariable exception = new BlockingVariable<>(1, TimeUnit.MINUTES) - - scheduler.listenerManager.addJobListener(new JobExceptionListener({ exception.set(it) } as Consumer)) - - // adds the job to the scheduler, and associates triggers with it - scheduler.addJob(jobDetail, true) - - scheduler.start() - - scheduler.triggerJob(jobDetail.key) - - JobExecutionException ex = exception.get() - - scheduler.shutdown(true) - - if (ex) { - LoggerFactory.getLogger(job.getClass()).error("Exception executing job $jobDetail", ex) - if (ex.cause) { - throw ex.cause - } - throw ex - } - - return true - } - - private JobDetail createJobDetail() { - // Creates job details - JobDetailFactoryBean jdfb = new JobDetailFactoryBean() - jdfb.jobClass = jobClass - jdfb.afterPropertiesSet() - return jdfb.object - } - - @CompileDynamic - private void definePersistentInterceptor(Scheduler scheduler, JobDetail jobDetail) { - defineBeans { - persistenceInterceptor(DatastorePersistenceContextInterceptor, ref('grailsDatastore')) - "${SessionBinderJobListener.NAME}"(SessionBinderJobListener) { bean -> - bean.autowire = 'byName' - } - } - SessionBinderJobListener listener = applicationContext.getBean(SessionBinderJobListener) - ListenerManager listenerManager = scheduler.listenerManager - KeyMatcher matcher = KeyMatcher.keyEquals(jobDetail.key) - if (listenerManager.getJobListener(listener.name) == null) { - listenerManager.addJobListener(listener, matcher) - } else { - listenerManager.addJobListenerMatcher(listener.name, matcher) - } - } - -} diff --git a/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJob.groovy b/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJob.groovy deleted file mode 100644 index 35201cc..0000000 --- a/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJob.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright 2018-2021 Agorapulse. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.agorapulse.testing.grails.job.test - -import groovy.transform.CompileDynamic - -@CompileDynamic -@SuppressWarnings([ - 'FieldTypeRequired', - 'NoDef', -]) -class TestJob { - - static triggers = { - simple name: 'mySimpleTrigger', startDelay: 60000, repeatInterval: 1000 - } - - static sessionRequired = true - static concurrent = true - static group = 'MyGroup' - static description = 'Example job with Simple Trigger' - - Runnable runnable - - void execute() { - runnable.run() - } - -} diff --git a/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJobSpec.groovy b/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJobSpec.groovy deleted file mode 100644 index b20d32d..0000000 --- a/libs/grails-job-testing-support/src/test/groovy/com/agorapulse/testing/grails/job/test/TestJobSpec.groovy +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright 2018-2021 Agorapulse. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.agorapulse.testing.grails.job.test - -import com.agorapulse.testing.grails.job.JobUnitTest -import org.quartz.SimpleTrigger -import spock.lang.Specification - -@SuppressWarnings('ClassStartsWithBlankLine') -class TestJobSpec extends Specification implements JobUnitTest { // <1> - - Runnable mock = Mock(Runnable) - - void setup() { - job.runnable = mock // <2> - } - - void 'test trigger job'() { - when: - trigger job // <3> - then: - noExceptionThrown() - - 1 * mock.run() - } - - void 'check cofiguration'() { - expect: - triggers.any { // <4> - it instanceof SimpleTrigger && it.repeatInterval == 1000 - } - jobClass.concurrent // <5> - jobClass.sessionRequired - jobClass.description == 'Example job with Simple Trigger' - jobClass.group == 'MyGroup' - } - -} diff --git a/libs/office-unit/office-unit.gradle b/libs/office-unit/office-unit.gradle index a8063cf..9bf36cf 100644 --- a/libs/office-unit/office-unit.gradle +++ b/libs/office-unit/office-unit.gradle @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollector.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollector.java index 45d1667..0e12efb 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollector.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollector.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DifferenceCollector.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DifferenceCollector.java index 73b76e4..8c44a23 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DifferenceCollector.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DifferenceCollector.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DocumentDifference.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DocumentDifference.java index 41084f6..a10fc6c 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DocumentDifference.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/DocumentDifference.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollector.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollector.java index 0352413..8be6b6f 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollector.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollector.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnit.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnit.java index 4d3c684..45c428d 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnit.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnit.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollector.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollector.java index 5cdeef8..abcc8a8 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollector.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollector.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifference.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifference.java index 62cc376..11b7c12 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifference.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifference.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDifferenceCollector.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDifferenceCollector.java index bb41dbf..9e9fa79 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDifferenceCollector.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDifferenceCollector.java @@ -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. diff --git a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDocumentDifference.java b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDocumentDifference.java index 86670ea..0963120 100644 --- a/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDocumentDifference.java +++ b/libs/office-unit/src/main/groovy/com/agorapulse/testing/officeunit/XmlDocumentDifference.java @@ -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. diff --git a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollectorSpec.groovy b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollectorSpec.groovy index 85bdab5..88785d1 100644 --- a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollectorSpec.groovy +++ b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/BinaryDifferenceCollectorSpec.groovy @@ -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. diff --git a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollectorSpec.groovy b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollectorSpec.groovy index 5025291..ca52430 100644 --- a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollectorSpec.groovy +++ b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/EmptyDifferenceCollectorSpec.groovy @@ -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. diff --git a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollectorSpec.groovy b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollectorSpec.groovy index 1c77ace..a117ff4 100644 --- a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollectorSpec.groovy +++ b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitDifferenceCollectorSpec.groovy @@ -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. @@ -29,13 +29,16 @@ class OfficeUnitDifferenceCollectorSpec extends Specification { InputStream two = Mock(InputStream) { read(*_) >> { throw new IOException() } } - expect: + when: OfficeUnitDifferenceCollector.INSTANCE.computeDifferences( '/root', one, two, Collections.emptySet() ).size() == 0 + + then: + thrown(IllegalArgumentException) } } diff --git a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitSpec.groovy b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitSpec.groovy index b4e3431..be7cc86 100644 --- a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitSpec.groovy +++ b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/OfficeUnitSpec.groovy @@ -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. diff --git a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifferenceSpec.groovy b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifferenceSpec.groovy index 6b503a3..82b86f5 100644 --- a/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifferenceSpec.groovy +++ b/libs/office-unit/src/test/groovy/com/agorapulse/testing/officeunit/SimpleDocumentDifferenceSpec.groovy @@ -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. diff --git a/libs/office-unit/src/test/resources/logback.groovy b/libs/office-unit/src/test/resources/logback.groovy index a93c051..36617f7 100644 --- a/libs/office-unit/src/test/resources/logback.groovy +++ b/libs/office-unit/src/test/resources/logback.groovy @@ -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. diff --git a/libs/spock/spock.gradle b/libs/spock/spock.gradle index 41ebc55..f70f039 100644 --- a/libs/spock/spock.gradle +++ b/libs/spock/spock.gradle @@ -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. diff --git a/libs/spock/src/main/java/com/agorapulse/testing/spock/Detached.java b/libs/spock/src/main/java/com/agorapulse/testing/spock/Detached.java index 952a877..3d8f461 100644 --- a/libs/spock/src/main/java/com/agorapulse/testing/spock/Detached.java +++ b/libs/spock/src/main/java/com/agorapulse/testing/spock/Detached.java @@ -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. diff --git a/libs/spock/src/main/java/com/agorapulse/testing/spock/DetachedExtension.java b/libs/spock/src/main/java/com/agorapulse/testing/spock/DetachedExtension.java index 64515dc..87b9dff 100644 --- a/libs/spock/src/main/java/com/agorapulse/testing/spock/DetachedExtension.java +++ b/libs/spock/src/main/java/com/agorapulse/testing/spock/DetachedExtension.java @@ -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. diff --git a/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeatures.java b/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeatures.java index 8be3984..1d875d9 100644 --- a/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeatures.java +++ b/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeatures.java @@ -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. diff --git a/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeaturesExtension.java b/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeaturesExtension.java index 0a94098..7992a62 100644 --- a/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeaturesExtension.java +++ b/libs/spock/src/main/java/com/agorapulse/testing/spock/OverrideParentFeaturesExtension.java @@ -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. diff --git a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ChildSpec.groovy b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ChildSpec.groovy index 8cc91c3..76fb982 100644 --- a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ChildSpec.groovy +++ b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ChildSpec.groovy @@ -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. diff --git a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/DetachedSpec.groovy b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/DetachedSpec.groovy index b1d26a7..c993127 100644 --- a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/DetachedSpec.groovy +++ b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/DetachedSpec.groovy @@ -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. diff --git a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/GrandChildSpec.groovy b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/GrandChildSpec.groovy index 3d62d0e..12017c8 100644 --- a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/GrandChildSpec.groovy +++ b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/GrandChildSpec.groovy @@ -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. diff --git a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/MyMockFactory.groovy b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/MyMockFactory.groovy index a1117a9..1f0bbf1 100644 --- a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/MyMockFactory.groovy +++ b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/MyMockFactory.groovy @@ -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. diff --git a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnMethodSpec.groovy b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnMethodSpec.groovy index b3bb790..9fe3b5b 100644 --- a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnMethodSpec.groovy +++ b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnMethodSpec.groovy @@ -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. diff --git a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnTypeSpec.groovy b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnTypeSpec.groovy index 861fc39..7890064 100644 --- a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnTypeSpec.groovy +++ b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/NoParentAndAnnoOnTypeSpec.groovy @@ -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. diff --git a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ParentSpec.groovy b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ParentSpec.groovy index 5459d93..ff6b308 100644 --- a/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ParentSpec.groovy +++ b/libs/spock/src/test/groovy/com/agorapulse/testing/spock/ParentSpec.groovy @@ -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. diff --git a/settings.gradle b/settings.gradle index df8e5f2..d484ab3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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. @@ -15,39 +15,38 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -pluginManagement { - repositories { - jcenter() - gradlePluginPortal() - } - plugins { - id 'org.kordamp.gradle.groovy-project' version kordampVersion - id 'org.kordamp.gradle.checkstyle' version kordampVersion - id 'org.kordamp.gradle.codenarc' version kordampVersion - id 'org.kordamp.gradle.coveralls' version kordampVersion - id 'org.kordamp.gradle.guide' version kordampVersion - id 'com.github.kt3k.coveralls' version '2.9.0' - id 'org.ajoberstar.git-publish' version '2.1.3' - id 'io.github.gradle-nexus.publish-plugin' version nexusPluginVersion - } -} - buildscript { repositories { + mavenCentral() gradlePluginPortal() } dependencies { classpath "org.kordamp.gradle:settings-gradle-plugin:$kordampVersion" - // forces the version suitable for all currently used plugins - classpath 'org.eclipse.jgit:org.eclipse.jgit:5.6.0.201912101111-r', { - force = true - } - classpath 'org.ajoberstar.grgit:grgit-core:4.0.1' + classpath "org.kordamp.gradle:java-project-gradle-plugin:$kordampVersion" + classpath "org.kordamp.gradle:groovy-project-gradle-plugin:$kordampVersion" + classpath "org.kordamp.gradle:checkstyle-gradle-plugin:$kordampVersion" + classpath "org.kordamp.gradle:codenarc-gradle-plugin:$kordampVersion" + classpath "org.kordamp.gradle:guide-gradle-plugin:$kordampVersion" + classpath "org.kordamp.gradle:coveralls-gradle-plugin:$kordampVersion" + classpath 'org.ajoberstar:gradle-git-publish:2.1.3' + classpath "com.vanniktech:gradle-maven-publish-plugin:$mavenCentralPublishPluginVersion" } } +plugins { + id 'com.gradle.enterprise' version '3.15.1' +} + apply plugin: 'org.kordamp.gradle.settings' +gradleEnterprise { + buildScan { + publishAlways() + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + } +} + projects { directories = ['libs', 'docs'] }