diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index e933ad9..04f1e2e 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v5 - uses: gradle/actions/setup-gradle@v5 - name: Check ABI - run: ./gradlew apiCheck + run: ./gradlew checkLegacyAbi verify-libs: runs-on: ubuntu-latest diff --git a/build.gradle.kts b/build.gradle.kts index b1de580..7d33e03 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { alias(libs.plugins.android.library) apply false - alias(libs.plugins.binary.compatibility) alias(libs.plugins.compose.compiler) alias(libs.plugins.jetbrains.compose) apply false alias(libs.plugins.detekt) @@ -11,10 +10,6 @@ plugins { alias(libs.plugins.m2p) apply false } -apiValidation { - ignoredProjects += listOf() -} - detekt { config.from(files("config/detekt/detekt.yml")) buildUponDefaultConfig = true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5f6f2e0..179a842 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,6 @@ kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotl [plugins] android-library = { id = "com.android.library", version.ref = "agp" } -binary-compatibility = "org.jetbrains.kotlinx.binary-compatibility-validator:0.16.3" compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose" } diff --git a/leviathan-compose/api/leviathan-compose.klib.api b/leviathan-compose/api/leviathan-compose.klib.api new file mode 100644 index 0000000..f97c54c --- /dev/null +++ b/leviathan-compose/api/leviathan-compose.klib.api @@ -0,0 +1,9 @@ +// Klib ABI Dump +// Targets: [iosArm64, iosSimulatorArm64, iosX64, wasmJs] +// Rendering settings: +// - Signature version: 2 +// - Show manifest properties: true +// - Show declarations: true + +// Library unique name: +final fun <#A: kotlin/Any?> com.composegears.leviathan.compose/leviathanInject(kotlin/Function0>, androidx.compose.runtime/Composer?, kotlin/Int): #A // com.composegears.leviathan.compose/leviathanInject|leviathanInject(kotlin.Function0>;androidx.compose.runtime.Composer?;kotlin.Int){0§}[0] diff --git a/leviathan-compose/build.gradle.kts b/leviathan-compose/build.gradle.kts index 46c5817..f598db3 100644 --- a/leviathan-compose/build.gradle.kts +++ b/leviathan-compose/build.gradle.kts @@ -1,6 +1,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation plugins { alias(libs.plugins.kotlin.multiplatform) @@ -15,6 +16,11 @@ version = "2.0.0" kotlin { explicitApi() + @OptIn(ExperimentalAbiValidation::class) + abiValidation { + enabled = true + } + jvm() androidTarget { publishLibraryVariants("release") diff --git a/leviathan/api/leviathan.klib.api b/leviathan/api/leviathan.klib.api new file mode 100644 index 0000000..e66c900 --- /dev/null +++ b/leviathan/api/leviathan.klib.api @@ -0,0 +1,35 @@ +// Klib ABI Dump +// Targets: [iosArm64, iosSimulatorArm64, iosX64, wasmJs] +// Rendering settings: +// - Signature version: 2 +// - Show manifest properties: true +// - Show declarations: true + +// Library unique name: +open annotation class com.composegears.leviathan/LeviathanDelicateApi : kotlin/Annotation { // com.composegears.leviathan/LeviathanDelicateApi|null[0] + constructor () // com.composegears.leviathan/LeviathanDelicateApi.|(){}[0] +} + +abstract class <#A: kotlin/Any?> com.composegears.leviathan/Dependency { // com.composegears.leviathan/Dependency|null[0] + abstract fun get(): #A // com.composegears.leviathan/Dependency.get|get(){}[0] + abstract fun overrideWith(kotlin/Function0<#A>?) // com.composegears.leviathan/Dependency.overrideWith|overrideWith(kotlin.Function0<1:0>?){}[0] + final fun getValue(kotlin/Any?, kotlin.reflect/KProperty<*>): #A // com.composegears.leviathan/Dependency.getValue|getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){}[0] +} + +abstract class <#A: kotlin/Any?> com.composegears.leviathan/LateInitDependency : com.composegears.leviathan/Dependency<#A> { // com.composegears.leviathan/LateInitDependency|null[0] + abstract fun provides(kotlin/Function0<#A>) // com.composegears.leviathan/LateInitDependency.provides|provides(kotlin.Function0<1:0>){}[0] +} + +abstract class com.composegears.leviathan/Leviathan { // com.composegears.leviathan/Leviathan|null[0] + constructor () // com.composegears.leviathan/Leviathan.|(){}[0] + + final fun <#A1: kotlin/Any?, #B1: com.composegears.leviathan/Dependency<#A1>> (com.composegears.leviathan/DependencyProvider<#B1>).getValue(kotlin/Any?, kotlin.reflect/KProperty<*>): #B1 // com.composegears.leviathan/Leviathan.getValue|getValue@com.composegears.leviathan.DependencyProvider<0:1>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§;1§>}[0] + final fun <#A1: kotlin/Any?> factoryOf(kotlin/Function0<#A1>): com.composegears.leviathan/DependencyProvider> // com.composegears.leviathan/Leviathan.factoryOf|factoryOf(kotlin.Function0<0:0>){0§}[0] + final fun <#A1: kotlin/Any?> instanceOf(kotlin/Boolean, kotlin/Function0<#A1>): com.composegears.leviathan/DependencyProvider> // com.composegears.leviathan/Leviathan.instanceOf|instanceOf(kotlin.Boolean;kotlin.Function0<0:0>){0§}[0] + final fun <#A1: kotlin/Any?> instanceOf(kotlin/Function0<#A1>): com.composegears.leviathan/DependencyProvider> // com.composegears.leviathan/Leviathan.instanceOf|instanceOf(kotlin.Function0<0:0>){0§}[0] + final fun <#A1: kotlin/Any?> lateInitInstance(): com.composegears.leviathan/DependencyProvider> // com.composegears.leviathan/Leviathan.lateInitInstance|lateInitInstance(){0§}[0] + + final object Companion // com.composegears.leviathan/Leviathan.Companion|null[0] +} + +final class <#A: com.composegears.leviathan/Dependency<*>> com.composegears.leviathan/DependencyProvider // com.composegears.leviathan/DependencyProvider|null[0] diff --git a/leviathan/build.gradle.kts b/leviathan/build.gradle.kts index 42dca68..11944d4 100644 --- a/leviathan/build.gradle.kts +++ b/leviathan/build.gradle.kts @@ -1,6 +1,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation plugins { alias(libs.plugins.kotlin.multiplatform) @@ -13,6 +14,11 @@ version = "2.0.0" kotlin { explicitApi() + @OptIn(ExperimentalAbiValidation::class) + abiValidation { + enabled = true + } + jvm() androidTarget { publishLibraryVariants("release")