Spotless-intellij-gradle - An IntelliJ plugin to allow running the Spotless gradle task from within the IDE.

Overview

Spotless Intellij Gradle

Build Version Downloads

An IntelliJ plugin to allow running the spotless gradle task from within the IDE on the current file selected in the editor.

You may find the spotless action via Code > Reformat Code with Spotless.

spotlessdemo

Features

  • spotlessApply can be run on the current file via Code > Reformat Code with Spotless. You may also assign a keyboard shortcut to this action for convenience.

Installation

NOTE: Before using this extension, ensure you've configured Spotless correctly in your Gradle build file. (Run ./gradlew spotlessDiagnose to prepare & validate Spotless.)

Using IDE built-in plugin system:

Settings/Preferences > Plugins > Marketplace > Search for "Spotless Gradle" > Install Plugin

Manually:

Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

How it Works

This plugin runs the spotlessApply Gradle task on the current file using the Spotless IDE hook.

Release Notes

See CHANGELOG.md

License

See License

Comments
  • Issue while executing the

    Issue while executing the "Reformat Code with Spotless"

    I installed the spotless plugin through the plugins repository in IntelliJ and if I execute the "Reformat Code with Spotless" on one of my Java files in my project, I get the following error message: "Unknown command-line option '--no-configuration-cache'."

    The logs give the following: 17:23:09: Executing 'spotlessApply -PspotlessIdeHook="somepath/file.java" --no-configuration-cache'... 17:23:09: Execution finished 'spotlessApply -PspotlessIdeHook="somepath/file.java" --no-configuration-cache'.

    opened by SebKiller 4
  • Remove Upper Bound for compatibility limit

    Remove Upper Bound for compatibility limit

    Whenever I update intellij, spotless-intellij-gradle plugin is one of the few plugins, that is not compatible until a new version is released.

    This is probably due to the upper bound limit here, if I read the code correctly:

    https://github.com/ragurney/spotless-intellij-gradle/blob/51fe46ead8e1c536f638d3416a63a8e1b86421cb/build.gradle.kts#L70

    I suggest to remove this upper bound, since the plugin uses only a small section of Intellij's api and therefore the plugin is not likely to break when a new Intellij version is released.

    (Currently, it ALWAYS breaks whenever a new Intellij version is released)

    opened by simschla 2
  • Adding support for IntelliJ Platform 2022.2

    Adding support for IntelliJ Platform 2022.2

    Hello!

    v1.0.7 of spotless-intellij-gradle doesn't support the latest release of IntelliJ (2022.2). This should enable compatibility. I've been running into some issues regarding the :buildSearchableOptions task.

    > Task :buildSearchableOptions FAILED
    [gradle-intellij-plugin :spotless:buildSearchableOptions] Cannot resolve runtime with ideDir='/Users/yoo/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2022.2/42c296374014a649785bb84aa6d8dc2d18f2ca0e/ideaIC-2022.2'
    [gradle-intellij-plugin :spotless:buildSearchableOptions] Cannot find java executable in: /Users/yoo/.gradle/caches/modules-2/files-2.1/com.jetbrains/jbre/jbr-17.0.3-osx-aarch64-b469.32/extracted
    [gradle-intellij-plugin :spotless:buildSearchableOptions] Cannot resolve runtime with ideDir='/Users/yoo/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2022.2/42c296374014a649785bb84aa6d8dc2d18f2ca0e/ideaIC-2022.2', version='17.0.3b469.32'
    [gradle-intellij-plugin :spotless:buildSearchableOptions] Cannot resolve runtime with ideDir='/Users/yoo/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2022.2/42c296374014a649785bb84aa6d8dc2d18f2ca0e/ideaIC-2022.2'
    
    Start Failed
    !bootstrap.error.message.internal.error.please.refer.to.0!https://jb.gg/ide/critical-startup-errors!
    
    java.lang.NoClassDefFoundError: com/intellij/openapi/util/SystemInfoRt
    	at com.intellij.openapi.application.PathManager.getBinDirectories(PathManager.java:175)
    	at com.intellij.openapi.application.PathManager.isIdeaHome(PathManager.java:163)
    	at com.intellij.openapi.application.PathManager.getHomeDirFor(PathManager.java:156)
    	at com.intellij.openapi.application.PathManager.getHomePathFor(PathManager.java:146)
    	at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:95)
    	at com.intellij.openapi.application.PathManager.loadProperties(PathManager.java:540)
    	at com.intellij.idea.Main.bootstrap(Main.java:91)
    	at com.intellij.idea.Main.main(Main.java:81)
    Caused by: java.lang.ClassNotFoundException: com.intellij.openapi.util.SystemInfoRt
    	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    	... 8 more
    
    -----
    !bootstrap.error.message.jre.details!17.0.3+7-b469.32 aarch64 (JetBrains s.r.o.)
    /Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home!
    
    Caused by: java.lang.ClassNotFoundException: com.intellij.openapi.util.SystemInfoRt
    
    Execution failed for task ':buildSearchableOptions'.
    > Process 'command '/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/bin/java'' finished with non-zero exit value 3
    
    * 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.
    

    Updating org.jetbrains.intellij to 1.5.2 (latest) in build.gradle.kts gets rid of this error, but also introduces another errr in the form of a linking error for a Main class

    opened by jyoo980 1
  • Move lower bound IDE range to 211

    Move lower bound IDE range to 211

    It appears that due to the use of SlowOperations this plugin is not compatible with v203 of IntelliJ Ultimate: image

    I don't think we need to support v203, though we can always investigate some kind of backwards compatibility solution later on if need be (I reached out to JetBrains to ask what this would be but haven't heard back yet).

    For now, I am changing the lower bound of support to 211 to get this thing approved for the JetBrains Marketplace.

    opened by ragurney 1
  • Clean working dirs during run to unblock pipeline

    Clean working dirs during run to unblock pipeline

    The build has been failing on the Qodana step due to lack of space on disc.

    Pulling fix listed here: https://github.com/JetBrains/intellij-platform-plugin-template/issues/271 🤞

    opened by ragurney 0
  • Gracefully handle no project settings

    Gracefully handle no project settings

    There are some cases where the call .getLinkedProjectSettings(Objects.requireNonNull(myProject.getBasePath())) returns null.

    I'm still trying to figure out why / when this would be the case here but in the meantime I'm adding this fix to hopefully avoid most issues.

    opened by ragurney 0
  • Add GitHub Link and `--no-configuration-cache` to `spotlessApply` Executino

    Add GitHub Link and `--no-configuration-cache` to `spotlessApply` Executino

    This adds a GitHub link to the plugin description section, as well as the --no-configuration-cache option to the gradle task execution to avoid the issue outlined by @nedtwigg in https://github.com/ragurney/spotless-intellij-gradle/issues/18.

    Resolves #17, Resolves #18;

    opened by ragurney 0
  • Incompatible with configuration cache

    Incompatible with configuration cache

    The first time I used the plugin, I got this error:

    Executing 'spotlessApply -PspotlessIdeHook="/Users/ntwigg/Documents/dev/somerepo/somefile.java" --stacktrace'...
    
    Configuration cache is an incubating feature.
    Configuration on demand is an incubating feature.
    Reusing configuration cache.
    
    1 problem was found reusing the configuration cache.
    - Task `:spotlessApply` of type `org.gradle.api.DefaultTask`: cannot deserialize object of type 'org.gradle.api.Task' as these are not supported with the configuration cache.
      See https://docs.gradle.org/7.3/userguide/configuration_cache.html#config_cache:requirements:task_access
    
    See the complete report at file:///Users/ntwigg/Documents/dev/diffplug-app/build/reports/configuration-cache/dd0tsph6y7zf9x8td59ytb5pq/catehcg6dw7g2id49g886oi72/configuration-cache-report.html
    Configuration cache entry reused with 1 problem.
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Could not load the value of field `action` of `org.gradle.api.internal.AbstractTask$TaskActionWrapper` bean found in field `actions` of task `:spotlessApply` of type `org.gradle.api.DefaultTask`.
    > java.lang.reflect.InvocationTargetException (no error message)
    
    * Try:
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.
    
    * Exception is:
    org.gradle.api.GradleException: Could not load the value of field `action` of `org.gradle.api.internal.AbstractTask$TaskActionWrapper` bean found in field `actions` of task `:spotlessApply` of type `org.gradle.api.DefaultTask`.
    	at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:108)
    	at org.gradle.configurationcache.serialization.beans.BeanPropertyReader.readStateOf(BeanPropertyReader.kt:67)
    	at org.gradle.configurationcache.serialization.codecs.BeanCodec.readBeanOf(BeanCodec.kt:72)
    	at org.gradle.configurationcache.serialization.codecs.BeanCodec.decode(BeanCodec.kt:47)
    	at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1$decodeLoop$1.invokeSuspend(Combinators.kt:162)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
    	at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1.decodeLoop(Combinators.kt:163)
    	at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1.decode(Combinators.kt:127)
    	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:64)
    	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:247)
    	at org.gradle.configurationcache.serialization.CombinatorsKt.readCollectionInto(Combinators.kt:235)
    	at org.gradle.configurationcache.serialization.codecs.CollectionCodecsKt$collectionCodec$2.invokeSuspend(CollectionCodecs.kt:63)
    	at org.gradle.configurationcache.serialization.codecs.CollectionCodecsKt$collectionCodec$2.invoke(CollectionCodecs.kt)
    	at org.gradle.configurationcache.serialization.CombinatorsKt$codec$1.decode(Combinators.kt:87)
    	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:64)
    	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:247)
    	at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:102)
    	at org.gradle.configurationcache.serialization.beans.BeanPropertyReader.readStateOf(BeanPropertyReader.kt:67)
    	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.readTask(TaskNodeCodec.kt:126)
    	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.decode(TaskNodeCodec.kt:75)
    	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:64)
    	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:247)
    	at org.gradle.configurationcache.serialization.CodecKt.readNonNull(Codec.kt:88)
    	at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readNode(WorkNodeCodec.kt:84)
    	at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readNodes(WorkNodeCodec.kt:65)
    	at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readWork(WorkNodeCodec.kt:45)
    	at org.gradle.configurationcache.ConfigurationCacheState.readWorkGraph(ConfigurationCacheState.kt:255)
    	at org.gradle.configurationcache.ConfigurationCacheState.readBuildState$configuration_cache(ConfigurationCacheState.kt:227)
    	at org.gradle.configurationcache.ConfigurationCacheState.readRootBuild(ConfigurationCacheState.kt:184)
    	at org.gradle.configurationcache.ConfigurationCacheState.readRootBuildState(ConfigurationCacheState.kt:113)
    	at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invokeSuspend(ConfigurationCacheIO.kt:71)
    	at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invoke(ConfigurationCacheIO.kt)
    	at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$1.invokeSuspend(ConfigurationCacheIO.kt:100)
    	at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$1.invoke(ConfigurationCacheIO.kt)
    	at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$$inlined$let$lambda$1.invokeSuspend(ConfigurationCacheIO.kt:160)
    	at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$$inlined$let$lambda$1.invoke(ConfigurationCacheIO.kt)
    	at org.gradle.configurationcache.serialization.RunningKt$runReadOperation$2.invokeSuspend(Running.kt:34)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
    	at org.gradle.configurationcache.serialization.RunningKt.runToCompletion(Running.kt:56)
    	at org.gradle.configurationcache.serialization.RunningKt.runReadOperation(Running.kt:33)
    	at org.gradle.configurationcache.ConfigurationCacheIO.withReadContextFor$configuration_cache(ConfigurationCacheIO.kt:159)
    	at org.gradle.configurationcache.ConfigurationCacheIO.readConfigurationCacheState(ConfigurationCacheIO.kt:98)
    	at org.gradle.configurationcache.ConfigurationCacheIO.readRootBuildStateFrom$configuration_cache(ConfigurationCacheIO.kt:69)
    	at org.gradle.configurationcache.DefaultConfigurationCache$loadWorkGraph$1.invoke(DefaultConfigurationCache.kt:292)
    	at org.gradle.configurationcache.DefaultConfigurationCache$loadWorkGraph$1.invoke(DefaultConfigurationCache.kt:47)
    	at org.gradle.configurationcache.ConfigurationCacheRepository$useForStateLoad$1.invoke(ConfigurationCacheRepository.kt:76)
    	at org.gradle.configurationcache.ConfigurationCacheRepository$useForStateLoad$1.invoke(ConfigurationCacheRepository.kt:43)
    	at org.gradle.configurationcache.ConfigurationCacheRepository$withBaseCacheDirFor$1.create(ConfigurationCacheRepository.kt:202)
    	at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.withFileLock(LockOnDemandCrossProcessCacheAccess.java:90)
    	at org.gradle.cache.internal.DefaultCacheAccess.withFileLock(DefaultCacheAccess.java:191)
    	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.withFileLock(DefaultPersistentDirectoryStore.java:188)
    	at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.withFileLock(DefaultCacheFactory.java:209)
    	at org.gradle.configurationcache.ConfigurationCacheRepository.withBaseCacheDirFor(ConfigurationCacheRepository.kt:200)
    	at org.gradle.configurationcache.ConfigurationCacheRepository.useForStateLoad(ConfigurationCacheRepository.kt:74)
    	at org.gradle.configurationcache.DefaultConfigurationCache$loadFromCache$result$1.invoke(DefaultConfigurationCache.kt:306)
    	at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt$withOperation$1.call(ConfigurationCacheBuildOperations.kt:43)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    	at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt.withOperation(ConfigurationCacheBuildOperations.kt:37)
    	at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt.withLoadOperation(ConfigurationCacheBuildOperations.kt:27)
    	at org.gradle.configurationcache.DefaultConfigurationCache.loadFromCache(DefaultConfigurationCache.kt:305)
    	at org.gradle.configurationcache.DefaultConfigurationCache.loadWorkGraph(DefaultConfigurationCache.kt:291)
    	at org.gradle.configurationcache.DefaultConfigurationCache.loadOrScheduleRequestedTasks(DefaultConfigurationCache.kt:115)
    	at org.gradle.configurationcache.ConfigurationCacheAwareBuildTreeWorkPreparer.scheduleRequestedTasks(ConfigurationCacheAwareBuildTreeWorkPreparer.kt:27)
    	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$doScheduleAndRunTasks$2(DefaultBuildTreeLifecycleController.java:86)
    	at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewTaskGraph(DefaultIncludedBuildTaskGraph.java:94)
    	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.doScheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:85)
    	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:103)
    	at org.gradle.internal.build.StateTransitionController.lambda$transition$0(StateTransitionController.java:145)
    	at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:243)
    	at org.gradle.internal.build.StateTransitionController.transition(StateTransitionController.java:145)
    	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:100)
    	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:66)
    	at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:53)
    	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    	at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
    	at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:69)
    	at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:114)
    	at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    	at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
    	at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:155)
    	at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
    	at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    	at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
    	at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
    	at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
    	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
    	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
    	at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:38)
    	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211)
    	at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:38)
    	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:103)
    	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    	at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
    	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
    	at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
    	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
    	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
    	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
    	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
    	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
    	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58)
    	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
    	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
    	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
    	at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
    	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    	at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
    Caused by: java.lang.reflect.InvocationTargetException
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at org.gradle.configurationcache.serialization.codecs.jos.JavaObjectSerializationCodec.readResolve(JavaObjectSerializationCodec.kt:232)
    	at org.gradle.configurationcache.serialization.codecs.jos.JavaObjectSerializationCodec.decode(JavaObjectSerializationCodec.kt:135)
    	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:64)
    	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:247)
    	at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:102)
    	... 150 more
    Caused by: java.io.InvalidObjectException: ReflectiveOperationException during deserialization
    	... 158 more
    Caused by: java.lang.reflect.InvocationTargetException
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	... 158 more
    Caused by: java.lang.ClassCastException: class org.gradle.api.internal.provider.Providers$NoValueProvider cannot be cast to class org.gradle.api.tasks.TaskProvider (org.gradle.api.internal.provider.Providers$NoValueProvider and org.gradle.api.tasks.TaskProvider are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @694f9431)
    	at com.diffplug.gradle.spotless.SpotlessExtensionImpl.$deserializeLambda$(SpotlessExtensionImpl.java)
    	... 161 more
    
    

    I suspected that this was due to the strange way that Spotless uses the configuration cache. In a fresh console, I did ./gradlew spotlessApply, and I got the error message that I expected:

    Execution failed for task ':spotlessMisc'.
    > Error while evaluating property 'lineEndingsPolicy' of task ':spotlessMisc'
       > Spotless JVM-local cache is stale. Regenerate the cache with
           rm -rf .gradle/configuration-cache
         To make this workaround obsolete, please upvote https://github.com/diffplug/spotless/issues/987
    

    So then I did rm -rf .gradle/configuration-cache and tried the plugin again. Surprisingly, same error as before. If I disable configuration-cache, the plugin works great.

    Spotless should fix its bug so that -PspotlessIdeHook is compatible with configuration cache. But in the meantime, this IntelliJ plugin can workaround this by adding --no-configuration-cache.

    opened by nedtwigg 0
  • Update IntelliJ marketplace listing with link to GitHub

    Update IntelliJ marketplace listing with link to GitHub

    Looking at the marketplace listing: https://plugins.jetbrains.com/plugin/18321-spotless-gradle

    I can't find an easy link to the code on GitHub. That's a problem for users who want to report bugs and/or add enhancements. Maybe add something like this to the Marketplace description?

    Please report bugs or contribute enhancements on GitHub (ragurney/spotless-intellij-gradle).

    opened by nedtwigg 0
  • Add option to reformat all changed files

    Add option to reformat all changed files

    Currently, only the currently selected file can be formatted, which is cumbersome if you have a lot of files. Would it be possible to add an option to format all files that were changed?

    Btw, if this is something you think would be a good addition, I can also have a go at contributing this myself.

    Kind regards

    opened by jrepe 0
  • Add ActionOnSave

    Add ActionOnSave

    opened by oraum 1
