jcgay / gradle-notifier

Desktop notifications for Gradle
MIT License
18 stars 1 forks source link

Plugin not compatible with Configuration cache #23

Open BigMichi1 opened 3 years ago

BigMichi1 commented 3 years ago

we tried to evaluate the build with the new configuration cache that is provided by Gradle but Gradle is complaining that this plugin is not compatible

michaelcramer@p52:~/dev/git/notifier$ ./gradlew --configuration-cache clean
Configuration cache is an incubating feature.
Calculating task graph as no configuration cache is available for tasks: clean

FAILURE: Build failed with an exception.

* What went wrong:
Configuration cache problems found in this build.

1 problem was found storing the configuration cache.
- Plugin 'fr.jcgay.gradle-notifier': registration of listener on 'Gradle.addBuildListener' is unsupported
  See https://docs.gradle.org/6.7/userguide/configuration_cache.html#config_cache:requirements:build_listeners

See the complete report at file:///home/michaelcramer/dev/git/notifier/build/reports/configuration-cache/c3su8mnjl6k6r7icz7nkjnl02/configuration-cache-report.html
> Listener registration 'Gradle.addBuildListener' by build 'notifier' is unsupported.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
1 actionable task: 1 up-to-date
Configuration cache entry discarded with 1 problem.

i used that build.gradle file

plugins {
    id 'java'
    id "fr.jcgay.gradle-notifier" version "3.0.0"
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

test {
    useJUnitPlatform()
}

ref: https://docs.gradle.org/current/userguide/configuration_cache.html

jcgay commented 3 years ago

Thx!

I will have a look to use newer API 😇

jcgay commented 3 years ago

It seems that I will need to change how I read system properties : https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read