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

Documentation for the properties.

This commit is contained in:
Cedric Beust 2015-11-15 12:36:48 -08:00
parent bebd088195
commit bb6f9e115f
3 changed files with 28 additions and 14 deletions

View file

@ -7,28 +7,41 @@ package com.beust.kobalt.api.annotation
annotation class Directive annotation class Directive
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
annotation class Task(val name: String, annotation class Task(
val description: String, val name: String,
val description: String,
/** Tasks that this task depends on */ /** Tasks that this task depends on */
val runBefore: Array<String> = arrayOf(), val runBefore: Array<String> = arrayOf(),
/** Tasks that this task will run after if they get run */ /** Tasks that this task will run after if they get run */
val runAfter: Array<String> = arrayOf(), val runAfter: Array<String> = arrayOf(),
/** Tasks that this task will always run after */ /** Tasks that this task will always run after */
val alwaysRunAfter: Array<String> = arrayOf() val alwaysRunAfter: Array<String> = arrayOf()
) )
/** /**
* Plugins that export properties should annotate those with this annotation so they can be documented. * Plugins that export properties should annotate those with this annotation so they can be documented.
*/ */
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
annotation class ExportedPluginProperty annotation class ExportedPluginProperty(
/** Documentation for this property */
val doc: String = "",
/** The type of this property */
val type: String = ""
)
/** /**
* Plugins that export properties on the Project instance should annotate those with this annotation so * Plugins that export properties on the Project instance should annotate those with this annotation so
* they can be documented. * they can be documented.
*/ */
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
annotation class ExportedProjectProperty annotation class ExportedProjectProperty(
/** Documentation for this property */
val doc: String = "",
/** The type of this property */
val type: String = ""
)

View file

@ -26,7 +26,7 @@ abstract class JvmCompilerPlugin @Inject constructor(
open val jvmCompiler: JvmCompiler) : BasePlugin() { open val jvmCompiler: JvmCompiler) : BasePlugin() {
companion object { companion object {
@ExportedProjectProperty @ExportedProjectProperty(doc = "The location of the build directory", type = "String")
const val BUILD_DIR = "buildDir" const val BUILD_DIR = "buildDir"
const val TASK_CLEAN = "clean" const val TASK_CLEAN = "clean"

View file

@ -39,13 +39,14 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
companion object { companion object {
const val PLUGIN_NAME = "packaging" const val PLUGIN_NAME = "packaging"
@ExportedProjectProperty @ExportedProjectProperty(doc = "Where the libraries are saved", type = "String")
const val LIBS_DIR = "libsDir" const val LIBS_DIR = "libsDir"
@ExportedProjectProperty @ExportedProjectProperty(doc = "The name of the jar file", type = "String")
const val JAR_NAME = "jarName" const val JAR_NAME = "jarName"
@ExportedProjectProperty @ExportedProjectProperty(doc = "The list of packages produced for this project",
type = "List<PackageConfig>")
const val PACKAGES = "packages" const val PACKAGES = "packages"
const val TASK_ASSEMBLE: String = "assemble" const val TASK_ASSEMBLE: String = "assemble"