-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
intellij.systemProperties does not work #173
Comments
// other config...
def DEBUG_MODE = true
intellij {
version 'IC-2016.2'
pluginName 'MyPlugin'
systemProperties = [
"hello": "world"
]
systemProperty "debug.mode", DEBUG_MODE
}
// add following lines
runIdea.doFirst {
runIdea.systemProperties(runIdea.systemProperties)
// or runIdea.systemProperties += [:]
} 🎉🎉 now it work!~ |
I check my I can get following properties from
clone the repo(plugin version 0.2.1) and found: // IntelliJPlugin.groovy
project.tasks.create(RUN_IDEA_TASK_NAME, RunIdeaTask).with {
group = GROUP_NAME
description = "Runs Intellij IDEA with installed plugin."
conventionMapping.map("ideaDirectory", { Utils.ideaSdkDirectory(extension) })
conventionMapping.map("systemProperties", { extension.systemProperties })
// ...
} // RunIdeaTask.groovy
def configureSystemProperties() {
systemProperties(Utils.getIdeaSystemProperties(getConfigDirectory(), getSystemDirectory(), getPluginsDirectory(), getRequiredPluginIds()))
def operatingSystem = OperatingSystem.current()
if (operatingSystem.isMacOsX()) {
systemProperty("idea.smooth.progress", false)
systemProperty("apple.laf.useScreenMenuBar", true)
} else if (operatingSystem.isUnix() && !getSystemProperties().containsKey("sun.awt.disablegrab")) {
systemProperty("sun.awt.disablegrab", true)
}
systemProperty("idea.classpath.index.enabled", false)
systemProperty("idea.is.internal", true)
if (!getSystemProperties().containsKey('idea.platform.prefix')) {
def matcher = Utils.VERSION_PATTERN.matcher(Utils.ideaBuildNumber(getIdeaDirectory()))
if (matcher.find()) {
def prefix = PREFIXES.get(matcher.group(1))
if (prefix) {
systemProperty('idea.platform.prefix', prefix)
}
}
}
} learn from Can gradle extensions handle lazy evaluation of a property? - Stack Overflow so the plugin setting add following lines in build.gradle, the problem get solved now 😃 runIdea.doFirst {
runIdea.systemProperties(runIdea.systemProperties)
// or runIdea.systemProperties += [:]
} then I a make pull request, please check |
According to README, I try to set system properties in this way (plugin version 0.2.1)
but I could not get the system properties
result:
is there something wrong?
The text was updated successfully, but these errors were encountered: