Package-level declarations

Types

Link copied to clipboard
data class EventSchema(val name: String, val properties: List<PropertySchema>)

A single event's shape, parsed from a tracking-plan JSON Schema document.

Link copied to clipboard
abstract class GenerateAutographEventsTask : DefaultTask

Generates typed Tracker.track<EventName>(...) extension functions from a schemaFile tracking-plan document (see parseTrackingPlan for the supported shape) into outputDirectory.

Link copied to clipboard
data class PropertySchema(val name: String, val type: PropertyType, val required: Boolean)

One property of an EventSchema.

Link copied to clipboard

The JSON Schema "type" values this generator understands.

Link copied to clipboard

Thrown by parseTrackingPlan when the document doesn't match the expected shape.

Functions

Link copied to clipboard

Generates a single Kotlin source file with one Tracker.track<EventName>(...) extension function per events, typed from each event's declared properties. Required properties become non-nullable parameters; optional properties become nullable parameters defaulting to null and are omitted from the emitted event when left null.

Link copied to clipboard

Parses a tracking-plan document into EventSchemas. Only a minimal subset of JSON Schema is understood — this is the initial slice of the codegen engine (see the autograph-schema module's README section for what's deferred). Expected shape: