A way to query IntelliJ version in Gradle Import

Answered

I have workaround code in my Gradle script (see https://youtrack.jetbrains.com/issue/IDEA-160175 for more info) that only needed when importing Gradle for builds below 163.something.

I would like this code only be invoked when importing into Gradle for particular versions of IntelliJ. It would be also helpful as a documentation in the script.

Is there a way to do something like:

        if (environment.IntelliJVersion && environment.IntelliJVersion < 163) {
             // my workaround code
        }

Thanks,

-- Sasha

0
1 comment
Official comment

Unfortunately there is no such property passed to gradle daemon process, sorry. It will be a good feature for next IntelliJ versions.

Please sign in to leave a comment.