Skip to content

Commit dc454f4

Browse files
committed
Update Kotlin to 1.8.20
Also Gradle to 8.0, new version of publish plugin and I hope everything still works correctly in FIR.
1 parent 22f9ea1 commit dc454f4

File tree

15 files changed

+49
-56
lines changed

15 files changed

+49
-56
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ gradle-app.setting
6666
# gradle/wrapper/gradle-wrapper.properties
6767

6868
.DS_Store
69+
local.properties

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The plugin adds `readResolve` method for every object which either:
1414
1515
// plugins dsl
1616
plugins {
17-
id "me.shika.kotlin-object-java-serialization" version "1.4.1"
17+
id "me.shika.kotlin-object-java-serialization" version "1.4.2"
1818
}
1919
2020
// or else
@@ -25,7 +25,7 @@ buildscript {
2525
}
2626
}
2727
dependencies {
28-
classpath "me.shika:kotlin-object-java-serialization:1.4.1"
28+
classpath "me.shika:kotlin-object-java-serialization:1.4.2"
2929
}
3030
}
3131

build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
plugins {
22
id 'java'
3-
id 'org.jetbrains.kotlin.jvm' version '1.7.21'
3+
id 'org.jetbrains.kotlin.jvm' version '1.8.20'
44
}
55

6-
sourceCompatibility = 1.8
7-
86
allprojects {
97
repositories {
108
mavenLocal()
@@ -13,5 +11,9 @@ allprojects {
1311
}
1412

1513
group 'me.shika'
16-
version '1.4.1'
14+
version '1.4.2'
15+
16+
kotlin {
17+
jvmToolchain(11)
18+
}
1719
}

gradle-plugin/build.gradle

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,23 @@
11
plugins {
2-
id 'com.gradle.plugin-publish' version '0.18.0'
2+
id 'com.gradle.plugin-publish' version '1.2.0'
33
id 'maven-publish'
44
id 'java-gradle-plugin'
55
id 'org.jetbrains.kotlin.jvm'
66
}
77

88
apply from: rootProject.file('gradle/utils/embedded.gradle')
99

10-
pluginBundle {
10+
gradlePlugin {
1111
website = 'https://github.com/ShikaSD/kotlin-object-serialization-fix'
1212
vcsUrl = 'https://github.com/ShikaSD/kotlin-object-serialization-fix.git'
1313

14-
plugins {
15-
objectSerialization {
16-
displayName = "Java serialization fix for Kotlin object"
17-
description = "Solves the problem of Kotlin object being having different instance after deserialization using built-in Java serialization."
18-
tags = ['kotlin', 'compiler-plugin', 'java', 'serialization']
19-
}
20-
}
21-
22-
mavenCoordinates {
23-
groupId = project.getGroup()
24-
artifactId = "kotlin-object-java-serialization"
25-
version = project.getVersion()
26-
}
27-
}
28-
29-
publishing {
30-
afterEvaluate {
31-
publications {
32-
withType(MavenPublication) {
33-
artifactId "kotlin-object-java-serialization"
34-
}
35-
}
36-
}
37-
}
38-
39-
gradlePlugin {
4014
plugins {
4115
objectSerialization {
4216
id = "me.shika.kotlin-object-java-serialization"
4317
implementationClass = "me.shika.ObjectSerializationPlugin"
18+
displayName = "Java serialization fix for Kotlin object"
19+
description = "Solves the problem of Kotlin object being having different instance after deserialization using built-in Java serialization."
20+
tags.set(['kotlin', 'compiler-plugin', 'java', 'serialization'])
4421
}
4522
}
4623
}

gradle-plugin/src/main/kotlin/me/shika/ObjectSerializationPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ObjectSerializationPlugin : KotlinCompilerPluginSupportPlugin {
3636
SubpluginArtifact(
3737
groupId = "me.shika",
3838
artifactId = "kotlin-object-java-serialization",
39-
version = "1.4.1"
39+
version = "1.4.2"
4040
)
4141

4242
override fun isApplicable(kotlinCompilation: KotlinCompilation<*>): Boolean =

gradle/utils/embedded.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ afterEvaluate {
2929
}
3030
}
3131

32-
task sourcesJar(type: Jar) {
32+
tasks.getByName("sourcesJar") {
3333
archiveClassifier = 'sources'
3434
from embeddedProjects().collect { it.sourceSets.main.allSource }
3535
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

integration-test/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
plugins {
22
id 'org.jetbrains.kotlin.jvm'
3+
// Use for testing maven local
4+
// id 'me.shika.kotlin-object-java-serialization' version '1.4.2'
35
}
46

57
dependencies {

kotlin-plugin/build.gradle

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,7 @@ dependencies {
1010
implementation "org.jetbrains.kotlin:kotlin-gradle-plugin-api"
1111
compileOnly "org.jetbrains.kotlin:kotlin-compiler-embeddable"
1212

13-
testImplementation 'com.github.tschuchortdev:kotlin-compile-testing:1.4.9'
13+
testImplementation 'com.github.tschuchortdev:kotlin-compile-testing:1.5.0'
1414
testImplementation 'junit:junit:4.12'
1515
testImplementation 'org.jetbrains.kotlin:kotlin-compiler-embeddable'
1616
}
17-
18-
compileKotlin {
19-
kotlinOptions.jvmTarget = "1.8"
20-
}
21-
compileTestKotlin {
22-
kotlinOptions.jvmTarget = "1.8"
23-
}

kotlin-plugin/src/main/kotlin/me/shika/CommandLineProcessor.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ package me.shika
33
import org.jetbrains.kotlin.compiler.plugin.AbstractCliOption
44
import org.jetbrains.kotlin.compiler.plugin.CliOption
55
import org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
6+
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
67
import org.jetbrains.kotlin.config.CompilerConfiguration
78
import org.jetbrains.kotlin.config.CompilerConfigurationKey
89

910
//@AutoService(CommandLineProcessor::class)
11+
@OptIn(ExperimentalCompilerApi::class)
1012
class ObjectSerializationCommandLineProcessor : CommandLineProcessor {
1113
override val pluginId: String = "object-serialization-fix"
1214
override val pluginOptions: Collection<AbstractCliOption> =

0 commit comments

Comments
 (0)