File tree Expand file tree Collapse file tree 9 files changed +13
-15
lines changed
src/main/java/com/kanyun/kudos/compiler
kudos-sample/kudos-maven-sample Expand file tree Collapse file tree 9 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import com.diffplug.gradle.spotless.SpotlessExtension
22import com.diffplug.gradle.spotless.SpotlessPlugin
33
44plugins {
5- kotlin(" jvm" ) version " 1.8 .20" apply false
6- id(" com.bennyhuo.kotlin.trimindent" ) version " 1.8 .20-1.0 .0" apply false
5+ kotlin(" jvm" ) version " 1.9 .20" apply false
6+ id(" com.bennyhuo.kotlin.trimindent" ) version " 1.9 .20-1.1 .0" apply false
77 id(" org.jetbrains.dokka" ) version " 1.7.10" apply false
88 id(" com.github.gmazzo.buildconfig" ) version " 2.1.0" apply false
99 id(" com.vanniktech.maven.publish" ) version " 0.22.0" apply false
Original file line number Diff line number Diff line change 11kotlin.code.style =official
22
3- VERSION_NAME =1.8 .20-1.0.1
3+ VERSION_NAME =1.9 .20-1.0.1
44
55GROUP =com.kanyun.kudos
66
Original file line number Diff line number Diff line change @@ -39,12 +39,11 @@ dependencies {
3939 testImplementation(project(" :kudos-jackson" ))
4040 testImplementation(" org.jetbrains.kotlin:kotlin-noarg:1.8.20" )
4141 testImplementation(" org.jetbrains.kotlin:kotlin-compiler-embeddable" )
42- testImplementation(" com.bennyhuo.kotlin:kotlin-compile-testing-extensions:1.8 .20-1.2.2 " )
42+ testImplementation(" com.bennyhuo.kotlin:kotlin-compile-testing-extensions:1.9 .20-1.3.0 " )
4343}
4444
4545val compileKotlin: KotlinCompile by tasks
4646compileKotlin.kotlinOptions.freeCompilerArgs + = listOf (
47- " -Xjvm-default=enable" ,
4847 " -Xcontext-receivers" ,
4948 " -opt-in=kotlin.RequiresOptIn"
5049)
Original file line number Diff line number Diff line change @@ -175,7 +175,8 @@ class KudosIrClassTransformer(
175175 ctor.body = context.irFactory.createBlockBody(
176176 ctor.startOffset,
177177 ctor.endOffset,
178- listOfNotNull(
178+ ).apply {
179+ statements + = listOfNotNull(
179180 // call super
180181 IrDelegatingConstructorCallImpl (
181182 ctor.startOffset,
@@ -192,8 +193,9 @@ class KudosIrClassTransformer(
192193 klass.symbol,
193194 context.irBuiltIns.unitType,
194195 ),
195- ) + builder.setupDefaultValues(),
196- )
196+ )
197+ statements + = builder.setupDefaultValues()
198+ }
197199 }
198200 }
199201
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ class KudosFirClassChecker(
174174 ) {
175175 if (symbol.hasBackingField && ! symbol.hasDelegate &&
176176 ! symbol.hasAnnotation(ClassId .topLevel(FqName (KUDOS_IGNORE )), context.session) &&
177- ! symbol.hasAnnotation(ClassId .topLevel(FqName (TRANSIENT )), context.session)
177+ symbol.backingFieldSymbol?. hasAnnotation(ClassId .topLevel(FqName (TRANSIENT )), context.session) != true
178178 ) {
179179 for (type in findNonKudosType(symbol.resolvedReturnType, context)) {
180180 reporter.reportOn(
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ package com.kanyun.kudos.compiler.k2.diagnostic
1919import org.jetbrains.kotlin.diagnostics.KtDiagnosticFactoryToRendererMap
2020import org.jetbrains.kotlin.diagnostics.rendering.BaseDiagnosticRendererFactory
2121import org.jetbrains.kotlin.diagnostics.rendering.Renderers
22- import org.jetbrains.kotlin.fir.analysis.diagnostics.checkMissingMessages
2322
2423object KudosKtDefaultErrorMessages : BaseDiagnosticRendererFactory() {
2524 override val MAP = KtDiagnosticFactoryToRendererMap (" Kudos" ).also { map ->
@@ -72,7 +71,5 @@ object KudosKtDefaultErrorMessages : BaseDiagnosticRendererFactory() {
7271 KudosKtErrors .GENERIC_TYPE ,
7372 " Generic type is not supported. You can declare a subclass of it providing concrete type arguments." ,
7473 )
75-
76- map.checkMissingMessages(KudosKtErrors )
7774 }
7875}
Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ buildConfig {
6464
6565val compileKotlin: KotlinCompile by tasks
6666compileKotlin.kotlinOptions.freeCompilerArgs + = listOf (
67- " -Xjvm-default=enable" ,
6867 " -Xcontext-receivers" ,
6968 " -opt-in=kotlin.RequiresOptIn"
7069)
Original file line number Diff line number Diff line change 1212
1313 <properties >
1414 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
15- <kotlin .version>1.8 .20</kotlin .version>
16- <kudos .version>1.8 .20-1.0.1</kudos .version>
15+ <kotlin .version>1.9 .20</kotlin .version>
16+ <kudos .version>1.9 .20-1.0.1</kudos .version>
1717 <kotlin .code.style>official</kotlin .code.style>
1818 <junit .version>4.13.1</junit .version>
1919 </properties >
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ pluginManagement {
22 repositories {
33 mavenCentral()
44 gradlePluginPortal()
5+ maven(" https://s01.oss.sonatype.org/content/repositories/snapshots" )
56 }
67}
78
You can’t perform that action at this time.
0 commit comments