GithubHelp home page GithubHelp logo

gradle-notifier's People

Contributors

dependabot-preview[bot] avatar jcgay avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zscgrhg

gradle-notifier's Issues

Plugin not compatible with Configuration cache

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

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

gradle
settings.gradle.kts
build.gradle.kts
  • com.github.kt3k.coveralls 2.10.2
  • com.bmuschko.nexus 2.3.1
  • pl.allegro.tech.build.axion-release 1.10.2
  • com.github.ben-manes.versions 0.38.0
  • io.codearte.nexus-staging 0.11.0
  • com.gradle.plugin-publish 0.10.1
  • org.jetbrains.kotlin.jvm 1.4.31
  • fr.jcgay.send-notification:send-notification 0.16.0
  • org.assertj:assertj-core 3.19.0
  • org.spockframework:spock-core 1.3-groovy-2.5
  • com.github.stefanbirkner:system-rules 1.19.0
  • cglib:cglib-nodep 3.3.0
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 6.8.3

  • Check this box to trigger a request for Renovate to run again on this repository

Test with older Gradle versions

The only tested version is the one used to develop the plugin: 2.3
Should be tested with at lest 2.x versions.

It fails with gradle 1.12:

FAILURE: Build failed with an exception.

* What went wrong:
Failed to notify build listener.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.listener.ListenerNotificationException: Failed to notify build listener.
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:94)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
    at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy12.buildFinished(Unknown Source)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
    at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy12.buildFinished(Unknown Source)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:118)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:46)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.Main.main(Main.java:37)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for fr.jcgay.gradle.notifier.Status do not match. Expected -1 but got 1
    at fr.jcgay.gradle.notifier.Status.$INIT(Status.groovy)
    at fr.jcgay.gradle.notifier.Status.<clinit>(Status.groovy:12)
    at fr.jcgay.gradle.notifier.NotifierListener.status(NotifierListener.groovy:50)
    at fr.jcgay.gradle.notifier.NotifierListener.buildFinished(NotifierListener.groovy:28)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
    ... 35 more

Incompatible with Gradle 4.2

after update to Gradle 4.2 (4.1 is works fine) there is an error

* What went wrong:
Execution failed for task ':run'.
> No signature of method: org.gradle.deployment.internal.DefaultDeploymentRegistry.get() is applicable for argument types: (java.lang.Class, java.lang.String) values: [interface org.gradle.deployment.internal.DeploymentHandle, :run]
  Possible solutions: get(java.lang.String, java.lang.Class), grep(), getAt(java.lang.String), wait(), any(), grep(java.lang.Object)

and later

* What went wrong:
Failed to notify build listener.
> org.gradle.util.Clock.getTimeInMs()J

So I assume there was a change in API and now systemtray parameter wait isn't working properly ... digging in.

Disable notifications for buildSrc

Is there any way to disable notifications for buildSrc project?
By default, I get a notification for both the buildSrc project and the actual project I'm building.
I'm aware that setting a small enough threshold could get rid of it, but I'm looking for something more reliable, as I generally don't use the threshold feature at all.

Dependabot couldn't find a build.gradle for this project

Dependabot couldn't find a build.gradle for this project.

Dependabot requires a build.gradle to evaluate your project's current Java dependencies. It had expected to find one at the path: /build.gradle.

If this isn't a Java project, or if it is a library, you may wish to disable updates for it from within Dependabot.

Issue with terminal-notifier

Hi Jean-Christophe,

First of all, thanks for this Gradle plugin, it seems to match perfectly what I'm looking for :) I tried to set it up today but the notifications would never appear. Here is what I found in the logs:

19:30:44.030 [DEBUG] [fr.jcgay.notification.notifier.executor.RuntimeExecutor] Command <[terminal-notifier -title Gradle -subtitle Success -message Done in: 11.589 secs. -group application/x-vnd-gradle-inc.gradle -activate com.apple.Terminal -contentImage /var/folders/hk/30kqtgfs6rj57bp6r__sj9580000gn/T/send-notifications-icons/success.png -appIcon /var/folders/hk/30kqtgfs6rj57bp6r__sj9580000gn/T/send-notifications-icons/gradle.png]> takes too long to execute. Do not wait for the result...
java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(FutureTask.java:205)
        at fr.jcgay.notification.notifier.executor.RuntimeExecutor.exec(RuntimeExecutor.java:65)
        at fr.jcgay.notification.notifier.notificationcenter.TerminalNotifier.send(TerminalNotifier.java:72)
        at fr.jcgay.gradle.notifier.NotifierListener.buildFinished(NotifierListener.groovy:44)

And indeed, the following command fails:

terminal-notifier -title Gradle -subtitle Success -message Done in: 4.978 secs. -group application/x-vnd-gradle-inc.gradle -activate com.apple.Terminal -contentImage /var/folders/hk/30kqtgfs6rj57bp6r__sj9580000gn/T/send-notifications-icons/success.png -appIcon /var/folders/hk/30kqtgfs6rj57bp6r__sj9580000gn/T/send-notifications-icons/gradle.png

I could fix it by adding quotes around the message:

terminal-notifier -title Gradle -subtitle Success -message "Done in: 4.978 secs." -group application/x-vnd-gradle-inc.gradle -activate com.apple.Terminal -contentImage /var/folders/hk/30kqtgfs6rj57bp6r__sj9580000gn/T/send-notifications-icons/success.png -appIcon /var/folders/hk/30kqtgfs6rj57bp6r__sj9580000gn/T/send-notifications-icons/gradle.png

Where do you think is the source of the issue?
Is there a way to statically change the message to a single word, until a fix is released?

time displayed in messages has decimal places for hours and minutes

I started using this plugin to get desktop notifications (linux/notify-send) when my longer running tasks completed. This has been a huge help, so much appreciated. However, I noticed that the displayed times included quite a few decimal places on the hours and minutes fields, which is technically incorrect (1.5 minutes and 30 seconds = 2 minutes) but also just makes for an awkward-looking message.

image

I actually got curious enough to clone the repo and fix it myself, so I have a fix in a local branch that fixes this, and I got a bit carried away and made it use correct singular/plural forms of hour(s)/minute(s)/second(s) because I was having some fun. I also wrote a full set of tests to cover.

I'd be more than happy to upload my changes and create a PR if given permission. I've been running this locally for a few days... I added the maven plugin (not included in branch) so I could use publishToMavenLocal and run my customized version for all projects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.