Skip to content

ktorio/kastle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

214 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

♖ KASTLE ♖

Kotlin Application Sourcecode Templating and Layout Engine

About

This project is an experimental tool for generating Kotlin source code from Kotlin source code. The core concept is to leverage the Kotlin compiler and language features to create a powerful templating engine. Since the templates are Kotlin sources themselves, we can provide a safe developer experience that is otherwise impossible with more traditional code generation tools.

You can find KASTLE applications in the following places:

Documentation

About:

Usage:

Project structure

Module Description
kastle-core Domain types for the pack repository and the templating engine
kastle-templates Interfaces for compiling Kotlin source templates
kastle-local Human-readable repository, designed for export
kastle-server The HTTP server for building projects from various clients
kastle-client For making calls to the server from IDE's, websites, etc.
repository Contains all sample PACKs for creating new projects.

Using as a Library

To import KASTLE as a library, add the following to your build.gradle.kts file:

// build.gradle.kts
repositories {
    maven("https://packages.jetbrains.team/maven/p/kastle/maven")
}
dependencies {
    implementation("org.jetbrains:kastle-core:0.1.0")
}

Or, if you're creating a custom template repository, use the Gradle plugin:

// settings.gradle.kts
pluginManagement {
    repositories {
        maven("https://packages.jetbrains.team/maven/p/kastle/maven")
    }
}

plugins {
    id("org.jetbrains.kastle") version "0.1.0"
}

Building & Running

This project uses Gradle as a build system.

You can start the server using:

./gradlew :kastle-server:jvmRun

You should see the following in the console:

 INFO  Application - Responding at http://0.0.0.0:2626

Visit the URL in a browser to start creating your projects!

About

Kotlin application source templating / layout engine

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors