2021-02-21 14:27:57 -05:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
2021-03-04 00:48:54 -05:00
|
|
|
group = "dev.fyloz.colorrecipesexplorer"
|
2021-05-20 13:33:03 -04:00
|
|
|
version = "5.1"
|
2021-03-04 00:48:54 -05:00
|
|
|
|
2021-02-21 14:27:57 -05:00
|
|
|
plugins {
|
|
|
|
kotlin("jvm") version "1.4.30"
|
2021-03-04 13:05:23 -05:00
|
|
|
id("org.jetbrains.dokka") version "1.4.20"
|
|
|
|
id("maven-publish")
|
2021-03-04 00:48:54 -05:00
|
|
|
id("com.github.johnrengelman.shadow") version "6.1.0"
|
2021-02-21 14:27:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2021-03-04 13:05:23 -05:00
|
|
|
jcenter()
|
2021-02-21 14:27:57 -05:00
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation("org.liquibase:liquibase-core:4.3.1")
|
|
|
|
|
2021-03-04 00:48:54 -05:00
|
|
|
// Logging
|
|
|
|
implementation("io.github.microutils:kotlin-logging:1.12.0")
|
|
|
|
implementation("org.slf4j:slf4j-api:1.7.30")
|
|
|
|
implementation("ch.qos.logback:logback-classic:1.0.13")
|
|
|
|
|
2021-03-10 17:05:47 -05:00
|
|
|
runtimeOnly("mysql:mysql-connector-java:8.0.22")
|
|
|
|
|
2021-03-04 00:48:54 -05:00
|
|
|
testImplementation("io.mockk:mockk:1.10.6")
|
|
|
|
testImplementation("io.kotest:kotest-runner-junit5:4.4.1")
|
2021-03-04 13:05:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
create<MavenPublication>("cre-database-manager") {
|
|
|
|
from(components["kotlin"])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url = uri("https://git.fyloz.dev/api/v4/projects/40/packages/maven")
|
|
|
|
name = "Gitlab"
|
|
|
|
|
|
|
|
credentials(HttpHeaderCredentials::class.java) {
|
2021-03-04 16:59:12 -05:00
|
|
|
val gitlabPrivateToken: String? by project
|
2021-03-04 13:05:23 -05:00
|
|
|
|
2021-03-05 16:50:57 -05:00
|
|
|
if (gitlabPrivateToken != null) {
|
|
|
|
name = "Private-Token"
|
|
|
|
value = gitlabPrivateToken
|
|
|
|
} else {
|
|
|
|
name = "Job-Token"
|
|
|
|
value = System.getenv("CI_JOB_TOKEN")
|
|
|
|
}
|
2021-03-04 13:05:23 -05:00
|
|
|
}
|
|
|
|
authentication {
|
|
|
|
create<HttpHeaderAuthentication>("header")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-02-21 14:27:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
2021-03-04 13:05:23 -05:00
|
|
|
|
|
|
|
testLogging {
|
|
|
|
events("failed")
|
|
|
|
}
|
|
|
|
|
|
|
|
reports {
|
|
|
|
junitXml.isEnabled = true
|
|
|
|
html.isEnabled = false
|
|
|
|
}
|
2021-02-21 14:27:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile>() {
|
|
|
|
kotlinOptions.jvmTarget = "11"
|
2021-03-04 00:48:54 -05:00
|
|
|
kotlinOptions.useIR = true
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<Jar> {
|
|
|
|
manifest {
|
|
|
|
attributes["Main-Class"] = "dev.fyloz.colorrecipesexplorer.databasemanager.DatabaseUpdaterKt"
|
|
|
|
}
|
2021-02-21 14:27:57 -05:00
|
|
|
}
|
2021-03-04 13:05:23 -05:00
|
|
|
|
|
|
|
tasks.dokkaHtml {
|
|
|
|
outputDirectory.set(rootDir.resolve("dokka"))
|
|
|
|
}
|