github-releases-bot/app/build.gradle.kts

71 lines
2.2 KiB
Text

import java.time.Instant
import java.time.ZoneId
import java.time.format.DateTimeFormatter
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Kotlin application project to get you started.
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.5/userguide/building_java_projects.html in the Gradle documentation.
*/
plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
alias(libs.plugins.jvm)
// Apply the application plugin to add support for building a CLI application in Java.
application
id("com.google.cloud.tools.jib") version "3.4.0"
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
maven {
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}
jib {
to.image = "antifa-info-bot"
container.creationTime.set(DateTimeFormatter.ISO_DATE_TIME.format(Instant.now().atZone(ZoneId.of("UTC"))))
val buildDir = layout.buildDirectory.get()
outputPaths.imageId = "$buildDir/github-release-bot.id"
outputPaths.digest = "$buildDir/github-release-bot.digest"
outputPaths.imageJson = "$buildDir/github-release-bot.json"
outputPaths.tar = "$buildDir/github-release-bot.tar"
}
dependencies {
implementation("com.ouattararomuald:syndication:2.1.1") {
exclude("com.squareup.okhttp3:okhttp")
}
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.12")
implementation(libs.guava)
implementation("com.google.code.gson:gson:2.10.1")
implementation("social.bigbone:bigbone:2.0.0-SNAPSHOT")
testImplementation("io.kotest:kotest-runner-junit5:5.8.0")
testImplementation("io.kotest:kotest-assertions-core:5.8.0")
testImplementation("com.willowtreeapps.assertk:assertk:0.28.0")
testImplementation("io.mockk:mockk:1.13.9")
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
application {
// Define the main class for the application.
mainClass.set("de.rpr.releases.AppKt")
}
tasks.named<Test>("test") {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}