diff --git a/build.gradle.kts b/build.gradle.kts index 037a0db..f5e442c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,12 +23,6 @@ dependencies { implementation("org.slf4j:slf4j-api:1.7.30") implementation("ch.qos.logback:logback-classic:1.0.13") - // Database drivers - runtimeOnly("com.h2database:h2:1.4.199") - runtimeOnly("mysql:mysql-connector-java:8.0.22") - runtimeOnly("org.postgresql:postgresql:42.2.16") - runtimeOnly("com.microsoft.sqlserver:mssql-jdbc:9.2.1.jre11") - testImplementation("io.mockk:mockk:1.10.6") testImplementation("io.kotest:kotest-runner-junit5:4.4.1") } @@ -48,8 +42,13 @@ publishing { credentials(HttpHeaderCredentials::class.java) { val gitlabPrivateToken: String? by project - name = "Private-Token" - value = gitlabPrivateToken ?: System.getenv("CI_JOB_TOKEN") + if (gitlabPrivateToken != null) { + name = "Private-Token" + value = gitlabPrivateToken + } else { + name = "Job-Token" + value = System.getenv("CI_JOB_TOKEN") + } } authentication { create("header") diff --git a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt index 93a1b22..ed39f17 100644 --- a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt +++ b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt @@ -59,7 +59,7 @@ fun databaseUpdaterProperties( ) = DatabaseUpdaterProperties(targetVersion, url, dbName, username, password).apply(op) /** DSL for creating an instance of [DatabaseUpdaterProperties] from the given [properties]. */ -internal fun databaseUpdaterProperties( +fun databaseUpdaterProperties( properties: Properties, op: DatabaseUpdaterProperties.() -> Unit = {} ) = with(properties) { @@ -80,7 +80,7 @@ internal fun databaseUpdaterProperties( } /** DSL for creating an instance of [DatabaseUpdaterProperties] from the given [file]. */ -internal fun databaseUpdaterProperties( +fun databaseUpdaterProperties( file: File, op: DatabaseUpdaterProperties.() -> Unit = {} ) = databaseUpdaterProperties(