Releases(v1.0.10)
Owner
Ryan Gurney
Ryan Gurney
:package: Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.

JavaPackager JavaPackager is a hybrid plugin for Maven and Gradle which provides an easy way to package Java applications in native Windows, Mac OS X

Francisco Vargas Ruiz 665 Jan 8, 2023
Convenient search view for Eclipse to find/replace within the currently active editor.

Find/Replace View plugin for Eclipse Feedback and high-quality pull requests are highly welcome! About What is it? Installation Building from Sources

Sebastian Thomschke 3 May 25, 2022
Plugin-fineagent - A plugin for the ja-netfilter, it allows you to use fineagent in ja-netfilter.

plugin-fineagent A plugin for the ja-netfilter, it allows you to use fineagent in ja-netfilter. Use the mvn clean package command to compile and use F

null 19 Jun 25, 2022
maven plugin for making chmod +x jar files

To use it, add a plugin to your pom like <!-- You need to build an exectuable uberjar, I like Shade for that --> <plugin> <groupId>org.apache.mave

Brian McCallister 113 Dec 8, 2022
Launch4j Maven Plugin

Launch4j Maven Plugin

Lukasz Lenart 301 Dec 29, 2022
A BurpSuite plugin for BBRF

bbrf-burp-plugin What's BBRF? The Bug Bounty Reconnaissance Framework (BBRF) is intended to facilitate the workflows of security researchers across mu

