mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
Add tools.jar on the annotation plug-in classpath.
This commit is contained in:
parent
1febd47368
commit
35fe4f6494
1 changed files with 7 additions and 6 deletions
|
@ -151,11 +151,6 @@ class AptPlugin @Inject constructor(val dependencyManager: DependencyManager, va
|
|||
val allDeps = arrayListOf<IClasspathDependency>()
|
||||
allDeps.add(annotationProcessorDependency())
|
||||
allDeps.addAll(aptJarDependencies(project))
|
||||
|
||||
// jvm.toolsJar?.let { toolsJar ->
|
||||
// allDeps.add(FileDependency(toolsJar.absolutePath))
|
||||
// }
|
||||
|
||||
return allDeps
|
||||
}
|
||||
|
||||
|
@ -175,11 +170,17 @@ class AptPlugin @Inject constructor(val dependencyManager: DependencyManager, va
|
|||
val allDeps = allDependencies(project)
|
||||
flags.add("-Xplugin")
|
||||
flags.add(annotationProcessorDependency().jarFile.get().absolutePath)
|
||||
flags.add("-P")
|
||||
|
||||
// Also need tools.jar on the plug-in classpath
|
||||
jvm.toolsJar?.let { toolsJar ->
|
||||
flags.add("-Xplugin")
|
||||
flags.add(toolsJar.absolutePath)
|
||||
}
|
||||
|
||||
//
|
||||
// Pass options to the annotation plugin
|
||||
//
|
||||
flags.add("-P")
|
||||
fun kaptPluginFlag(flagValue: String) = "plugin:org.jetbrains.kotlin.kapt3:$flagValue"
|
||||
val kaptPluginFlags = arrayListOf<String>()
|
||||
val verbose = KobaltLogger.LOG_LEVEL >= 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue