Skip to content

Commit

Permalink
Merge pull request #8 from kanyun-inc/feature/kotlin-1.9.20
Browse files Browse the repository at this point in the history
Bump Kotlin to 1.9.20.
  • Loading branch information
bennyhuo authored Nov 14, 2023
2 parents 0b92ccd + 32fdc6d commit 14d54b5
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.diffplug.gradle.spotless.SpotlessExtension
import com.diffplug.gradle.spotless.SpotlessPlugin

plugins {
kotlin("jvm") version "1.8.20" apply false
id("com.bennyhuo.kotlin.trimindent") version "1.8.20-1.0.0" apply false
kotlin("jvm") version "1.9.20" apply false
id("com.bennyhuo.kotlin.trimindent") version "1.9.20-1.1.0" apply false
id("org.jetbrains.dokka") version "1.7.10" apply false
id("com.github.gmazzo.buildconfig") version "2.1.0" apply false
id("com.vanniktech.maven.publish") version "0.22.0" apply false
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kotlin.code.style=official

VERSION_NAME=1.8.20-1.0.1
VERSION_NAME=1.9.20-1.0.1

GROUP=com.kanyun.kudos

Expand Down
3 changes: 1 addition & 2 deletions kudos-compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ dependencies {
testImplementation(project(":kudos-jackson"))
testImplementation("org.jetbrains.kotlin:kotlin-noarg:1.8.20")
testImplementation("org.jetbrains.kotlin:kotlin-compiler-embeddable")
testImplementation("com.bennyhuo.kotlin:kotlin-compile-testing-extensions:1.8.20-1.2.2")
testImplementation("com.bennyhuo.kotlin:kotlin-compile-testing-extensions:1.9.20-1.3.0")
}

val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions.freeCompilerArgs += listOf(
"-Xjvm-default=enable",
"-Xcontext-receivers",
"-opt-in=kotlin.RequiresOptIn"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ class KudosIrClassTransformer(
ctor.body = context.irFactory.createBlockBody(
ctor.startOffset,
ctor.endOffset,
listOfNotNull(
).apply {
statements += listOfNotNull(
// call super
IrDelegatingConstructorCallImpl(
ctor.startOffset,
Expand All @@ -192,8 +193,9 @@ class KudosIrClassTransformer(
klass.symbol,
context.irBuiltIns.unitType,
),
) + builder.setupDefaultValues(),
)
)
statements += builder.setupDefaultValues()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class KudosFirClassChecker(
) {
if (symbol.hasBackingField && !symbol.hasDelegate &&
!symbol.hasAnnotation(ClassId.topLevel(FqName(KUDOS_IGNORE)), context.session) &&
!symbol.hasAnnotation(ClassId.topLevel(FqName(TRANSIENT)), context.session)
symbol.backingFieldSymbol?.hasAnnotation(ClassId.topLevel(FqName(TRANSIENT)), context.session) != true
) {
for (type in findNonKudosType(symbol.resolvedReturnType, context)) {
reporter.reportOn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package com.kanyun.kudos.compiler.k2.diagnostic
import org.jetbrains.kotlin.diagnostics.KtDiagnosticFactoryToRendererMap
import org.jetbrains.kotlin.diagnostics.rendering.BaseDiagnosticRendererFactory
import org.jetbrains.kotlin.diagnostics.rendering.Renderers
import org.jetbrains.kotlin.fir.analysis.diagnostics.checkMissingMessages

object KudosKtDefaultErrorMessages : BaseDiagnosticRendererFactory() {
override val MAP = KtDiagnosticFactoryToRendererMap("Kudos").also { map ->
Expand Down Expand Up @@ -72,7 +71,5 @@ object KudosKtDefaultErrorMessages : BaseDiagnosticRendererFactory() {
KudosKtErrors.GENERIC_TYPE,
"Generic type is not supported. You can declare a subclass of it providing concrete type arguments.",
)

map.checkMissingMessages(KudosKtErrors)
}
}
1 change: 0 additions & 1 deletion kudos-maven-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ buildConfig {

val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions.freeCompilerArgs += listOf(
"-Xjvm-default=enable",
"-Xcontext-receivers",
"-opt-in=kotlin.RequiresOptIn"
)
Expand Down
4 changes: 2 additions & 2 deletions kudos-sample/kudos-maven-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.8.20</kotlin.version>
<kudos.version>1.8.20-1.0.1</kudos.version>
<kotlin.version>1.9.20</kotlin.version>
<kudos.version>1.9.20-1.0.1</kudos.version>
<kotlin.code.style>official</kotlin.code.style>
<junit.version>4.13.1</junit.version>
</properties>
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots")
}
}

Expand Down

0 comments on commit 14d54b5

Please sign in to comment.