intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Deterministic order of ideaIC dependencies

Open rubenpieters opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. The plugin seems to have a non-deterministic order when it's utilizing the ideaIC dependencies. When I compare a gradle build scan for a build on different machines, I can see that the ordering of the dependencies in the classpath is different:

Screenshot from 2023-01-20 13-48-11

Describe the solution you'd like Ideally these dependencies would have a deterministic order, this way gradle can use the cache when the sources haven't changed. It looks like it could be related to the use of FileTree in DependenciesUtils (link). Maybe the dependencies could be sorted?

Additional context Relevant gradle snippet:

plugins {
    ..
    id 'org.jetbrains.intellij' version '1.12.0'
    ..
}

intellij {
    setVersion('IC-2018.3.4')
    setPlugins(['android'])
    setPluginName('...')
    downloadSources.set(true)
}

rubenpieters avatar Jan 20 '23 13:01 rubenpieters

There's a plan to rework dependencies management so everything that is required for building the plugin will be explicitly described in the dependencies {} closure of the build script.

hsz avatar Jan 20 '23 15:01 hsz

Starting with the IntelliJ Platform Gradle Plugin, all dependencies — including the IntelliJ Platform — are defined within the dependencies {} block, which makes it possible to control the order. Please see: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html

hsz avatar Mar 14 '24 15:03 hsz