Remove android-compiler-plugin from dependencies of android-jps-plugin
This commit is contained in:
-1
@@ -9,7 +9,6 @@
|
|||||||
<element id="directory" name="jps">
|
<element id="directory" name="jps">
|
||||||
<element id="archive" name="kotlin-android-extensions-jps.jar">
|
<element id="archive" name="kotlin-android-extensions-jps.jar">
|
||||||
<element id="module-output" name="android-jps-plugin" />
|
<element id="module-output" name="android-jps-plugin" />
|
||||||
<element id="module-output" name="plugin-api" />
|
|
||||||
</element>
|
</element>
|
||||||
</element>
|
</element>
|
||||||
<element id="archive" name="android-compiler-plugin.jar">
|
<element id="archive" name="android-compiler-plugin.jar">
|
||||||
|
|||||||
@@ -22,22 +22,23 @@ import org.jetbrains.jps.incremental.CompileContext
|
|||||||
import org.jetbrains.jps.model.module.JpsModule
|
import org.jetbrains.jps.model.module.JpsModule
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import org.jetbrains.jps.android.AndroidJpsUtil
|
import org.jetbrains.jps.android.AndroidJpsUtil
|
||||||
import org.jetbrains.kotlin.compiler.plugin.CliOption
|
|
||||||
import org.jetbrains.kotlin.android.AndroidCommandLineProcessor
|
|
||||||
import org.jetbrains.kotlin.compiler.plugin.getPluginOptionString
|
|
||||||
import com.intellij.util.PathUtil
|
import com.intellij.util.PathUtil
|
||||||
|
|
||||||
public class KotlinAndroidJpsPlugin : KotlinJpsCompilerArgumentsProvider {
|
public class KotlinAndroidJpsPlugin : KotlinJpsCompilerArgumentsProvider {
|
||||||
private val jarFileName = "android-compiler-plugin.jar"
|
private val jarFileName = "android-compiler-plugin.jar"
|
||||||
|
|
||||||
|
private fun getPluginOptionString(pluginId: String, key: String, value: String): String {
|
||||||
|
return "plugin:$pluginId:$key=$value"
|
||||||
|
}
|
||||||
|
|
||||||
override fun getExtraArguments(moduleBuildTarget: ModuleBuildTarget, context: CompileContext): List<String> {
|
override fun getExtraArguments(moduleBuildTarget: ModuleBuildTarget, context: CompileContext): List<String> {
|
||||||
val module = moduleBuildTarget.getModule()
|
val module = moduleBuildTarget.getModule()
|
||||||
val pluginId = AndroidCommandLineProcessor.ANDROID_COMPILER_PLUGIN_ID
|
val pluginId = "org.jetbrains.kotlin.android"
|
||||||
val resPath = getAndroidResPath(module)
|
val resPath = getAndroidResPath(module)
|
||||||
val manifestFile = getAndroidManifest(module)
|
val manifestFile = getAndroidManifest(module)
|
||||||
return if (resPath != null && manifestFile != null) listOf(
|
return if (resPath != null && manifestFile != null) listOf(
|
||||||
getPluginOptionString(pluginId, AndroidCommandLineProcessor.RESOURCE_PATH_OPTION.name, resPath),
|
getPluginOptionString(pluginId, "androidRes", resPath),
|
||||||
getPluginOptionString(pluginId, AndroidCommandLineProcessor.MANIFEST_FILE_OPTION.name, manifestFile))
|
getPluginOptionString(pluginId, "androidManifest", manifestFile))
|
||||||
else listOf()
|
else listOf()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user