Skip to content

Commit

Permalink
More fixes in regards to merge
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Sep 12, 2024
1 parent 8c8b869 commit 6cf5769
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 35 deletions.
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/Compiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ val kordOptIns = listOf(
"dev.kord.common.annotation.KordVoice",
)

internal fun KotlinCommonCompilerOptions.applyKordCommonCompilerOptions() {
fun KotlinCommonCompilerOptions.applyKordCommonCompilerOptions() {
allWarningsAsErrors = true
progressiveMode = true
freeCompilerArgs.add("-Xexpect-actual-classes")
freeCompilerArgs.addAll("-Xexpect-actual-classes", "-Xexpect-actual-classes")
}

internal const val KORD_JVM_TARGET = 8
const val KORD_JVM_TARGET = 8

internal fun KotlinJvmCompilerOptions.applyKordJvmCompilerOptions() {
applyKordCommonCompilerOptions()
Expand Down
10 changes: 5 additions & 5 deletions buildSrc/src/main/kotlin/Targets.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import org.jetbrains.kotlin.konan.target.HostManager

@OptIn(ExperimentalKotlinGradlePluginApi::class)
fun KotlinMultiplatformExtension.targets() {
jvm()
jvm {
compilerOptions {
applyKordJvmCompilerOptions()
}
}

js {
nodejs {
Expand Down Expand Up @@ -38,10 +42,6 @@ fun KotlinMultiplatformExtension.targets() {
tvosX64()
tvosArm64()
tvosSimulatorArm64()

compilerOptions {
applyKordCompilerOptions()
}
}

// There are issues with linking the linux variant on windows.
Expand Down
8 changes: 6 additions & 2 deletions buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest

plugins {
org.jetbrains.kotlin.multiplatform
Expand Down Expand Up @@ -41,10 +42,9 @@ kotlin {

targets()
explicitApi()
jvmToolchain(Jvm.target)
compilerOptions {
applyKordCompilerOptions()
optIn.addAll(kordOptIns)
applyKordCommonCompilerOptions()
}

sourceSets {
Expand Down Expand Up @@ -74,6 +74,10 @@ tasks {
environment("PROJECT_ROOT", rootProject.projectDir.absolutePath)
}

withType<JavaCompile>().configureEach {
options.release = KORD_JVM_TARGET
}

afterEvaluate {
val compilationTasks = kotlin.targets.flatMap {
listOf("compileKotlin${it.name.replaceFirstChar(Char::titlecase)}", "${it.name}SourcesJar")
Expand Down
14 changes: 3 additions & 11 deletions buildSrc/src/main/kotlin/kord-publishing.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.konan.target.Family
import java.lang.System.getenv
import java.util.Base64

Expand All @@ -17,7 +18,7 @@ mavenPublishing {
signAllPublications()

if (plugins.hasPlugin("org.jetbrains.kotlin.multiplatform")) {
configure(KotlinMultiplatform(javadocJar = JavadocJar.Dokka("dokkaHtml")))
// configure(KotlinMultipla(javadocJar = JavadocJar.Dokka("dokkaHtml")))
}

pom {
Expand Down Expand Up @@ -56,16 +57,7 @@ mavenPublishing {
}

repositories {
maven {
url = uri(if (isRelease) Repo.releasesUrl else Repo.snapshotsUrl)

credentials {
username = getenv("NEXUS_USER")
password = getenv("NEXUS_PASSWORD")
}
}

if (!isRelease) {
if (true) {
maven {
name = "kordSnapshots"
url = uri("https://repo.kord.dev/snapshots")
Expand Down
10 changes: 10 additions & 0 deletions ksp-annotations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ plugins {
`kord-publishing`
}

kotlin {
targets()
}

tasks.withType<AbstractDokkaLeafTask>().configureEach {
dokkaSourceSets.configureEach {
suppress = true
}
}

tasks {
withType<JavaCompile>().configureEach {
options.release = KORD_JVM_TARGET
}
}
10 changes: 10 additions & 0 deletions test-kit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,14 @@ kotlin {
}
}
}

compilerOptions {
applyKordCommonCompilerOptions()
}
}

tasks {
withType<JavaCompile>().configureEach {
options.release = KORD_JVM_TARGET
}
}
14 changes: 0 additions & 14 deletions voice/api/voice.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -1029,8 +1029,6 @@ final value class dev.kord.voice/AudioFrame { // dev.kord.voice/AudioFrame|null[
}

sealed class dev.kord.voice.gateway/Close : dev.kord.voice.gateway/VoiceEvent { // dev.kord.voice.gateway/Close|null[0]
constructor <init>() // dev.kord.voice.gateway/Close.<init>|<init>(){}[0]

final class DiscordClose : dev.kord.voice.gateway/Close { // dev.kord.voice.gateway/Close.DiscordClose|null[0]
constructor <init>(dev.kord.voice.gateway/VoiceGatewayCloseCode, kotlin/Boolean) // dev.kord.voice.gateway/Close.DiscordClose.<init>|<init>(dev.kord.voice.gateway.VoiceGatewayCloseCode;kotlin.Boolean){}[0]

Expand All @@ -1057,8 +1055,6 @@ sealed class dev.kord.voice.gateway/Close : dev.kord.voice.gateway/VoiceEvent {
}

sealed class dev.kord.voice.gateway/Command { // dev.kord.voice.gateway/Command|null[0]
constructor <init>() // dev.kord.voice.gateway/Command.<init>|<init>(){}[0]

final object SerializationStrategy : kotlinx.serialization/SerializationStrategy<dev.kord.voice.gateway/Command> { // dev.kord.voice.gateway/Command.SerializationStrategy|null[0]
final val descriptor // dev.kord.voice.gateway/Command.SerializationStrategy.descriptor|{}descriptor[0]
final fun <get-descriptor>(): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.voice.gateway/Command.SerializationStrategy.descriptor.<get-descriptor>|<get-descriptor>(){}[0]
Expand All @@ -1068,8 +1064,6 @@ sealed class dev.kord.voice.gateway/Command { // dev.kord.voice.gateway/Command|
}

sealed class dev.kord.voice.gateway/VoiceEvent { // dev.kord.voice.gateway/VoiceEvent|null[0]
constructor <init>() // dev.kord.voice.gateway/VoiceEvent.<init>|<init>(){}[0]

final object DeserializationStrategy : kotlinx.serialization/DeserializationStrategy<dev.kord.voice.gateway/VoiceEvent?> { // dev.kord.voice.gateway/VoiceEvent.DeserializationStrategy|null[0]
final val descriptor // dev.kord.voice.gateway/VoiceEvent.DeserializationStrategy.descriptor|{}descriptor[0]
final fun <get-descriptor>(): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.voice.gateway/VoiceEvent.DeserializationStrategy.descriptor.<get-descriptor>|<get-descriptor>(){}[0]
Expand All @@ -1079,8 +1073,6 @@ sealed class dev.kord.voice.gateway/VoiceEvent { // dev.kord.voice.gateway/Voice
}

sealed class dev.kord.voice.gateway/VoiceGatewayCloseCode { // dev.kord.voice.gateway/VoiceGatewayCloseCode|null[0]
constructor <init>(kotlin/Int) // dev.kord.voice.gateway/VoiceGatewayCloseCode.<init>|<init>(kotlin.Int){}[0]

final val code // dev.kord.voice.gateway/VoiceGatewayCloseCode.code|{}code[0]
final fun <get-code>(): kotlin/Int // dev.kord.voice.gateway/VoiceGatewayCloseCode.code.<get-code>|<get-code>(){}[0]

Expand Down Expand Up @@ -1118,8 +1110,6 @@ sealed class dev.kord.voice.gateway/VoiceGatewayCloseCode { // dev.kord.voice.ga
}

sealed class dev.kord.voice.udp/PayloadType { // dev.kord.voice.udp/PayloadType|null[0]
constructor <init>(kotlin/Byte) // dev.kord.voice.udp/PayloadType.<init>|<init>(kotlin.Byte){}[0]

final val raw // dev.kord.voice.udp/PayloadType.raw|{}raw[0]
final fun <get-raw>(): kotlin/Byte // dev.kord.voice.udp/PayloadType.raw.<get-raw>|<get-raw>(){}[0]

Expand All @@ -1139,8 +1129,6 @@ sealed class dev.kord.voice.udp/PayloadType { // dev.kord.voice.udp/PayloadType|
}

sealed class dev.kord.voice/EncryptionMode { // dev.kord.voice/EncryptionMode|null[0]
constructor <init>(kotlin/String) // dev.kord.voice/EncryptionMode.<init>|<init>(kotlin.String){}[0]

final val value // dev.kord.voice/EncryptionMode.value|{}value[0]
final fun <get-value>(): kotlin/String // dev.kord.voice/EncryptionMode.value.<get-value>|<get-value>(){}[0]

Expand All @@ -1166,8 +1154,6 @@ sealed class dev.kord.voice/EncryptionMode { // dev.kord.voice/EncryptionMode|nu
}

sealed class dev.kord.voice/SpeakingFlag { // dev.kord.voice/SpeakingFlag|null[0]
constructor <init>(kotlin/Int) // dev.kord.voice/SpeakingFlag.<init>|<init>(kotlin.Int){}[0]

final val code // dev.kord.voice/SpeakingFlag.code|{}code[0]
final fun <get-code>(): kotlin/Int // dev.kord.voice/SpeakingFlag.code.<get-code>|<get-code>(){}[0]
final val shift // dev.kord.voice/SpeakingFlag.shift|{}shift[0]
Expand Down

0 comments on commit 6cf5769

Please sign in to comment.