Skip to content

Commit

Permalink
Change string based id to type safely
Browse files Browse the repository at this point in the history
  • Loading branch information
vjh0107 committed Jan 24, 2024
1 parent 91f7c44 commit 163eae2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ plugins {
alias(libs.plugins.graph.generator)
}

val subProjectPlugins = listOf(
libs.plugins.kotlin.jvm,
libs.plugins.kotlin.plugin.spring,
libs.plugins.spring.boot
)

subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlin.plugin.spring")
apply(plugin = "org.springframework.boot")
subProjectPlugins.forEach {
pluginManager.apply(it.get().pluginId)
}

afterEvaluate {
tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootJar>().configureEach {
this.enabled = false
}
tasks.withType<Jar>().configureEach {
destinationDirectory.get().asFile.listFiles()?.forEach {
it.delete()
Expand All @@ -20,14 +29,12 @@ subprojects {
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
jvmTarget = "17"
}
}

extensions.getByType<JavaPluginExtension>().sourceCompatibility = JavaVersion.VERSION_17
}
}

0 comments on commit 163eae2

Please sign in to comment.