mirror of
https://github.com/barkeser2002/epub-translator.git
synced 2026-09-25 01:40:00 +03:00
90 lines
2.3 KiB
Groovy
90 lines
2.3 KiB
Groovy
buildscript {
|
|
println("JAVA=${JavaVersion.current()}")
|
|
// https://docs.gradle.org/current/javadoc/org/gradle/api/JavaVersion.html
|
|
// Use .isJava11Compatible() if future java's are also acceptable, and .isJava11() for only Java11
|
|
if (!JavaVersion.current().isJava11Compatible()) {
|
|
throw new AssertionError("Current Java is '${JavaVersion.current()}' but expected Java 11")
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'java'
|
|
alias libs.plugins.kotlin.jvm
|
|
alias libs.plugins.kotlin.plugin.allopen
|
|
alias libs.plugins.quarkus
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
maven {
|
|
url "https://jitpack.io"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.kotlin.stdlib.jdk8
|
|
implementation(enforcedPlatform(libs.quarkus))
|
|
implementation 'io.quarkus:quarkus-kotlin'
|
|
implementation 'io.quarkus:quarkus-arc'
|
|
implementation 'io.quarkus:quarkus-config-yaml'
|
|
implementation 'io.quarkus:quarkus-picocli'
|
|
implementation 'io.quarkus:quarkus-jdbc-h2'
|
|
implementation 'io.quarkus:quarkus-hibernate-orm-panache-kotlin'
|
|
implementation 'io.quarkus:quarkus-rest-client-jackson'
|
|
|
|
implementation libs.deepl.api
|
|
|
|
testImplementation 'io.quarkus:quarkus-junit5'
|
|
}
|
|
|
|
group 'net.sharplab.epubtranslator'
|
|
version "$ePubTranslatorVersion"
|
|
|
|
compileJava {
|
|
options.encoding = 'UTF-8'
|
|
options.compilerArgs << '-parameters'
|
|
}
|
|
|
|
compileTestJava {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
allOpen {
|
|
annotation("javax.ws.rs.Path")
|
|
annotation("javax.enterprise.context.ApplicationScoped")
|
|
annotation("io.quarkus.test.junit.QuarkusTest")
|
|
annotation("javax.persistence.Entity")
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.jvmTarget = JavaVersion.VERSION_17
|
|
kotlinOptions.javaParameters = true
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.jvmTarget = JavaVersion.VERSION_17
|
|
}
|
|
|
|
|
|
quarkus {
|
|
finalName = "epub-translator"
|
|
}
|
|
|
|
test {
|
|
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
|
|
}
|
|
|
|
task generateReleaseNote(type: JavaExec) {
|
|
group = "documentation"
|
|
classpath = files('gradle/lib/github-release-notes-generator.jar')
|
|
|
|
args(latestReleasedEPubTranslatorVersion, file("build/release-note.md").absolutePath, "--spring.config.location=file:" + file("github-release-notes-generator.yml").absolutePath)
|
|
|
|
}
|