mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Warn if tools.jar can’t be found.
This commit is contained in:
parent
7e86b5ae86
commit
fd80166186
1 changed files with 4 additions and 3 deletions
|
@ -159,8 +159,6 @@ class AptPlugin @Inject constructor(val dependencyManager: DependencyManager, va
|
||||||
var success = true
|
var success = true
|
||||||
val flags = arrayListOf<String>()
|
val flags = arrayListOf<String>()
|
||||||
kaptConfig?.let { config ->
|
kaptConfig?.let { config ->
|
||||||
|
|
||||||
|
|
||||||
val generated = generated(project, context, config.outputDir)
|
val generated = generated(project, context, config.outputDir)
|
||||||
val generatedSources = generatedSources(project, context, config.outputDir).replace("//", "/")
|
val generatedSources = generatedSources(project, context, config.outputDir).replace("//", "/")
|
||||||
File(generatedSources).mkdirs()
|
File(generatedSources).mkdirs()
|
||||||
|
@ -173,9 +171,12 @@ class AptPlugin @Inject constructor(val dependencyManager: DependencyManager, va
|
||||||
flags.add(annotationProcessorDependency().jarFile.get().absolutePath)
|
flags.add(annotationProcessorDependency().jarFile.get().absolutePath)
|
||||||
|
|
||||||
// Also need tools.jar on the plug-in classpath
|
// Also need tools.jar on the plug-in classpath
|
||||||
jvm.toolsJar?.let { toolsJar ->
|
val toolsJar = jvm.toolsJar
|
||||||
|
if (toolsJar != null) {
|
||||||
flags.add("-Xplugin")
|
flags.add("-Xplugin")
|
||||||
flags.add(toolsJar.absolutePath)
|
flags.add(toolsJar.absolutePath)
|
||||||
|
} else {
|
||||||
|
warn("Couldn't find tools.jar from the JDK")
|
||||||
}
|
}
|
||||||
|
|
||||||
aptJarDependencies(project).forEach {
|
aptJarDependencies(project).forEach {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue