mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Rename plugin.xml -> kobalt-plugin.xml.
This commit is contained in:
parent
125868db13
commit
5dc2f9c2e1
5 changed files with 10 additions and 10 deletions
|
@ -79,7 +79,7 @@ private class Main @Inject constructor(
|
|||
addReposFromContributors(null)
|
||||
|
||||
//
|
||||
// Add all the plugins read in plugin.xml to the Plugins singleton, so that code
|
||||
// Add all the plugins read in kobalt-plugin.xml to the Plugins singleton, so that code
|
||||
// in the build file that calls Plugins.findPlugin() can find them (code in the
|
||||
// build file do not have access to the KobaltContext).
|
||||
//
|
||||
|
|
|
@ -148,7 +148,7 @@ public class Plugins @Inject constructor (val taskManagerProvider : Provider<Tas
|
|||
depFactory.create(it.id, executor)
|
||||
|
||||
//
|
||||
// Open the jar, parse its plugin.xml and add the resulting PluginInfo to pluginInfo
|
||||
// Open the jar, parse its kobalt-plugin.xml and add the resulting PluginInfo to pluginInfo
|
||||
//
|
||||
val pluginXml = JarUtils.extractTextFile(JarFile(it.jarFile.get()), PluginInfo.PLUGIN_XML)
|
||||
if (pluginXml != null) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.beust.kobalt.api
|
|||
|
||||
/**
|
||||
* The factory function to use to instantiate all the contributors and other entities
|
||||
* found in plugin.xml.
|
||||
* found in kobalt-plugin.xml.
|
||||
*/
|
||||
interface IFactory {
|
||||
fun <T> instanceOf(c: Class<T>) : T
|
||||
|
|
|
@ -9,7 +9,7 @@ import javax.xml.bind.annotation.XmlElement
|
|||
import javax.xml.bind.annotation.XmlRootElement
|
||||
|
||||
//
|
||||
// Operations related to the parsing of plugin.xml: XML parsing, PluginInfo, etc...
|
||||
// Operations related to the parsing of kobalt-plugin.xml: XML parsing, PluginInfo, etc...
|
||||
//
|
||||
|
||||
/**
|
||||
|
@ -22,10 +22,10 @@ class GuiceFactory : IFactory {
|
|||
/////
|
||||
// XML parsing
|
||||
//
|
||||
// The following classes are used by JAXB to parse the plugin.xml file.
|
||||
// The following classes are used by JAXB to parse the kobalt-plugin.xml file.
|
||||
|
||||
/**
|
||||
* The root element of plugin.xml
|
||||
* The root element of kobalt-plugin.xml
|
||||
*/
|
||||
@XmlRootElement(name = "kobalt-plugin")
|
||||
class KobaltPluginXml {
|
||||
|
@ -65,7 +65,7 @@ class ClassNameXml {
|
|||
}
|
||||
|
||||
/**
|
||||
* Turn a KobaltPluginXml (the raw content of plugin.xml mapped to POJO's) into a PluginInfo object, which contains
|
||||
* Turn a KobaltPluginXml (the raw content of kobalt-plugin.xml mapped to POJO's) into a PluginInfo object, which contains
|
||||
* all the contributors instantiated and other information that Kobalt can actually use. Kobalt code that
|
||||
* needs to access plug-in info can then just inject a PluginInfo object.
|
||||
*/
|
||||
|
@ -82,10 +82,10 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
|
|||
// compilers
|
||||
|
||||
companion object {
|
||||
val PLUGIN_XML = "META-INF/plugin.xml" // Plugins.PLUGIN_XML)
|
||||
val PLUGIN_XML = "META-INF/kobalt-plugin.xml" // Plugins.PLUGIN_XML)
|
||||
|
||||
/**
|
||||
* Read Kobalt's own plugin.xml.
|
||||
* Read Kobalt's own kobalt-plugin.xml.
|
||||
*/
|
||||
fun readKobaltPluginXml(): PluginInfo {
|
||||
// Note: use forward slash here since we're looking up this file in a .jar file
|
||||
|
@ -98,7 +98,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Read a general plugin.xml.
|
||||
* Read a general kobalt-plugin.xml.
|
||||
*/
|
||||
fun readPluginXml(ins: InputStream, classLoader: ClassLoader? = null): PluginInfo {
|
||||
val jaxbContext = JAXBContext.newInstance(KobaltPluginXml::class.java)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue