Skip to content

Commit bb54b18

Browse files
authored
Merge pull request #57 from ForteScarlet/dev-kt-2020-beta1
Update Kotlin to 2.0.20-Beta1
2 parents 015db01 + 2602a2d commit bb54b18

File tree

10 files changed

+17
-58
lines changed

10 files changed

+17
-58
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ val ktVersion = libs.versions.kotlin.get()
88

99
group = IProject.GROUP
1010
description = IProject.DESCRIPTION
11-
version = ktVersion + "-" + IProject.pluginVersion.toString()
11+
version = ktVersion + "-" + IProject.pluginVersion
1212

1313
allprojects {
1414
group = IProject.GROUP
1515
description = IProject.DESCRIPTION
16-
version = ktVersion + "-" + IProject.pluginVersion.toString()
16+
version = ktVersion + "-" + IProject.pluginVersion
1717

1818
repositories {
1919
mavenCentral()

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories {
1010

1111
val kotlinVersion: String = libs.versions.kotlin.get()
1212
val dokkaPluginVersion = "1.9.20"
13-
val gradleCommon = "0.4.0"
13+
val gradleCommon = "0.6.0"
1414
val nexusPublishPlugin = "2.0.0"
1515
val buildConfig = "5.3.5"
1616

buildSrc/src/main/kotlin/IProject.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import IProject.IS_SNAPSHOT
22
import love.forte.gradle.common.core.project.ProjectDetail
3-
import love.forte.gradle.common.core.project.Version
4-
import love.forte.gradle.common.core.project.minus
5-
import love.forte.gradle.common.core.project.version
63
import org.gradle.api.Project
74

85
object IProject : ProjectDetail() {
@@ -12,11 +9,11 @@ object IProject : ProjectDetail() {
129
const val DESCRIPTION = "Generate platform-compatible functions for Kotlin suspend functions"
1310
const val HOMEPAGE = "https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin"
1411

15-
// TODO
16-
val ktVersion = version(2, 0, 0)
17-
val pluginVersion = version(0, 9, 0) - version("dev1")
12+
// Remember the libs.versions.toml!
13+
val ktVersion = "2.0.20-Beta1"
14+
val pluginVersion = "0.9.1"
1815

19-
override val version: Version = ktVersion - pluginVersion
16+
override val version: String = "$ktVersion-$pluginVersion"
2017

2118
override val homepage: String get() = HOMEPAGE
2219

buildSrc/src/main/kotlin/suspend-transform.nexus-publish.gradle.kts

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if (!isPublishConfigurable) {
2222
}
2323

2424
nexusPublishConfig {
25-
projectDetail = IProject
25+
setWithProjectDetail(IProject)
2626
useStaging = project.provider { !project.version.toString().endsWith("SNAPSHOT", ignoreCase = true) }
2727
repositoriesConfig = {
2828
val (sonatypeUsername, sonatypePassword) = sonatypeUserInfoOrNull
@@ -35,39 +35,7 @@ nexusPublishConfig {
3535
}
3636
}
3737

38-
//if (isPublishConfigurable) {
39-
// nexusPublishing {
40-
// logger.info("[NEXUS] - project.group: ${project.group}")
41-
// logger.info("[NEXUS] - project.version: ${project.version}")
42-
// packageGroup by project.group.toString()
43-
// repositoryDescription by (project.description ?: "")
44-
//
45-
// useStaging.set(
46-
// project.provider { !project.version.toString().endsWith("SNAPSHOT", ignoreCase = true) }
47-
// )
48-
//
49-
// clientTimeout by 30 unit TimeUnit.MINUTES
50-
// connectTimeout by 30 unit TimeUnit.MINUTES
51-
//
52-
//
53-
// transitionCheckOptions {
54-
// maxRetries by 150
55-
// delayBetween by 15 unit TimeUnit.SECONDS
56-
// }
57-
//
58-
// repositories {
59-
// sonatype {
60-
// snapshotRepositoryUrl by uri(Sonatype.Snapshot.URL)
61-
// val (sonatypeUsername, sonatypePassword) = sonatypeUserInfoOrNull ?: return@sonatype
62-
// username by sonatypeUsername
63-
// password by sonatypePassword
64-
// }
65-
// }
66-
// }
67-
68-
69-
logger.info("[nexus-publishing-configure] - [{}] configured.", name)
70-
//}
38+
logger.info("[nexus-publishing-configure] - [{}] configured.", name)
7139

7240

7341

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private fun FirAnnotation.getStringArgument0(
133133

134134
// If not found, try to use `findArgumentByName`
135135
val argByName = findArgumentByName(name, returnFirstWhenNotFound = false)
136-
return (argByName as? FirLiteralExpression<*>)?.value as? String
136+
return (argByName as? FirLiteralExpression)?.value as? String
137137
}
138138

139139
private fun FirAnnotation.getBooleanArgument0(
@@ -147,7 +147,7 @@ private fun FirAnnotation.getBooleanArgument0(
147147

148148
// If not found, try to use `findArgumentByName`
149149
val argByName = findArgumentByName(name, returnFirstWhenNotFound = false)
150-
return (argByName as? FirLiteralExpression<*>)?.value as? Boolean
150+
return (argByName as? FirLiteralExpression)?.value as? Boolean
151151
}
152152

153153

compiler/suspend-transform-plugin/src/testData/codegen/asProperty.fir.ir.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ FILE fqName:<root> fileName:/Main.kt
9999
annotations:
100100
Api4J
101101
overridden:
102-
public open prop: kotlin.String
102+
public open prop: kotlin.String declared in <root>.IProp
103103
FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:<get-prop> visibility:public modality:OPEN <> ($this:<root>.PropImpl) returnType:kotlin.String
104104
annotations:
105105
JvmAsync(baseName = <null>, suffix = <null>, asProperty = true)
@@ -122,7 +122,7 @@ FILE fqName:<root> fileName:/Main.kt
122122
annotations:
123123
Api4J
124124
overridden:
125-
public open propAsync: java.util.concurrent.CompletableFuture
125+
public open propAsync: java.util.concurrent.CompletableFuture declared in <root>.IProp
126126
FUN GENERATED[love.forte.plugin.suspendtrans.fir.SuspendTransformPluginKey] name:<get-propAsync> visibility:public modality:OPEN <> ($this:<root>.PropImpl) returnType:java.util.concurrent.CompletableFuture
127127
annotations:
128128
JvmBlocking(baseName = <null>, suffix = "", asProperty = true)

gradle/libs.versions.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
kotlinx-coroutines = "1.8.0"
33
kotlinx-serialization = "1.5.0"
44
google-auto-service = "1.0.1"
5-
#kotlin = "2.0.0-Beta3"
6-
#kotlin = "1.9.22"
7-
kotlin = "2.0.0"
5+
# Remember the `IProject.ktVersion`!
6+
kotlin = "2.0.20-Beta1"
87
compose = "1.5.4"
98
compose-compiler = "1.5.6"
109
compose-plugin = "1.6.0-beta01"

runtime/suspend-transform-runtime/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ kotlin {
104104
nativeTest.dependencies {
105105
implementation(libs.kotlinx.coroutines.test)
106106
}
107-
108-
// named("wasmJsMain").dependencies {
109-
// implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0-RC2")
110-
// }
111107
}
112108

113109
}

samples/sample-js/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ buildscript {
1515
mavenCentral()
1616
}
1717
dependencies {
18-
classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:0.8.0-beta1")
18+
classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.0.20-Beta1-0.9.1")
1919
}
2020
}
2121

samples/sample-jvm/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import love.forte.plugin.suspendtrans.gradle.SuspendTransformGradleExtension
2-
import org.jetbrains.kotlin.js.translate.context.Namer.kotlin
32

43
plugins {
54
`java-library`
@@ -17,7 +16,7 @@ buildscript {
1716
}
1817
dependencies {
1918
//this.implementation()
20-
classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:0.9.0-beta1")
19+
classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.0.20-Beta1-0.9.1")
2120
}
2221
}
2322

0 commit comments

Comments
 (0)