mirror of
https://gitee.com/dcren/initializr.git
synced 2025-08-20 00:44:24 +08:00
This commit add support for appending task attributes rather than only setting them. This is useful for Kotlin's compiler arguments as these can be augmented by other plugins. Closes gh-1368
39 lines
856 B
Plaintext
39 lines
856 B
Plaintext
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
id 'war'
|
|
id 'org.springframework.boot' version '2.4.1'
|
|
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
|
|
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
|
|
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
|
|
}
|
|
|
|
group = 'com.example'
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
java {
|
|
sourceCompatibility = '1.8'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.jetbrains.kotlin:kotlin-reflect'
|
|
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
}
|
|
|
|
tasks.withType(KotlinCompile) {
|
|
kotlinOptions {
|
|
freeCompilerArgs += '-Xjsr305=strict'
|
|
jvmTarget = '1.8'
|
|
}
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|