What's Kordapt
Quick Start
Usage
Kordapt is an opensource java framework for easily building in a consistent and modular manner, services that exist on The Core. The framework makes extensive use of leading technologies such as Gradle and Spring. It makes development easy by providing gradle scripts(generators) that utilize Antlr and String template for generating plumbing code of a service and its models. It further promotes modularization by providing various plugins to help with plumbing that suits the requirements of your project such as hibernate.
Kordapt exposes an api-definition for the services and models created in a language agnostic manner by utilizing a set of yaml files. This allows any alternative language to java to consume and understand the api-definition by mapping that language to the api-definition.
Kordapt aims at simplifying the development process by aiding your choice of middleware technologies, libraries and frameworks, so that you are able to focus solely on your business logic.
The following is all done via build.gradle
Add maven repositories and the kordapt gradle plugin dependency, then apply it
buildscript{
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.korwe:kordapt-gradle-plugin:1.1.1'
}
}
apply plugin: 'kordapt'
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
dependencies {
compile 'com.korwe:kordapt-core:1.1.1'
}
kordapt{
defaultPackage = "my.company.projectName"
}
Full set of Configuration options
On the command-line, now run
gradle kinit
You will now have a kordapt project with the standard Structure
Generate the full plumbing for a service:
gradle kgenerate -Pinput="<ServiceName> <ReturnType>:<functionName>(<params>)"
Example:
gradle kgenerate -Pinput="HelloWorldService ArbitraryType:firstFunction() void:secondFunction(Integer inputNumber)"
Generate the full plumbing for a model:
gradle kgenerate -Pinput="<ModelName> <AttributeType>:<attributeName>"
Example:
gradle kgenerate -Pinput="MyModel ArbitraryType:firstAttribute String:secondAttribute"