Skip to content

Commit 259d89b

Browse files
committed
chore: jvm arguments for app and misc refactorings
1 parent d4ea7a6 commit 259d89b

File tree

9 files changed

+506
-498
lines changed

9 files changed

+506
-498
lines changed

backend/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description = "Ktor backend application"
1111

1212
application {
1313
mainClass = "AppKt"
14-
applicationDefaultJvmArgs += jvmArguments()
14+
applicationDefaultJvmArgs += jvmArguments(forAppRun = true)
1515
}
1616

1717
mppTargetName = "jvm"

common/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ dependencies {
3838

3939
jvmMainApi(libs.kotlin.retry)
4040
// jvmMainImplementation(libs.slf4j.api)
41+
commonTestApi(libs.ktor.client.mock)
4142
}
4243

4344
// kotlin.sourceSets.commonMain {

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Gradle
2-
org.gradle.jvmargs=-Xmx4g
2+
org.gradle.jvmargs=-Xmx6g
33
org.gradle.parallel=true
44
org.gradle.caching=true
5-
org.gradle.daemon=false
5+
org.gradle.daemon=true
66
org.gradle.configureondemand=true
77
org.gradle.configuration-cache=false
88
org.gradle.kotlin.dsl.allWarningsAsErrors=true
@@ -18,7 +18,7 @@ org.gradle.kotlin.dsl.allWarningsAsErrors=true
1818
## Kotlin
1919
kotlin.code.style=official
2020
kotlin.experimental.tryK2=true
21-
kotlin.daemon.jvmargs=--show-version --enable-preview
21+
kotlin.daemon.jvmargs=--show-version --enable-preview -Xmx6g
2222
kotlin.jvm.target.validation.mode=warning
2323
kotlin.build.report.output=build_scan
2424
kotlinx.atomicfu.enableJvmIrTransformation=true

gradle/build-logic/common-plugins/src/main/kotlin/common/CommonExtns.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ fun Path.glob(pattern: String): List<Path> {
7272
fun String.joinToConfigString(separator: CharSequence = "") =
7373
trimMargin().lines().joinToString(separator) { it.trim() }
7474

75+
/** Check if it's a non-stable(RC) version. */
76+
val String.isNonStable: Boolean
77+
get() {
78+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { uppercase().contains(it) }
79+
val regex = "^[\\d,.v-]+(-r)?$".toRegex()
80+
val isStable = stableKeyword || regex.matches(this)
81+
return isStable.not()
82+
}
83+
7584
/** System property delegate */
7685
@Suppress("IMPLICIT_CAST_TO_ANY")
7786
inline fun <reified T> sysProp(): ReadOnlyProperty<Any?, T> = ReadOnlyProperty { _, property ->

0 commit comments

Comments
 (0)