Pieter 19 Jun 22, 2022
Maven plugin to help creating CHANGELOG by keeping one format and solving merge request conflicts problem by extraction of new CHANGELOG entries to seperate files.

keep-changelog-maven-plugin CHANGELOG.md is one of the most important files in a repository. It allows others to find out about the most important cha

Piotr Zmilczak 22 Aug 28, 2022
HopLa Burp Suite Extender plugin - Adds autocompletion support and useful payloads in Burp Suite

HopLa ?? All the power of PayloadsAllTheThings, without the overhead. This extension adds autocompletion support and useful payloads in Burp Suite to

Synacktiv 522 Dec 24, 2022
Flutter plugin to listen to the process text intent stream.

Flutter Process Text Plugin Show some ❤️ and ⭐ the repo Why use Flutter Process Text? Flutter Process Text Plugin is known for : Flutter Process Text

Divyanshu Shekhar 14 Jul 1, 2022
AspectJ Maven Plugin

AspectJ Maven Plugin Overview This plugin weaves AspectJ aspects into your classes using the AspectJ compiler ajc. Typically, aspects are used in one

null 19 Dec 9, 2022
Ask and replay plugin for Mirai-Console

EntryLib EntryLib 是一个基于 Mirai-Console 的插件,用于实现群词条、自定义回复或更多功能。 目录 声明 使用方法 基本指令列表 额外说明 配置项 控制台 数据库结构 To-Do List 插件依赖 声明 本插件仅作为学习交流等使用,请勿用于盈利,否则法律后果自负。 欢

