Add features + ktlint as first feature
This commit is contained in:
@@ -10,5 +10,7 @@
|
||||
|
||||
{% include "starter/pom/plugins/@shade" %}
|
||||
|
||||
{% include "starter/pom/plugins/@ktlint" %}
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</build>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<properties>
|
||||
<java.version>{{ javaVersion }}</java.version>
|
||||
<kotlin.version>{{ kotlinVersion }}</kotlin.version>
|
||||
<kotlin.code.style>official</kotlin.code.style>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{% if features | hasFeature("ktlint") %}
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>ktlint</id>
|
||||
<phase>verify</phase>
|
||||
<configuration>
|
||||
<target name="ktlint">
|
||||
<java taskname="ktlint" dir="${basedir}" fork="true" failonerror="true"
|
||||
classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
|
||||
<arg value="src/**/*.kt"/>
|
||||
</java>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>ktlint-format</id>
|
||||
<configuration>
|
||||
<target name="ktlint">
|
||||
<java taskname="ktlint" dir="${basedir}" fork="true" failonerror="true"
|
||||
classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
|
||||
<arg value="-F"/>
|
||||
<arg value="src/**/*.kt"/>
|
||||
</java>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.pinterest</groupId>
|
||||
<artifactId>ktlint</artifactId>
|
||||
<version>0.39.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
{% endif %}
|
||||
@@ -10,6 +10,19 @@
|
||||
{% endfor %}
|
||||
|
||||
<div class="mt-4">
|
||||
<section>
|
||||
<h2 class="category">Features</h2>
|
||||
<ul>
|
||||
{% for feature in features %}
|
||||
<label class="m-2">
|
||||
<input name="{{ feature.name }}"
|
||||
type="checkbox"{% if feature.value %} checked{% endif %}>
|
||||
<span>{{ feature.name }}</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{% for category in dependencies %}
|
||||
<section>
|
||||
<h2 class="category">{{ category.key }}</h2>
|
||||
|
||||
Reference in New Issue
Block a user