Package-level declarations

Types

Link copied to clipboard
@Serializable
class DownloadedFileMetadata(val fromUrl: String, val contentType: String?)

Additional information about the file we just downloaded.

Link copied to clipboard
class DownloadResult(val file: File, val metadata: DownloadedFileMetadata)
Link copied to clipboard
object HtmlUtil
Link copied to clipboard
Link copied to clipboard
class LoggingReporter(logger: Logger) : Reporter
Link copied to clipboard
interface Reporter

Interface that abstracts out reporting error messages.

Link copied to clipboard
class RootAndFile(val root: File, val file: File)

Functions

Link copied to clipboard
Link copied to clipboard
fun ProjectLayout.downloadOrCached(logger: Logger, url: URL): DownloadResult
Link copied to clipboard

All Kobweb dependencies should include a module.json to identify themselves as such.

Link copied to clipboard
fun ProjectLayout.getBuildScripts(): List<Path>

Return all Gradle build scripts within the given project layout.

Link copied to clipboard
fun Project.getJsDependencyResults(): Provider<List<ResolvedDependencyResult>>

Lazily returns a list of this module's direct JS dependencies (no transitive dependencies included).

Link copied to clipboard
fun Project.getResourceSources(target: TargetPlatform<*>): Provider<SourceDirectorySet>
Link copied to clipboard
fun Project.getTransitiveJsDependencyResults(): Provider<List<ResolvedDependencyResult>>

Lazily returns a list of this module's direct & transitive JS dependencies.

Link copied to clipboard
fun Provider<List<ResolvedDependencyResult>>.hasDependencyNamed(name: String): Provider<Boolean>

Lazily evaluates whether the provided dependency is included in the list of resolved dependencies.

Link copied to clipboard
fun STYLE.importCss(url: String, layerName: String? = null)

Adds an @import rule to import a CSS stylesheet, optionally loading it into a specific CSS Cascade layer.

Link copied to clipboard
fun File.isDescendantOf(maybeAncestor: File): Boolean
fun File.isDescendantOf(maybeAncestorTest: (File) -> Boolean): Boolean
Link copied to clipboard
fun Task.kobwebCacheDir(): Provider<Directory>

Return a unique build cache directory for this task.

fun ProjectLayout.kobwebCacheDir(): Provider<Directory>

Return a unique build cache directory.

Link copied to clipboard
fun Task.kobwebCacheFile(path: String): Provider<RegularFile>

Return a file under the cache directory for this task.

fun ProjectLayout.kobwebCacheFile(path: String): Provider<RegularFile>

Return a file under the cache directory.

Link copied to clipboard
inline fun <V : Task> TaskCollection<in V>.namedOrNull(name: String): TaskProvider<V>?

Replacement for findByName that supports task configuration avoidance.

Link copied to clipboard
fun File.searchZipFor(path: String, handle: (ByteArray) -> Unit)

If the target file is a zip file, search it for a single file that it may contain.

Link copied to clipboard

Suggest a name to use to represent this Kobweb project.

Link copied to clipboard
fun Project.toUidString(): String

Generate a consistent, unique ID for this project.