v0.5
This commit is contained in:
parent
28ab658dd2
commit
099c3fad26
@ -15,7 +15,7 @@ buildscript {
|
||||
}
|
||||
|
||||
group = "ru.landgrafhomyak.utility"
|
||||
version = "0.4.5"
|
||||
version = "0.5"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@ -52,21 +52,24 @@ xomrk {
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
// if use kotlin("stdlib") gitea ui brokes at paragraph with dependency versions
|
||||
val kotlinStdlibDependency = "org.jetbrains.kotlin:kotlin-stdlib:${this@kotlin.coreLibrariesVersion}"
|
||||
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
compileOnly(kotlin("stdlib"))
|
||||
compileOnly(kotlinStdlibDependency)
|
||||
}
|
||||
}
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
compileOnly(kotlin("stdlib"))
|
||||
compileOnly(kotlinStdlibDependency)
|
||||
}
|
||||
}
|
||||
|
||||
val nonJvmMain by creating {
|
||||
dependsOn(commonMain)
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
implementation(kotlinStdlibDependency)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,6 @@ package ru.landgrafhomyak.utility.highlevel_try_finally.tests
|
||||
import org.testng.annotations.Test
|
||||
import org.testng.asserts.Assertion
|
||||
import ru.landgrafhomyak.utility.highlevel_try_finally.safeAutoClose1
|
||||
import ru.landgrafhomyak.utility.highlevel_try_finally.tryFinallyChain
|
||||
import java.lang.AssertionError
|
||||
|
||||
@Test
|
||||
class KotlinStdlibDependencyTest {
|
||||
@ -47,21 +45,4 @@ class KotlinStdlibDependencyTest {
|
||||
Assertion().assertTrue(false, "safeAutoClose still has dependency on kotlin stdlib")
|
||||
}
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = ["testNoKotlinStdlib"])
|
||||
fun testTryFinallyChain() {
|
||||
try {
|
||||
@Suppress("KotlinUnreachableCode")
|
||||
tryFinallyChain { chain ->
|
||||
// chain.action { }
|
||||
chain.action { throw CustomTestException() }
|
||||
chain.action { throw CustomTestException() }
|
||||
chain.action { }
|
||||
chain.action { }
|
||||
}
|
||||
} catch (_: CustomTestException) {
|
||||
} catch (e: LinkageError) {
|
||||
throw AssertionError("safeAutoClose still has dependency on kotlin stdlib", e)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user