mirror of
https://github.com/valitydev/rbk-templator.git
synced 2024-11-06 08:45:16 +00:00
JD-180 support Kotlin for library template
This commit is contained in:
parent
089125cd75
commit
b0a7fbb740
@ -17,6 +17,13 @@ module.exports = {
|
||||
name: 'description',
|
||||
message: 'Введите описание вашей либы (maven.description):'
|
||||
},
|
||||
{
|
||||
type: 'list',
|
||||
name: 'language',
|
||||
choices: ['Java', 'Kotlin'],
|
||||
default: 'Java',
|
||||
message: 'Выберите язык:'
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'path',
|
||||
@ -62,4 +69,4 @@ module.exports = {
|
||||
templateFile: 'plop-templates/library/library-pom.xml'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
@ -19,6 +19,10 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
{{#if_eq language 'Kotlin'}}
|
||||
<kotlin.version>1.4.31</kotlin.version>
|
||||
{{/if_eq}}
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@ -31,4 +35,33 @@
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
{{#if_eq language 'Kotlin'}}
|
||||
<!--kotlin-->
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-reflect</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
</dependency>
|
||||
{{/if_eq}}
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>${project.basedir}/src/main/{{lowerCase language}}</sourceDirectory>
|
||||
<testSourceDirectory>${project.basedir}/src/test/{{lowerCase language}}</testSourceDirectory>
|
||||
{{#if_eq language 'Kotlin'}}
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
{{/if_eq}}
|
||||
</build>
|
||||
</project>
|
||||
|
Loading…
Reference in New Issue
Block a user