Idea plugin and multi-project setup

I’m trying to setup a multi-module gradle project with Idea support. It works until I’m adding project-wide gradle.properties to the mix. Here’s an example:

gradle.properties:

javaVersion = 1.8

gradle.settings:

include 'module_a'

build.gradle:

allprojects {
  apply plugin: 'idea'
  idea {
    project {
      jdkName = javaVersion
    }
  }
}

module_a is an empty sub-folder.

gradle idea fails with this:

Build file 'project/build.gradle' line: 7

* What went wrong:
A problem occurred evaluating root project 'project'.
> Cannot set property 'jdkName' on null object

Looks like a bug to me, but I’m not sure. What could be the reason?
Gradle 2.12