Add new build script

This commit is contained in:
Sambo Chea 2021-01-26 14:20:09 +07:00
parent c0bb5a7930
commit 404d626194

View File

@ -1,11 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
//buildscript {
// repositories {
// mavenCentral()
// }
//}
buildscript { buildscript {
val springBootVersion = "2.4.2" val springBootVersion = "2.4.2"
@ -23,21 +17,24 @@ plugins {
id("io.spring.dependency-management") version "1.0.11.RELEASE" apply false id("io.spring.dependency-management") version "1.0.11.RELEASE" apply false
kotlin("jvm") version "1.4.21" apply false kotlin("jvm") version "1.4.21" apply false
kotlin("plugin.spring") version "1.4.21" apply false kotlin("plugin.spring") version "1.4.21" apply false
kotlin("plugin.jpa") version "1.4.21" apply false
} }
allprojects { allprojects {
group = "com.cubetiqs.modules" group = "com.cubetiqs"
version = "0.0.1-SNAPSHOT" version = "0.0.1-SNAPSHOT"
val javaVersion = "11"
tasks.withType<JavaCompile> { tasks.withType<JavaCompile> {
sourceCompatibility = "11" sourceCompatibility = javaVersion
targetCompatibility = "11" targetCompatibility = javaVersion
} }
tasks.withType<KotlinCompile> { tasks.withType<KotlinCompile> {
kotlinOptions { kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict") freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11" jvmTarget = javaVersion
} }
} }
} }
@ -56,6 +53,7 @@ subprojects {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
} }
} }
} }
tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootJar> { tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootJar> {