1
0

Initial commit

This commit is contained in:
2020-09-10 13:20:55 +02:00
commit 00fec096cb
19 changed files with 463 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>true</withJansi>
<encoder>
<pattern>%cyan(%d{YYYY-MM-dd HH:mm:ss.SSS}) [%thread] %highlight(%-5level) %green(%logger{36}) - %msg%n
</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT"/>
</root>
<logger name="com.mitchellbosecke.pebble" level="INFO"/>
<logger name="org.eclipse.jetty" level="INFO"/>
</configuration>
@@ -0,0 +1,9 @@
<dependencies>
{% for dep in dependencies %}
<dependency>
<groupId>{{ dep.groupId }}</groupId>
<artifactId>{{ dep.artifactId }}</artifactId>
<version>{{ dep.version }}</version>
</dependency>
{% endfor %}
</dependencies>
+11
View File
@@ -0,0 +1,11 @@
<build>
<plugins>
{% include "starter/plugins/@default" %}
{% include "starter/plugins/@kotlin" %}
{% include "starter/plugins/@shade" %}
</plugins>
</build>
@@ -0,0 +1,7 @@
<repositories>
<repository>
<id>jcenter</id>
<name>jcenter</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
@@ -0,0 +1,24 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>3.0.0-M4</version>
</dependency>
</dependencies>
</plugin>
@@ -0,0 +1,24 @@
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmTarget>14</jvmTarget>
</configuration>
</plugin>
@@ -0,0 +1,22 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${main.class}</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
+21
View File
@@ -0,0 +1,21 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>{{ basePackage }}</groupId>
<artifactId>{{ name | lower }}</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.target>14</maven.compiler.target>
<maven.compiler.source>14</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.class>{{ basePackage }}/{{ name | lower | capitalize }}Kt</main.class>
</properties>
{% include "starter/@dependencies" %}
{% include "starter/@repositories" %}
{% include "starter/@plugins" %}
</project>
+11
View File
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kotlin Starter</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>
+30
View File
@@ -0,0 +1,30 @@
{% extends "views/@base" %}
{% macro dependency(dependency) %}
<label>
<input name="{{ dependency.name }}" type="checkbox"{% if dependency.default %} checked{% endif %}>
<span>{{ dependency.name }}</span>
</label>
{% endmacro %}
{% macro input(input) %}
<label>
<span>{{ input.name }}</span>
<input name="{{ input.name }}" type="text"{% if input.value %} value="{{ input.value }}"{% endif %}>
</label>
{% endmacro %}
{% block content %}
<h1>Kotlin Starter</h1>
<form method="post">
{% for input in inputs %}
{{ input(input) }}
{% endfor %}
<br>
{% for dependency in dependencies %}
{{ dependency(dependency) }}
{% endfor %}
<br>
<button type="submit">Submit</button>
</form>
{% endblock %}