I’m about to start working on a Gradle plugin for the Kotlin-to-JS compiler. As a first step I tried to open the kotlin-gradle-plugin in IDEA, but it can’t resolve org.jetbrains.jet
I’m on OSX 10.9.4, IDEA 14 CE #IC-139.1 with the stable Maven ant Ant plugins, and the snapshot Kotlin plugin (0.8.1672 at the moment). java 1.7.0_45, ant 1.9.4, maven 3.2.3.
Here’s what I did, following the instructions in the README files:
git clone email@example.com:JetBrains/kotlin.git cd kotlin ant -f update_dependencies.xml ant -f build.xml cd libraries MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m" mvn package
That failed in some JS-related tests, but I don't care about those yet, so:
env MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m" mvn package -Dmaven.test.skip=true
This succeeded. Then I opened libraries/pom.xml as a Maven project with IDEA. The project structure looks fine at a glance, even dependencies look reasonable. But unfortunately Idea doesn't know about, for example, K2JSCompiler.
I then opened the IDEA project in the root of the repo, enabled auto-import of maven projects, set the project SDK to the Java SDK installed on my system, noted that the libraries project is not imported, so imported it manually. Now in KotlinPlugin.kt K2JVMCompilerArguments is red on the import line, but strangely IDEA auto-completes the packages up to the class.
I also ran an mvn install in libraries just in case, didn’t affect the issue.
Probably unrelated: IDEA also sees some errors related to null-correctness; I guess it fails to pick up the proper Kotlin annotations.
I’d love to get some pointers on what could be going wrong. I’ll be happy to provide any more info or logs if needed.