Skip to content

Commit 20c092b

Browse files
committed
Add the checkLegacyAbi task into CI pipeline
1 parent d6a8830 commit 20c092b

7 files changed

Lines changed: 123 additions & 0 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,11 @@ jobs:
3535
# Runs the main check task to compile, test, and verify the project
3636
- name: Run Tests & Quality Checks
3737
run: ./gradlew check
38+
39+
# Checks the binary compatibility of the library's files
40+
- name: Check Binary Compatibility
41+
run: |
42+
if ! ./gradlew checkLegacyAbi; then
43+
echo "::error::This PR changes Kotlin AutoMapper's public API. Run './gradlew updateLegacyAbi' and commit the new ABI files"
44+
exit 1
45+
fi
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
public abstract interface annotation class io/github/jacksever/automapper/annotation/AutoConverter : java/lang/annotation/Annotation {
2+
}
3+
4+
public abstract interface annotation class io/github/jacksever/automapper/annotation/AutoMapper : java/lang/annotation/Annotation {
5+
public abstract fun converters ()[Ljava/lang/Class;
6+
public abstract fun defaultValues ()[Lio/github/jacksever/automapper/annotation/DefaultValue;
7+
public abstract fun propertyMappings ()[Lio/github/jacksever/automapper/annotation/PropertyMapping;
8+
public abstract fun reversible ()Z
9+
}
10+
11+
public abstract interface annotation class io/github/jacksever/automapper/annotation/AutoMapperModule : java/lang/annotation/Annotation {
12+
public abstract fun converters ()[Ljava/lang/Class;
13+
}
14+
15+
public abstract interface annotation class io/github/jacksever/automapper/annotation/DefaultValue : java/lang/annotation/Annotation {
16+
public abstract fun property ()Ljava/lang/String;
17+
public abstract fun source ()Lio/github/jacksever/automapper/annotation/DefaultValueSource;
18+
public abstract fun value ()Ljava/lang/String;
19+
}
20+
21+
public final class io/github/jacksever/automapper/annotation/DefaultValueSource : java/lang/Enum {
22+
public static final field INLINE Lio/github/jacksever/automapper/annotation/DefaultValueSource;
23+
public static final field PARAMETER Lio/github/jacksever/automapper/annotation/DefaultValueSource;
24+
public static final field PARAMETER_WITH_DEFAULT Lio/github/jacksever/automapper/annotation/DefaultValueSource;
25+
public static fun getEntries ()Lkotlin/enums/EnumEntries;
26+
public static fun valueOf (Ljava/lang/String;)Lio/github/jacksever/automapper/annotation/DefaultValueSource;
27+
public static fun values ()[Lio/github/jacksever/automapper/annotation/DefaultValueSource;
28+
}
29+
30+
public abstract interface annotation class io/github/jacksever/automapper/annotation/PropertyMapping : java/lang/annotation/Annotation {
31+
public abstract fun from ()Ljava/lang/String;
32+
public abstract fun to ()Ljava/lang/String;
33+
}
34+
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Klib ABI Dump
2+
// Targets: [iosArm64, iosSimulatorArm64, js, linuxArm64, linuxX64, macosArm64, tvosArm64, tvosSimulatorArm64, wasmJs, wasmWasi, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64]
3+
// Rendering settings:
4+
// - Signature version: 2
5+
// - Show manifest properties: true
6+
// - Show declarations: true
7+
8+
// Library unique name: <io.github.jacksever.automapper:annotation>
9+
open annotation class io.github.jacksever.automapper.annotation/AutoConverter : kotlin/Annotation { // io.github.jacksever.automapper.annotation/AutoConverter|null[0]
10+
constructor <init>() // io.github.jacksever.automapper.annotation/AutoConverter.<init>|<init>(){}[0]
11+
}
12+
13+
open annotation class io.github.jacksever.automapper.annotation/AutoMapper : kotlin/Annotation { // io.github.jacksever.automapper.annotation/AutoMapper|null[0]
14+
constructor <init>(kotlin/Boolean = ..., kotlin/Array<kotlin.reflect/KClass<*>> = ..., kotlin/Array<io.github.jacksever.automapper.annotation/DefaultValue> = ..., kotlin/Array<io.github.jacksever.automapper.annotation/PropertyMapping> = ...) // io.github.jacksever.automapper.annotation/AutoMapper.<init>|<init>(kotlin.Boolean;kotlin.Array<kotlin.reflect.KClass<*>>;kotlin.Array<io.github.jacksever.automapper.annotation.DefaultValue>;kotlin.Array<io.github.jacksever.automapper.annotation.PropertyMapping>){}[0]
15+
16+
final val converters // io.github.jacksever.automapper.annotation/AutoMapper.converters|{}converters[0]
17+
final fun <get-converters>(): kotlin/Array<kotlin.reflect/KClass<*>> // io.github.jacksever.automapper.annotation/AutoMapper.converters.<get-converters>|<get-converters>(){}[0]
18+
final val defaultValues // io.github.jacksever.automapper.annotation/AutoMapper.defaultValues|{}defaultValues[0]
19+
final fun <get-defaultValues>(): kotlin/Array<io.github.jacksever.automapper.annotation/DefaultValue> // io.github.jacksever.automapper.annotation/AutoMapper.defaultValues.<get-defaultValues>|<get-defaultValues>(){}[0]
20+
final val propertyMappings // io.github.jacksever.automapper.annotation/AutoMapper.propertyMappings|{}propertyMappings[0]
21+
final fun <get-propertyMappings>(): kotlin/Array<io.github.jacksever.automapper.annotation/PropertyMapping> // io.github.jacksever.automapper.annotation/AutoMapper.propertyMappings.<get-propertyMappings>|<get-propertyMappings>(){}[0]
22+
final val reversible // io.github.jacksever.automapper.annotation/AutoMapper.reversible|{}reversible[0]
23+
final fun <get-reversible>(): kotlin/Boolean // io.github.jacksever.automapper.annotation/AutoMapper.reversible.<get-reversible>|<get-reversible>(){}[0]
24+
}
25+
26+
open annotation class io.github.jacksever.automapper.annotation/AutoMapperModule : kotlin/Annotation { // io.github.jacksever.automapper.annotation/AutoMapperModule|null[0]
27+
constructor <init>(kotlin/Array<kotlin.reflect/KClass<*>> = ...) // io.github.jacksever.automapper.annotation/AutoMapperModule.<init>|<init>(kotlin.Array<kotlin.reflect.KClass<*>>){}[0]
28+
29+
final val converters // io.github.jacksever.automapper.annotation/AutoMapperModule.converters|{}converters[0]
30+
final fun <get-converters>(): kotlin/Array<kotlin.reflect/KClass<*>> // io.github.jacksever.automapper.annotation/AutoMapperModule.converters.<get-converters>|<get-converters>(){}[0]
31+
}
32+
33+
open annotation class io.github.jacksever.automapper.annotation/DefaultValue : kotlin/Annotation { // io.github.jacksever.automapper.annotation/DefaultValue|null[0]
34+
constructor <init>(kotlin/String, kotlin/String = ..., io.github.jacksever.automapper.annotation/DefaultValueSource = ...) // io.github.jacksever.automapper.annotation/DefaultValue.<init>|<init>(kotlin.String;kotlin.String;io.github.jacksever.automapper.annotation.DefaultValueSource){}[0]
35+
36+
final val property // io.github.jacksever.automapper.annotation/DefaultValue.property|{}property[0]
37+
final fun <get-property>(): kotlin/String // io.github.jacksever.automapper.annotation/DefaultValue.property.<get-property>|<get-property>(){}[0]
38+
final val source // io.github.jacksever.automapper.annotation/DefaultValue.source|{}source[0]
39+
final fun <get-source>(): io.github.jacksever.automapper.annotation/DefaultValueSource // io.github.jacksever.automapper.annotation/DefaultValue.source.<get-source>|<get-source>(){}[0]
40+
final val value // io.github.jacksever.automapper.annotation/DefaultValue.value|{}value[0]
41+
final fun <get-value>(): kotlin/String // io.github.jacksever.automapper.annotation/DefaultValue.value.<get-value>|<get-value>(){}[0]
42+
}
43+
44+
open annotation class io.github.jacksever.automapper.annotation/PropertyMapping : kotlin/Annotation { // io.github.jacksever.automapper.annotation/PropertyMapping|null[0]
45+
constructor <init>(kotlin/String, kotlin/String) // io.github.jacksever.automapper.annotation/PropertyMapping.<init>|<init>(kotlin.String;kotlin.String){}[0]
46+
47+
final val from // io.github.jacksever.automapper.annotation/PropertyMapping.from|{}from[0]
48+
final fun <get-from>(): kotlin/String // io.github.jacksever.automapper.annotation/PropertyMapping.from.<get-from>|<get-from>(){}[0]
49+
final val to // io.github.jacksever.automapper.annotation/PropertyMapping.to|{}to[0]
50+
final fun <get-to>(): kotlin/String // io.github.jacksever.automapper.annotation/PropertyMapping.to.<get-to>|<get-to>(){}[0]
51+
}
52+
53+
final enum class io.github.jacksever.automapper.annotation/DefaultValueSource : kotlin/Enum<io.github.jacksever.automapper.annotation/DefaultValueSource> { // io.github.jacksever.automapper.annotation/DefaultValueSource|null[0]
54+
enum entry INLINE // io.github.jacksever.automapper.annotation/DefaultValueSource.INLINE|null[0]
55+
enum entry PARAMETER // io.github.jacksever.automapper.annotation/DefaultValueSource.PARAMETER|null[0]
56+
enum entry PARAMETER_WITH_DEFAULT // io.github.jacksever.automapper.annotation/DefaultValueSource.PARAMETER_WITH_DEFAULT|null[0]
57+
58+
final val entries // io.github.jacksever.automapper.annotation/DefaultValueSource.entries|#static{}entries[0]
59+
final fun <get-entries>(): kotlin.enums/EnumEntries<io.github.jacksever.automapper.annotation/DefaultValueSource> // io.github.jacksever.automapper.annotation/DefaultValueSource.entries.<get-entries>|<get-entries>#static(){}[0]
60+
61+
final fun valueOf(kotlin/String): io.github.jacksever.automapper.annotation/DefaultValueSource // io.github.jacksever.automapper.annotation/DefaultValueSource.valueOf|valueOf#static(kotlin.String){}[0]
62+
final fun values(): kotlin/Array<io.github.jacksever.automapper.annotation/DefaultValueSource> // io.github.jacksever.automapper.annotation/DefaultValueSource.values|values#static(){}[0]
63+
}

automapper/annotation/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id("kotlin.automapper")
33
id("kotlin.automapper.publish")
4+
id("kotlin.automapper.validation")
45
id("kotlin.automapper.multiplatform")
56
}
67

automapper/processor/api/processor.api

Whitespace-only changes.

automapper/processor/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id("kotlin.automapper")
33
id("kotlin.automapper.jvm")
44
id("kotlin.automapper.publish")
5+
id("kotlin.automapper.validation")
56
}
67

78
automapper {

build-logic/convention/src/main/kotlin/kotlin.automapper.validation.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2026 Alexander Gorodnikov
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
218
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
319
import org.jetbrains.kotlin.gradle.dsl.abi.AbiValidationExtension

0 commit comments

Comments
 (0)