Bill Yang 33 Oct 25, 2022
Flutter plugin to listen to the process text intent stream.

Flutter Process Text Plugin Compatibility ✅ Android ❌ iOS (active issue: iOS support) Show some ❤️ and ⭐ the repo Why use Flutter Process Text? Flutte

Devs On Flutter 14 Jul 1, 2022
This simple Android Studio plugin includes keyboard shortcuts for many common actions.

Hotkeys This simple Android Studio plugin includes keyboard shortcuts for many common actions. Features • Build process • Contribute • License Feature

SACHIN KASARADDI 14 Apr 26, 2022
A simple but helpful fight plugin with rank support

RankFight A simple but helpful fight plugin with rank support HighLights PlceholderAPI Support %rankfight_rank% %rankfight_credit% %rankfight_shopCred

贺兰星辰 5 Nov 20, 2021
Ghidra Wasm plugin with disassembly and decompilation support

Module to load WebAssembly files into Ghidra, supporting disassembly and decompilation. This plugin borrows loader functionality from this repo: https

Garrett Gu 54 Nov 22, 2022
The best plugin to protect anarchy servers and mc servers in general against op attacks.

AdminSecure The best plugin to protect anarchy servers and mc servers in general against op attacks How does it work? When the server detects a player

PK2_Stimpy 3 Sep 2, 2021
Source code of Trend's Manhunt plugin

Trend's Manhunt This is the official repository of my Manhunt plugin. Contribution You are allowed to contribute, but NOT to yoink all of my plugin co

flpae 1 Oct 19, 2022
A Flutter plugin to extract waveform data from an audio file suitable for visual rendering.

just_waveform This plugin extracts waveform data from an audio file that can be used to render waveform visualisations. Usage final progressStream = J

null 53 Dec 4, 2022
GMC-Tools - Plugin with basic tools for Minecraft server administrator

GMC-Tools - Plugin with basic tools for Minecraft server administrator. Currently we do not support configuration files and we do not recommend using this plugin on production servers.

GamesMC Studios 4 Jan 14, 2022