I am using Gradle 2.3 inside of IntelliJ IDEA 15 CE and Android Studio 1.3.2 and have always wondered what the situation is with gradle autocomplete / syntax highlighting etc.
When I look at a build.gradle file most of the code is dark gray and underlined, even keywords like task giving Cannot resolve symbol 'task'.
Coming from using Java in IDEA I find it disorientating and I would expect that types (like Javadoc) would be click through-able and auto-complete would offer me relevant stuff (like the methods and properties of Javadoc when inside the above task).
It would also be great if I could enumerate the source sets for this build file via autocomplete at the sourceSets., which I appreciate may need gradle to have executed the config build step to provide this info.
Am I missing something obvious or is Gradle tooling inside IDEA just not as good as the Java equivalents?
Thanks!
It could be Cucumber for Groovy plugin. As I know Gradle use some techniques and syntax of Groovy, so I tried to install some Groovy plugins and success at the first try.
Steps to install this plug in:
on MacOS: Preferences... -> Install JetBrains plugin... -> Cucumber
for Groovy.
Related
As the question mentions, what happens when AndroidStudio does indexing? What is the use of indexing?
Could somebody please help me understand.
from https://www.jetbrains.com/
while Android studio is using InteliJ idea :
Indexing in IntelliJ IDEA is responsible for the core features of the
IDE: code completion, inspections, finding usages, navigation, syntax
highlighting, and refactorings.
It starts when you open your project, switch between branches, after
you load or unload plugins, and after large external file updates. For
example, this can happen if multiple files in your project are created
or generated after you build your project.
you can read more about IntelliJ indexing here https://www.jetbrains.com/help/idea/indexing.html
I am using Serenity Cucumber4, and I am trying to find a way to get prompts when I am writing feature files that can tell me what step definition glue codes are available to me. Otherwise I would do it as I am currently, going into step definition files and copy/pasting the glue code into the feature file.
Is there a plugin for eclipse or vscode? Or maybe a special IDE that has this built it? Or, would I need to create my own plugin for this (I don't know how)?
If switching to IntelliJ is an option, there are plugins available to achieve this.
It seems I can't add custom postfix completions for Kotlin in neither IntelliJ IDEA (2018.3), nor in Android studio (3.2.1). If I go to preferences | Editor | General | Postfix Completion and I click the add button, there is no option for Kotlin (see screenshots below). Is it possible to add new postfix completions?
I'd like to add a .with postfix completion, so that x.with would expand to
with(x) {
// The caret should go here
}
Side note: I think it's a shame there is no postfix completion for with out of the box.
Screenshots of IntelliJ IDEA (2018.3) and Android Studio (3.2.1):
I checked, and it's not possible in Android Studio nor IntelliJ. Probably the definition language doesn't have support for Kotlin yet.
However, what you could try, is try the following plugin: https://plugins.jetbrains.com/plugin/9862-custom-postfix-templates.
It seems to be well maintained, and has support for Scala, Kotlin, Groovy, etc. I haven't tried it myself, but based on the documentation, it seems to be what you're looking for.
In every example I've seeing floating around the internet, they say to build an android library, I should apply the android-library plugin. When I use the AndroidStudio IDE wizard to set up a library, it applies the com.android.library plugin instead. Are these the same thing?
They're the same thing. The fully-qualified form is replacing the old style, which is deprecated. This will become important in the future because Gradleware is planning on implementing a global plugin repository to replace the need to specify repositories in a buildscript tag, and using fully-qualified names will help properly locate plugins in that repository.
I'm in the process of upgrading a project to Groovy v1.6. When I installed IntelliJ, my GROOVY_HOME environment variable was pointing to Groovy v1.5.7, but now that I've changed GROOVY_HOME to point to v1.6, it's not clear whether IntelliJ is also using the more recent version.
How can I check which version of Groovy IntelliJ is using?
I believe you want to use the File -> Project Structure menu item. Then look at your Libraries and Facets (expand for Groovy) options.
Use "Add Framework Support":
Right click on your module and choose "Add Framework Support...". There you can add/change the groovy version
http://blogs.jetbrains.com/idea/2009/09/groovy-related-configuration-changes/
Found this old thread looking for a similar thing, but ended up figuring it out myself.
In my case, the project was boostrapped with Gradle. I didn't have a standalone Groovy version installed on my machine.
Open Tools -> Groovy Console..., and type pretty much any command and run it. It showed me the path to Gradle cache, which included Groovy version, near the top of the new window:
.../.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-all/2.4.12/...
Also check build.gradle as it may have some hints as to which version the project uses.