A way to query IntelliJ version in Gradle Import

已回答

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
正式评论

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

请先登录再写评论。