diff --git a/plug-in-development/index.html b/plug-in-development/index.html index bb88785..6c6a137 100644 --- a/plug-in-development/index.html +++ b/plug-in-development/index.html @@ -85,10 +85,20 @@
- This file can also contain Contributors, which are the main mechanism that Kobalt plug-ins use to interact with each other. + This file can also other components which are called plug-in actors. All these actors collaborate with Kobalt + in order to increase its functionalities. There are two kinds of actors: +
+
+ All plug-in actors are interfaces and they all extend IPluginActor
. All interceptors
+ extend IInterceptor
and all contributors extend IContributor
+
Plug-ins often produce files and data that other plug-ins need to use in order for a build to succeed. For example,
the Android plug-in needs to generate a file called R.java
and then make this file available at
@@ -103,7 +113,7 @@
Kobalt's own plugin.xml
and go over it line by line.
IPlugin
)IPlugin
)<plugins> <class-name>com.beust.kobalt.plugin.android.AndroidPlugin</class-name> @@ -113,7 +123,7 @@ Kobalt defines a few plug-ins in its core so you never need to download them. -Classpath contributors (
+IClasspathContributor
)Classpath contributors (
IClasspathContributor
)<classpath-contributors> <class-name>com.beust.kobalt.plugin.android.AndroidPlugin</class-name> @@ -127,7 +137,7 @@ as well. -Project contributors (
+IProjectContributor
)Project contributors (
IProjectContributor
)<project-contributors> <class-name>com.beust.kobalt.plugin.java.JavaPlugin</class-name> @@ -139,7 +149,7 @@ Some plug-ings produce projects (Java, Kotlin) while others don't (Packaging, Ap after a build file was parsed. -Init contributors (
+IInitContributor
)Init contributors (
IInitContributor
)<init-contributors> <class-name>com.beust.kobalt.plugin.java.JavaBuildGenerator</class-name> @@ -157,7 +167,7 @@ Some plug-ings produce projects (Java, Kotlin) while others don't (Packaging, Ap with the highest number of files is then asked to generate the build file. -Repo contributors (
+IRepoContributor
)Repo contributors (
IRepoContributor
)<repo-contributors> <class-name>com.beust.kobalt.plugin.android.AndroidPlugin</class-name> @@ -169,12 +179,25 @@ Some plug-ings produce projects (Java, Kotlin) while others don't (Packaging, Ap artifacts can be found. -Compiler flag contributors (
+ICompilerFlagContributor
)Compiler flag contributors (
ICompilerFlagContributor
)Plug-ins can add flags to the compiler by implementing this interface.
-Directives
+Run contributors (
+IRunContributor
)+ Plug-ins that can run a project (task "run") should implement this interface. +
+Interceptors
++ Interceptors transform data that Kobalt passes them. +
+Compiler interceptors (
+ICompilerInterceptor
)+ Plug-ins that implement this interface get a chance to alter the arguments that are passed to the various compilers (source files, classpath, arguments, etc...). +
+ +Directives
Directives are functions that users of your plug-in can use in their build file in order to configure your plug-in. These can be any kind of Kotlin function but in the interest of preserving a clean syntax in the build file, it's recommended to use the type safe builder pattern, as described here.