Codebase update

This commit is contained in:
Yan Zhulanow
2015-02-03 18:37:49 +03:00
parent 346dbe3f7c
commit c756cfef86
46 changed files with 197 additions and 355 deletions
@@ -24,8 +24,8 @@ import java.io.File
import org.jetbrains.jps.android.AndroidJpsUtil
import org.jetbrains.kotlin.compiler.plugin.CliOption
import org.jetbrains.kotlin.android.AndroidCommandLineProcessor
import org.jetbrains.jet.utils.PathUtil
import org.jetbrains.kotlin.compiler.plugin.getPluginOptionString
import com.intellij.util.PathUtil
public class KotlinAndroidJpsPlugin : KotlinJpsCompilerArgumentsProvider {
private val jarFileName = "android-compiler-plugin.jar"
@@ -42,16 +42,16 @@ public class KotlinAndroidJpsPlugin : KotlinJpsCompilerArgumentsProvider {
}
override fun getClasspath(moduleBuildTarget: ModuleBuildTarget, context: CompileContext): List<String> {
val inJar = PathUtil.getJarPathForClass(javaClass).isFile()
val inJar = File(PathUtil.getJarPathForClass(javaClass)).isFile()
val manifestFile = getAndroidManifest(moduleBuildTarget.getModule())
return if (manifestFile != null) {
listOf(
if (inJar) {
val libDirectory = PathUtil.getJarPathForClass(javaClass).getParentFile().getParentFile()
val libDirectory = File(PathUtil.getJarPathForClass(javaClass)).getParentFile().getParentFile()
File(libDirectory, jarFileName).getAbsolutePath()
} else {
// We're in tests now (in out/production/android-jps-plugin)
val kotlinProjectDirectory = PathUtil.getJarPathForClass(javaClass).getParentFile().getParentFile().getParentFile()
val kotlinProjectDirectory = File(PathUtil.getJarPathForClass(javaClass)).getParentFile().getParentFile().getParentFile()
File(kotlinProjectDirectory, "dist/kotlinc/lib/$jarFileName").getAbsolutePath()
})
}