Skip to content

Commit d372ad2

Browse files
authored
Update to 1.8.21 (#1071)
1 parent 2dafda4 commit d372ad2

File tree

18 files changed

+114
-55
lines changed

18 files changed

+114
-55
lines changed

build.gradle.kts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import org.jetbrains.dokka.gradle.DokkaTask
2+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
24

35
@Suppress("DSL_SCOPE_VIOLATION")
46
plugins {
@@ -96,14 +98,3 @@ configure(subprojects - project(":arrow-meta-docs")) {
9698
}
9799
}
98100
}
99-
100-
val toolchain = project.extensions.getByType<JavaToolchainService>()
101-
allprojects {
102-
tasks.withType<JavaCompile>().configureEach {
103-
javaCompiler.set(toolchain.compilerFor {
104-
val jvmTargetVersion = properties["jvmTargetVersion"].toString()
105-
val javaVersion = if (jvmTargetVersion == "1.8") "8" else jvmTargetVersion
106-
languageVersion.set(JavaLanguageVersion.of(javaVersion))
107-
})
108-
}
109-
}

docs/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ plugins {
1111
alias(libs.plugins.arrowGradleConfig.kotlin)
1212
}
1313

14+
kotlin {
15+
explicitApi = null
16+
17+
val jvmTargetVersion = properties["jvmTargetVersion"].toString()
18+
val javaVersion = if (jvmTargetVersion == "1.8") "8" else jvmTargetVersion
19+
jvmToolchain {
20+
languageVersion.set(JavaLanguageVersion.of(javaVersion))
21+
}
22+
}
23+
1424
dependencies {
1525
runtimeOnly(libs.kotlin.stdlibJDK8)
1626
runtimeOnly(projects.arrowMeta)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pom.smc.url=https://github.com/arrow-kt/arrow-meta/
1010
pom.smc.connection=scm:git:git://github.com/arrow-kt/arrow-meta.git
1111
pom.smc.developerConnection=scm:git:ssh://[email protected]/arrow-kt/arrow-meta.git
1212

13-
jvmTargetVersion=1.8
13+
jvmTargetVersion=11
1414

1515
# Gradle options
1616
org.gradle.jvmargs=-Xmx4g

gradle/projects.libs.versions.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[versions]
2-
arrow = "1.1.5"
3-
arrowGradleConfig = "0.11.0"
2+
arrow = "1.2.0-RC"
3+
arrowGradleConfig = "0.12.0-rc.3"
44
assertj = "3.24.2"
55
classgraph = "4.8.157"
66
dokka = "1.8.10"
77
intellijOpenApi = "7.0.3"
88
javaAssist = "3.29.2-GA"
99
junit = "5.9.2"
10-
kotlin = "1.8.10"
10+
kotlin = "1.8.21"
1111
kotlinCompileTesting = "1.5.0"
1212
javaCompileTesting = "0.21.0"
1313
kotlinBinaryCompatibilityValidator = "0.13.0"
1414
detekt = "1.22.0"
15-
ksp = "1.8.10-1.0.9"
15+
ksp = "1.8.21-1.0.11"
1616

1717
[libraries]
1818
arrowCore = { module = "io.arrow-kt:arrow-core", version.ref = "arrow" }

libs/arrow-meta/api/arrow-meta.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,13 +729,13 @@ public final class arrow/meta/phases/codegen/ir/IrUtils : org/jetbrains/kotlin/i
729729
public fun createExpressionBody (IILkotlin/jvm/functions/Function1;)Lorg/jetbrains/kotlin/ir/expressions/IrExpressionBody;
730730
public fun createExpressionBody (IILorg/jetbrains/kotlin/ir/expressions/IrExpression;)Lorg/jetbrains/kotlin/ir/expressions/IrExpressionBody;
731731
public fun createExpressionBody (Lorg/jetbrains/kotlin/ir/expressions/IrExpression;)Lorg/jetbrains/kotlin/ir/expressions/IrExpressionBody;
732-
public fun createFakeOverrideFunction (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/descriptors/DescriptorVisibility;Lorg/jetbrains/kotlin/descriptors/Modality;Lorg/jetbrains/kotlin/ir/types/IrType;ZZZZZZZ)Lorg/jetbrains/kotlin/ir/declarations/IrSimpleFunction;
733-
public fun createFakeOverrideProperty (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/descriptors/DescriptorVisibility;Lorg/jetbrains/kotlin/descriptors/Modality;ZZZZZZ)Lorg/jetbrains/kotlin/ir/declarations/IrProperty;
734732
public fun createField (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/ir/symbols/IrFieldSymbol;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/ir/types/IrType;Lorg/jetbrains/kotlin/descriptors/DescriptorVisibility;ZZZ)Lorg/jetbrains/kotlin/ir/declarations/IrField;
735733
public fun createFlexibleType (Lorg/jetbrains/kotlin/types/model/SimpleTypeMarker;Lorg/jetbrains/kotlin/types/model/SimpleTypeMarker;)Lorg/jetbrains/kotlin/types/model/KotlinTypeMarker;
736734
public fun createFunction (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/ir/symbols/IrSimpleFunctionSymbol;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/descriptors/DescriptorVisibility;Lorg/jetbrains/kotlin/descriptors/Modality;Lorg/jetbrains/kotlin/ir/types/IrType;ZZZZZZZZLorg/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedContainerSource;)Lorg/jetbrains/kotlin/ir/declarations/IrSimpleFunction;
735+
public fun createFunctionWithLateBinding (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/descriptors/DescriptorVisibility;Lorg/jetbrains/kotlin/descriptors/Modality;Lorg/jetbrains/kotlin/ir/types/IrType;ZZZZZZZ)Lorg/jetbrains/kotlin/ir/declarations/IrSimpleFunction;
737736
public fun createLocalDelegatedProperty (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/ir/symbols/IrLocalDelegatedPropertySymbol;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/ir/types/IrType;Z)Lorg/jetbrains/kotlin/ir/declarations/IrLocalDelegatedProperty;
738737
public fun createProperty (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/ir/symbols/IrPropertySymbol;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/descriptors/DescriptorVisibility;Lorg/jetbrains/kotlin/descriptors/Modality;ZZZZZZZLorg/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedContainerSource;)Lorg/jetbrains/kotlin/ir/declarations/IrProperty;
738+
public fun createPropertyWithLateBinding (IILorg/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin;Lorg/jetbrains/kotlin/name/Name;Lorg/jetbrains/kotlin/descriptors/DescriptorVisibility;Lorg/jetbrains/kotlin/descriptors/Modality;ZZZZZZ)Lorg/jetbrains/kotlin/ir/declarations/IrProperty;
739739
public fun createSimpleType (Lorg/jetbrains/kotlin/types/model/TypeConstructorMarker;Ljava/util/List;ZZLjava/util/List;)Lorg/jetbrains/kotlin/types/model/SimpleTypeMarker;
740740
public fun createStarProjection (Lorg/jetbrains/kotlin/types/model/TypeParameterMarker;)Lorg/jetbrains/kotlin/ir/types/impl/IrStarProjectionImpl;
741741
public synthetic fun createStarProjection (Lorg/jetbrains/kotlin/types/model/TypeParameterMarker;)Lorg/jetbrains/kotlin/types/model/TypeArgumentMarker;

libs/arrow-meta/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ plugins {
1010

1111
kotlin {
1212
explicitApi = null
13+
14+
val jvmTargetVersion = properties["jvmTargetVersion"].toString()
15+
val javaVersion = if (jvmTargetVersion == "1.8") "8" else jvmTargetVersion
16+
jvmToolchain {
17+
languageVersion.set(JavaLanguageVersion.of(javaVersion))
18+
}
1319
}
1420

1521
tasks.compileKotlin {

libs/arrow-meta/src/main/kotlin/arrow/meta/Meta.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ typealias CliPlugin = Plugin<CompilerContext>
4545

4646
/**
4747
* Enables syntactic sugar for plugin creation via: "pluginId" { meta(
48+
*
4849
* ```
4950
* ..phases
5051
* ```
52+
*
5153
* ) }
5254
*/
5355
operator fun String.invoke(phases: CompilerContext.() -> List<ExtensionPhase>): CliPlugin =
@@ -59,7 +61,6 @@ operator fun String.invoke(phases: CompilerContext.() -> List<ExtensionPhase>):
5961
*
6062
* Plugin authors are encouraged to define [CliPlugin] extensions by making them part of the [Meta]
6163
* receiver:
62-
*
6364
* ```kotlin
6465
* val Meta.helloWorld: CliPlugin get() =
6566
* "Hello World" {

libs/arrow-meta/src/main/kotlin/arrow/meta/dsl/analysis/AnalysisSyntax.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import org.jetbrains.kotlin.resolve.diagnostics.MutableDiagnosticsWithSuppressio
2626
/**
2727
* The Analysis phase determines if the parsed AST type checks and resolves properly. As part of
2828
* this phase, we have access to events happening before and after resolution. Before resolution, we
29-
* are given the chance to modify the compiler trees in the form of `KtElement` via the [Quote
30-
* Template System].
29+
* are given the chance to modify the compiler trees in the form of `KtElement` via the
30+
* [Quote Template System].
3131
*/
3232
interface AnalysisSyntax {
3333

libs/arrow-meta/src/main/kotlin/arrow/meta/dsl/config/ConfigSyntax.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ interface ConfigSyntax {
3030
*
3131
* @updateConfiguration enables a DSL using [CompilerContext], and it can update
3232
* [CompilerConfiguration] through its mutable API.
33+
*
3334
* @return [Config] [ExtensionPhase].
3435
*/
3536
fun updateConfig(

libs/arrow-meta/src/main/kotlin/arrow/meta/phases/analysis/KtUtils.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.resolve.scopes.MemberScope
2929
import org.jetbrains.kotlin.types.KotlinType
3030
import org.jetbrains.kotlin.types.TypeConstructor
3131
import org.jetbrains.kotlin.types.TypeProjection
32-
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
3332

3433
fun KtDeclarationWithBody.body(): KtExpression? = bodyExpression ?: bodyBlockExpression
3534

@@ -146,9 +145,10 @@ fun resolveFunctionTypeEq(): Eq<KotlinType> = Eq { t1, t2 ->
146145
* intersect(typeConstructorEq(), types).isNotEmpty()
147146
* //sampleEnd
148147
* ```
149-
* @see [org.jetbrains.kotlin.types.TypeUtils] for more abstractions
148+
*
150149
* @param eq can be define for e.g.: [TypeConstructor], [MemberScope] or typeArguments List<
151-
* [TypeProjection]>, etc.
150+
* [TypeProjection]>, etc.
151+
* @see [org.jetbrains.kotlin.types.TypeUtils] for more abstractions
152152
* @see functionTypeEq
153153
*/
154154
fun <C : CallableDescriptor> C.intersect(
@@ -163,8 +163,9 @@ fun <C : CallableDescriptor> C.intersect(
163163
/**
164164
* given [eq] this function returns a List of [KotlinType] that are contained by both [list] and
165165
* [other]
166+
*
166167
* @param eq can be defined for [TypeConstructor], [MemberScope] or typeArguments List<
167-
* [TypeProjection]>, etc.
168+
* [TypeProjection]>, etc.
168169
* @see intersect
169170
*/
170171
fun <D : DeclarationDescriptor> D.intersect(
@@ -191,9 +192,8 @@ fun KtAnnotated.isAnnotatedWith(regex: Regex): Boolean =
191192

192193
val KtClass.companionObject: KtObjectDeclaration?
193194
get() =
194-
declarations
195-
.singleOrNull { it.safeAs<KtObjectDeclaration>()?.isCompanion() == true }
196-
.safeAs<KtObjectDeclaration>()
195+
declarations.singleOrNull { (it as? KtObjectDeclaration)?.isCompanion() == true }
196+
as? KtObjectDeclaration
197197

198198
fun DeclarationDescriptor.skipGeneration(): Boolean =
199199
platform != CommonPlatforms.defaultCommonPlatform &&

0 commit comments

Comments
 (0)