-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade gradle to 8.1.1, port build script to Kotlin (#4)
* updates gradle to 8.1.1 * uses "plugins" block, adopts function call syntax * removes "buildScript" block * moves definition of kotlin plugin version to "pluginManagement" block in settings.gradle * migrates build from kotlin to gradle. Includes removing jsr 305 compiler setting
- Loading branch information
1 parent
42ee998
commit 634e95f
Showing
7 changed files
with
220 additions
and
176 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
plugins { | ||
application | ||
kotlin("jvm") | ||
} | ||
|
||
val kotlin_version: String by project | ||
val ktor_version: String by project | ||
val logback_version: String by project | ||
val jackson_version: String by project | ||
val strikt_version: String by project | ||
|
||
|
||
val appMainClass = "io.ktor.server.netty.EngineMain" | ||
|
||
application { | ||
mainClass.set(appMainClass) | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version") | ||
implementation("io.ktor:ktor-server-netty:$ktor_version") | ||
implementation("ch.qos.logback:logback-classic:$logback_version") | ||
implementation("io.ktor:ktor-server-core:$ktor_version") | ||
implementation("io.ktor:ktor-jackson:$ktor_version") | ||
|
||
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version") | ||
|
||
testImplementation("io.ktor:ktor-server-tests:$ktor_version") | ||
testImplementation("io.strikt:strikt-core:$strikt_version") | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
} | ||
|
||
tasks { | ||
test { | ||
dependsOn("cleanTest") | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
} | ||
} | ||
} | ||
|
||
tasks.jar { | ||
manifest.attributes["Main-Class"] = appMainClass | ||
val dependencies = configurations | ||
.runtimeClasspath | ||
.get() | ||
.map(::zipTree) | ||
from(dependencies) | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.