-
Notifications
You must be signed in to change notification settings - Fork 7
Clean up the K2 build config #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
@file:OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
|
||
import io.github.petertrr.configurePublishing | ||
import io.github.petertrr.ext.booleanProperty | ||
import io.gitlab.arturbosch.detekt.Detekt | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion | ||
|
@@ -26,16 +22,16 @@ kotlin { | |
explicitApi() | ||
|
||
compilerOptions { | ||
apiVersion = KotlinVersion.KOTLIN_1_9 | ||
languageVersion = KotlinVersion.KOTLIN_1_9 | ||
apiVersion = KotlinVersion.KOTLIN_2_1 | ||
languageVersion = KotlinVersion.KOTLIN_2_1 | ||
} | ||
|
||
jvm { | ||
compilations.configureEach { | ||
compileTaskProvider.configure { | ||
compilerOptions { | ||
// Minimum bytecode level is 52 | ||
jvmTarget = JvmTarget.JVM_11 | ||
jvmTarget = JvmTarget.JVM_1_8 | ||
|
||
// Output interfaces with default methods | ||
freeCompilerArgs.addAll( | ||
|
@@ -81,11 +77,36 @@ kotlin { | |
nodejs() | ||
} | ||
|
||
// Tier 1 | ||
macosX64() | ||
macosArm64() | ||
iosSimulatorArm64() | ||
iosX64() | ||
iosArm64() | ||
|
||
// Tier 2 | ||
linuxX64() | ||
linuxArm64() | ||
watchosSimulatorArm64() | ||
watchosX64() | ||
watchosArm32() | ||
watchosArm64() | ||
tvosSimulatorArm64() | ||
tvosX64() | ||
tvosArm64() | ||
|
||
// Tier 3 | ||
mingwX64() | ||
macosX64() | ||
macosArm64() | ||
androidNativeArm32() | ||
androidNativeArm64() | ||
androidNativeX86() | ||
androidNativeX64() | ||
watchosDeviceArm64() | ||
|
||
// Deprecated. | ||
// Should follow the same route as official Kotlin libraries | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WDYM by the same route? Sorry, I'm not keeping up with the recent context There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @petertrr basically we should stick to what kotlinx libs do: build for all targets, even if deprecated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, thanks for the clarification! |
||
@Suppress("DEPRECATION") | ||
linuxArm32Hfp() | ||
|
||
sourceSets { | ||
commonTest { | ||
|
@@ -105,9 +126,7 @@ detekt { | |
} | ||
|
||
tasks { | ||
withType<Detekt> { | ||
named("check") { | ||
dependsOn(this@withType) | ||
} | ||
check { | ||
dependsOn(detekt) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
kotlin.code.style=official | ||
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | ||
org.gradle.caching=true | ||
# https://kotlinlang.org/docs/whatsnew19.html#preview-of-gradle-configuration-cache | ||
org.gradle.configuration-cache=false | ||
org.gradle.parallel=true | ||
######################### | ||
# Gradle settings | ||
######################### | ||
org.gradle.jvmargs = -Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 | ||
org.gradle.parallel = true | ||
org.gradle.caching = true | ||
org.gradle.configuration-cache = false | ||
lppedd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
######################### | ||
# Kotlin settings | ||
######################### | ||
kotlin.code.style = official | ||
|
||
# Kotlin/Native | ||
kotlin.native.enableKlibsCrossCompilation = true |
Uh oh!
There was an error while loading. Please reload this page.