1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 08:38:13 -07:00

Rename plugin.xml -> kobalt-plugin.xml.

This commit is contained in:
Cedric Beust 2015-11-16 03:09:51 -08:00
parent 125868db13
commit 5dc2f9c2e1
5 changed files with 10 additions and 10 deletions

View file

@ -79,7 +79,7 @@ private class Main @Inject constructor(
addReposFromContributors(null) 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 // in the build file that calls Plugins.findPlugin() can find them (code in the
// build file do not have access to the KobaltContext). // build file do not have access to the KobaltContext).
// //

View file

@ -148,7 +148,7 @@ public class Plugins @Inject constructor (val taskManagerProvider : Provider<Tas
depFactory.create(it.id, executor) 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) val pluginXml = JarUtils.extractTextFile(JarFile(it.jarFile.get()), PluginInfo.PLUGIN_XML)
if (pluginXml != null) { if (pluginXml != null) {

View file

@ -2,7 +2,7 @@ package com.beust.kobalt.api
/** /**
* The factory function to use to instantiate all the contributors and other entities * The factory function to use to instantiate all the contributors and other entities
* found in plugin.xml. * found in kobalt-plugin.xml.
*/ */
interface IFactory { interface IFactory {
fun <T> instanceOf(c: Class<T>) : T fun <T> instanceOf(c: Class<T>) : T

View file

@ -9,7 +9,7 @@ import javax.xml.bind.annotation.XmlElement
import javax.xml.bind.annotation.XmlRootElement 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 // 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") @XmlRootElement(name = "kobalt-plugin")
class KobaltPluginXml { 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 * 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. * 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 // compilers
companion object { 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 { fun readKobaltPluginXml(): PluginInfo {
// Note: use forward slash here since we're looking up this file in a .jar file // 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 { fun readPluginXml(ins: InputStream, classLoader: ClassLoader? = null): PluginInfo {
val jaxbContext = JAXBContext.newInstance(KobaltPluginXml::class.java) val jaxbContext = JAXBContext.newInstance(KobaltPluginXml::class.java)