Skip to content

Commit 633fe63

Browse files
committed
部分小调整;
1 parent 798c71c commit 633fe63

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ allprojects {
1212
repositories {
1313
mavenCentral()
1414
gradlePluginPortal()
15-
//mavenLocal()
15+
mavenLocal()
1616
//maven {
1717
// url = URI("")
1818
//}

buildSrc/src/main/kotlin/IProject.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object IProject : ProjectDetail() {
88
const val DESCRIPTION = "Generate platform-compatible functions for Kotlin suspend functions"
99
const val HOMEPAGE = "https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin"
1010

11-
override val version: Version = version(0, 3, 1)
11+
override val version: Version = version(0, 3, 2)
1212

1313
override val homepage: String get() = HOMEPAGE
1414

compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/utils/IrFunctionUtils.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,20 @@ fun IrPluginContext.createSuspendLambdaWithCoroutineScope(
104104

105105
val arguments = fields.mapTo(LinkedList()) { it } // preserve order
106106

107-
fun IrField.irGetField(): IrGetFieldImpl {
108-
return irGetField(irGet(this@functionInvoke.dispatchReceiverParameter!!), this)
107+
fun IrField.irGetField0(): IrGetFieldImpl {
108+
return irGetField(receiver = irGet(this@functionInvoke.dispatchReceiverParameter!!), field = this)
109109
}
110110

111111
if (originFunction.dispatchReceiverParameter != null) {
112-
this@call.dispatchReceiver = arguments.pop().irGetField()
112+
this@call.dispatchReceiver = arguments.pop().irGetField0()
113113
}
114114
if (originFunction.extensionReceiverParameter != null) {
115-
this@call.extensionReceiver = arguments.pop().irGetField()
115+
this@call.extensionReceiver = arguments.pop().irGetField0()
116116
}
117117

118118
// this@call.putValueArgument(0, irGet(scopeParam))
119119
for ((index, irField) in arguments.withIndex()) {
120-
this@call.putValueArgument(index, irField.irGetField())
120+
this@call.putValueArgument(index, irField.irGetField0())
121121
}
122122
}
123123
}
@@ -147,4 +147,4 @@ val Name.identifierOrMappedSpecialName: String
147147

148148

149149
val IrDeclarationContainer.functionsSequence: Sequence<IrSimpleFunction>
150-
get() = declarations.asSequence().filterIsInstance<IrSimpleFunction>()
150+
get() = declarations.asSequence().filterIsInstance<IrSimpleFunction>()
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
plugins {
22
`java-library`
33
kotlin("jvm")
4-
id("love.forte.plugin.suspend-transform")
4+
// id("love.forte.plugin.suspend-transform")
55
// id("suspend-transform.jvm-maven-publish")
66
// id(project(":suspend-transform-plugin-gradle"))
77
}
88

99
buildscript {
1010
this@buildscript.repositories {
1111
mavenLocal()
12-
// mavenCentral()
12+
mavenCentral()
1313
}
1414
dependencies {
1515
//this.implementation()
16-
classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:0.2.0")
16+
classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:0.3.1")
1717
}
1818
}
1919

20+
2021
//withType<JavaCompile> {
2122
// sourceCompatibility = "11"
2223
// targetCompatibility = "11"
@@ -25,10 +26,17 @@ plugins {
2526
// kotlinOptions.jvmTarget = "11"
2627
//}
2728

29+
repositories {
30+
mavenLocal()
31+
}
32+
33+
apply(plugin = "love.forte.plugin.suspend-transform")
34+
2835
dependencies {
2936
api(kotlin("stdlib"))
30-
api("love.forte.plugin.suspend-transform:suspend-transform-runtime:0.2.0")
31-
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
37+
// api("love.forte.plugin.suspend-transform:suspend-transform-runtime:0.3.2")
38+
// api("love.forte.plugin.suspend-transform:suspend-transform-annotation:0.3.2")
39+
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0")
3240
}
3341

3442

0 commit comments

Comments
 (0)