From 067b9d7c4d1b96d332be7e70f499d6134a8f4bb3 Mon Sep 17 00:00:00 2001 From: Ben Woodworth Date: Fri, 27 Sep 2024 10:25:35 -0400 Subject: [PATCH] WIP Split library primitives into parameterize-api TODO Tests? Deprecated in original library --- README.md | 1 + .../main/kotlin/dokka-conventions.gradle.kts | 2 + parameterize-api/api/parameterize-api.api | 53 +++++++++++++++++++ .../api/parameterize-api.klib.api | 53 +++++++++++++++++++ parameterize-api/build.gradle.kts | 37 +++++++++++++ .../src/commonMain/kotlin/Annotations.kt | 35 ++++++++++++ .../commonMain/kotlin/ParameterizeScope.kt | 12 ++++- .../kotlin/internal/InternalAnnotations.kt | 21 ++++++++ parameterize-core/api/parameterize-core.api | 48 ----------------- .../api/parameterize-core.klib.api | 36 ------------- parameterize-core/build.gradle.kts | 11 ++++ settings.gradle.kts | 1 + 12 files changed, 224 insertions(+), 86 deletions(-) create mode 100644 parameterize-api/api/parameterize-api.api create mode 100644 parameterize-api/api/parameterize-api.klib.api create mode 100644 parameterize-api/build.gradle.kts create mode 100644 parameterize-api/src/commonMain/kotlin/Annotations.kt rename {parameterize-core => parameterize-api}/src/commonMain/kotlin/ParameterizeScope.kt (96%) create mode 100644 parameterize-api/src/commonMain/kotlin/internal/InternalAnnotations.kt diff --git a/README.md b/README.md index 1cd82af..ae69315 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,7 @@ the need for an extra level of nesting nesting inside the group of tests. | Artifact | Description | |---------------------|---------------------------------------------------------------------------------------------------| +| `parameterize-api` | Library primitives, including the `ParameterizeScope` interface and `Parameter` functions. | | `parameterize-core` | The core functionality, with `parameterize {}` as the entry point for running parameterized code. | diff --git a/buildSrc/src/main/kotlin/dokka-conventions.gradle.kts b/buildSrc/src/main/kotlin/dokka-conventions.gradle.kts index 9e4bec3..d1de538 100644 --- a/buildSrc/src/main/kotlin/dokka-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/dokka-conventions.gradle.kts @@ -26,6 +26,8 @@ tasks.withType().configureEach { reportUndocumented = true failOnWarning = true + // TODO Suppress friend api annotations? + val releaseVersionRef = version.toString() .takeIf { version -> version.matches(Regex("""\d+\.\d+\.\d+""")) } ?.let { version -> "v$version" } diff --git a/parameterize-api/api/parameterize-api.api b/parameterize-api/api/parameterize-api.api new file mode 100644 index 0000000..dcd0994 --- /dev/null +++ b/parameterize-api/api/parameterize-api.api @@ -0,0 +1,53 @@ +public abstract interface annotation class com/benwoodworth/parameterize/ExperimentalParameterizeApi : java/lang/annotation/Annotation { +} + +public final class com/benwoodworth/parameterize/LazyParameterScope { + public static final synthetic fun box-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Lcom/benwoodworth/parameterize/LazyParameterScope; + public static fun constructor-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Lcom/benwoodworth/parameterize/ParameterizeScope; + public fun equals (Ljava/lang/Object;)Z + public static fun equals-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;Ljava/lang/Object;)Z + public static final fun equals-impl0 (Lcom/benwoodworth/parameterize/ParameterizeScope;Lcom/benwoodworth/parameterize/ParameterizeScope;)Z + public fun hashCode ()I + public static fun hashCode-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)I + public static final fun provideDelegate-13mUnGw (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/sequences/Sequence;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter; + public fun toString ()Ljava/lang/String; + public static fun toString-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Ljava/lang/String; + public final synthetic fun unbox-impl ()Lcom/benwoodworth/parameterize/ParameterizeScope; +} + +public abstract interface class com/benwoodworth/parameterize/ParameterizeScope { + public abstract fun getValue (Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; + public abstract fun provideDelegate-13mUnGw (Lkotlin/sequences/Sequence;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter; +} + +public final class com/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter { + public fun (Ljava/lang/Object;)V + public final fun getArgument ()Ljava/lang/Object; + public fun toString ()Ljava/lang/String; +} + +public final class com/benwoodworth/parameterize/ParameterizeScope$Parameter { + public static final synthetic fun box-impl (Lkotlin/sequences/Sequence;)Lcom/benwoodworth/parameterize/ParameterizeScope$Parameter; + public static fun constructor-impl (Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence; + public fun equals (Ljava/lang/Object;)Z + public static fun equals-impl (Lkotlin/sequences/Sequence;Ljava/lang/Object;)Z + public static final fun equals-impl0 (Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;)Z + public final fun getArguments ()Lkotlin/sequences/Sequence; + public fun hashCode ()I + public static fun hashCode-impl (Lkotlin/sequences/Sequence;)I + public fun toString ()Ljava/lang/String; + public static fun toString-impl (Lkotlin/sequences/Sequence;)Ljava/lang/String; + public final synthetic fun unbox-impl ()Lkotlin/sequences/Sequence; +} + +public final class com/benwoodworth/parameterize/ParameterizeScope$ParameterDelegate { +} + +public final class com/benwoodworth/parameterize/ParameterizeScopeKt { + public static final fun parameter (Lcom/benwoodworth/parameterize/ParameterizeScope;Ljava/lang/Iterable;)Lkotlin/sequences/Sequence; + public static final fun parameter (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence; + public static final fun parameterLazyIterable (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; + public static final fun parameterLazySequence (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; + public static final fun parameterOf (Lcom/benwoodworth/parameterize/ParameterizeScope;[Ljava/lang/Object;)Lkotlin/sequences/Sequence; +} + diff --git a/parameterize-api/api/parameterize-api.klib.api b/parameterize-api/api/parameterize-api.klib.api new file mode 100644 index 0000000..e9a40ca --- /dev/null +++ b/parameterize-api/api/parameterize-api.klib.api @@ -0,0 +1,53 @@ +// Klib ABI Dump +// Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, wasmWasi, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64] +// Rendering settings: +// - Signature version: 2 +// - Show manifest properties: true +// - Show declarations: true + +// Library unique name: +open annotation class com.benwoodworth.parameterize/ExperimentalParameterizeApi : kotlin/Annotation { // com.benwoodworth.parameterize/ExperimentalParameterizeApi|null[0] + constructor () // com.benwoodworth.parameterize/ExperimentalParameterizeApi.|(){}[0] +} + +abstract interface com.benwoodworth.parameterize/ParameterizeScope { // com.benwoodworth.parameterize/ParameterizeScope|null[0] + abstract fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1>).getValue(kotlin/Any?, kotlin.reflect/KProperty<*>): #A1 // com.benwoodworth.parameterize/ParameterizeScope.getValue|getValue@com.benwoodworth.parameterize.ParameterizeScope.DeclaredParameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§}[0] + abstract fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A1>).provideDelegate(kotlin/Any?, kotlin.reflect/KProperty<*>): com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1> // com.benwoodworth.parameterize/ParameterizeScope.provideDelegate|provideDelegate@com.benwoodworth.parameterize.ParameterizeScope.Parameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§}[0] + + final class <#A1: kotlin/Any?> ParameterDelegate // com.benwoodworth.parameterize/ParameterizeScope.ParameterDelegate|null[0] + + final class <#A1: out kotlin/Any?> DeclaredParameter { // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter|null[0] + constructor (#A1) // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.|(1:0){}[0] + + final val argument // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.argument|{}argument[0] + final fun (): #A1 // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.argument.|(){}[0] + + final fun toString(): kotlin/String // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.toString|toString(){}[0] + } + + final value class <#A1: out kotlin/Any?> Parameter { // com.benwoodworth.parameterize/ParameterizeScope.Parameter|null[0] + constructor (kotlin.sequences/Sequence<#A1>) // com.benwoodworth.parameterize/ParameterizeScope.Parameter.|(kotlin.sequences.Sequence<1:0>){}[0] + + final val arguments // com.benwoodworth.parameterize/ParameterizeScope.Parameter.arguments|{}arguments[0] + final fun (): kotlin.sequences/Sequence<#A1> // com.benwoodworth.parameterize/ParameterizeScope.Parameter.arguments.|(){}[0] + + final fun equals(kotlin/Any?): kotlin/Boolean // com.benwoodworth.parameterize/ParameterizeScope.Parameter.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // com.benwoodworth.parameterize/ParameterizeScope.Parameter.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // com.benwoodworth.parameterize/ParameterizeScope.Parameter.toString|toString(){}[0] + } +} + +final value class com.benwoodworth.parameterize/LazyParameterScope { // com.benwoodworth.parameterize/LazyParameterScope|null[0] + constructor (com.benwoodworth.parameterize/ParameterizeScope) // com.benwoodworth.parameterize/LazyParameterScope.|(com.benwoodworth.parameterize.ParameterizeScope){}[0] + + final fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A1>).provideDelegate(kotlin/Any?, kotlin.reflect/KProperty<*>): com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1> // com.benwoodworth.parameterize/LazyParameterScope.provideDelegate|provideDelegate@com.benwoodworth.parameterize.ParameterizeScope.Parameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§}[0] + final fun equals(kotlin/Any?): kotlin/Boolean // com.benwoodworth.parameterize/LazyParameterScope.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // com.benwoodworth.parameterize/LazyParameterScope.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // com.benwoodworth.parameterize/LazyParameterScope.toString|toString(){}[0] +} + +final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(kotlin.collections/Iterable<#A>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.collections.Iterable<0:0>){0§}[0] +final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(kotlin.sequences/Sequence<#A>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.sequences.Sequence<0:0>){0§}[0] +final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameterOf(kotlin/Array...): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameterOf|parameterOf@com.benwoodworth.parameterize.ParameterizeScope(kotlin.Array...){0§}[0] +final inline fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(crossinline kotlin/Function1>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.Function1>){0§}[0] +final inline fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(crossinline kotlin/Function1>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.Function1>){0§}[0] diff --git a/parameterize-api/build.gradle.kts b/parameterize-api/build.gradle.kts new file mode 100644 index 0000000..bc8621c --- /dev/null +++ b/parameterize-api/build.gradle.kts @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Ben Woodworth + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("kotlin-multiplatform-conventions") + id("dokka-conventions") + id("binary-compatibility-validator-conventions") + id("publishing-conventions") + id("ci-conventions") +} + +repositories { + mavenCentral() +} + +kotlin { + sourceSets { + configureEach { + languageSettings { + optIn("com.benwoodworth.parameterize.internal.ParameterizeApiFriendModuleApi") + } + } + } +} diff --git a/parameterize-api/src/commonMain/kotlin/Annotations.kt b/parameterize-api/src/commonMain/kotlin/Annotations.kt new file mode 100644 index 0000000..3907e57 --- /dev/null +++ b/parameterize-api/src/commonMain/kotlin/Annotations.kt @@ -0,0 +1,35 @@ +/* + * Copyright 2024 Ben Woodworth + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.benwoodworth.parameterize + +import kotlin.annotation.AnnotationTarget.* + +/** + * Marks declarations that are still **experimental** in Parameterize, which means that the design of the corresponding + * declarations has open issues which may (or may not) lead to their changes in the future. Roughly speaking, there is a + * chance that those declarations will be deprecated in the near future or the semantics of their behavior may change in + * some way that may break some code. + */ +@MustBeDocumented +@Retention(AnnotationRetention.BINARY) +@Target( + CLASS, ANNOTATION_CLASS, TYPEALIAS, + PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, + CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER +) +@RequiresOptIn(level = RequiresOptIn.Level.WARNING) +public annotation class ExperimentalParameterizeApi diff --git a/parameterize-core/src/commonMain/kotlin/ParameterizeScope.kt b/parameterize-api/src/commonMain/kotlin/ParameterizeScope.kt similarity index 96% rename from parameterize-core/src/commonMain/kotlin/ParameterizeScope.kt rename to parameterize-api/src/commonMain/kotlin/ParameterizeScope.kt index a1451ca..0a02817 100644 --- a/parameterize-core/src/commonMain/kotlin/ParameterizeScope.kt +++ b/parameterize-api/src/commonMain/kotlin/ParameterizeScope.kt @@ -14,10 +14,13 @@ * limitations under the License. */ +@file:Suppress("KDocUnresolvedReference") + package com.benwoodworth.parameterize import com.benwoodworth.parameterize.ParameterizeScope.DeclaredParameter import com.benwoodworth.parameterize.ParameterizeScope.Parameter +import com.benwoodworth.parameterize.internal.ParameterizeApiFriendModuleApi import kotlin.experimental.ExperimentalTypeInference import kotlin.jvm.JvmInline import kotlin.jvm.JvmName @@ -120,8 +123,13 @@ public interface ParameterizeScope { * * @see Parameter */ - public class DeclaredParameter internal constructor( - internal val argument: T + public class DeclaredParameter + /** @suppress */ + @ParameterizeApiFriendModuleApi + constructor( + /** @suppress */ + @ParameterizeApiFriendModuleApi + public val argument: T ) { /** * Returns a string representation of the current argument. diff --git a/parameterize-api/src/commonMain/kotlin/internal/InternalAnnotations.kt b/parameterize-api/src/commonMain/kotlin/internal/InternalAnnotations.kt new file mode 100644 index 0000000..b5daf77 --- /dev/null +++ b/parameterize-api/src/commonMain/kotlin/internal/InternalAnnotations.kt @@ -0,0 +1,21 @@ +/* + * Copyright 2024 Ben Woodworth + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.benwoodworth.parameterize.internal + +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +@Target(AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY) +internal annotation class ParameterizeApiFriendModuleApi diff --git a/parameterize-core/api/parameterize-core.api b/parameterize-core/api/parameterize-core.api index e176f17..3bcf96f 100644 --- a/parameterize-core/api/parameterize-core.api +++ b/parameterize-core/api/parameterize-core.api @@ -1,20 +1,6 @@ public abstract interface annotation class com/benwoodworth/parameterize/ExperimentalParameterizeApi : java/lang/annotation/Annotation { } -public final class com/benwoodworth/parameterize/LazyParameterScope { - public static final synthetic fun box-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Lcom/benwoodworth/parameterize/LazyParameterScope; - public static fun constructor-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Lcom/benwoodworth/parameterize/ParameterizeScope; - public fun equals (Ljava/lang/Object;)Z - public static fun equals-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;Ljava/lang/Object;)Z - public static final fun equals-impl0 (Lcom/benwoodworth/parameterize/ParameterizeScope;Lcom/benwoodworth/parameterize/ParameterizeScope;)Z - public fun hashCode ()I - public static fun hashCode-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)I - public static final fun provideDelegate-13mUnGw (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/sequences/Sequence;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter; - public fun toString ()Ljava/lang/String; - public static fun toString-impl (Lcom/benwoodworth/parameterize/ParameterizeScope;)Ljava/lang/String; - public final synthetic fun unbox-impl ()Lcom/benwoodworth/parameterize/ParameterizeScope; -} - public final class com/benwoodworth/parameterize/ParameterizeConfiguration { public static final field Companion Lcom/benwoodworth/parameterize/ParameterizeConfiguration$Companion; public final fun getDecorator ()Lkotlin/jvm/functions/Function3; @@ -103,37 +89,3 @@ public final class com/benwoodworth/parameterize/ParameterizeKt { public static synthetic fun parameterize$default (Lcom/benwoodworth/parameterize/ParameterizeConfiguration;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V } -public abstract interface class com/benwoodworth/parameterize/ParameterizeScope { - public abstract fun getValue (Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; - public abstract fun provideDelegate-13mUnGw (Lkotlin/sequences/Sequence;Ljava/lang/Object;Lkotlin/reflect/KProperty;)Lcom/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter; -} - -public final class com/benwoodworth/parameterize/ParameterizeScope$DeclaredParameter { - public fun toString ()Ljava/lang/String; -} - -public final class com/benwoodworth/parameterize/ParameterizeScope$Parameter { - public static final synthetic fun box-impl (Lkotlin/sequences/Sequence;)Lcom/benwoodworth/parameterize/ParameterizeScope$Parameter; - public static fun constructor-impl (Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence; - public fun equals (Ljava/lang/Object;)Z - public static fun equals-impl (Lkotlin/sequences/Sequence;Ljava/lang/Object;)Z - public static final fun equals-impl0 (Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;)Z - public final fun getArguments ()Lkotlin/sequences/Sequence; - public fun hashCode ()I - public static fun hashCode-impl (Lkotlin/sequences/Sequence;)I - public fun toString ()Ljava/lang/String; - public static fun toString-impl (Lkotlin/sequences/Sequence;)Ljava/lang/String; - public final synthetic fun unbox-impl ()Lkotlin/sequences/Sequence; -} - -public final class com/benwoodworth/parameterize/ParameterizeScope$ParameterDelegate { -} - -public final class com/benwoodworth/parameterize/ParameterizeScopeKt { - public static final fun parameter (Lcom/benwoodworth/parameterize/ParameterizeScope;Ljava/lang/Iterable;)Lkotlin/sequences/Sequence; - public static final fun parameter (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence; - public static final fun parameterLazyIterable (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; - public static final fun parameterLazySequence (Lcom/benwoodworth/parameterize/ParameterizeScope;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; - public static final fun parameterOf (Lcom/benwoodworth/parameterize/ParameterizeScope;[Ljava/lang/Object;)Lkotlin/sequences/Sequence; -} - diff --git a/parameterize-core/api/parameterize-core.klib.api b/parameterize-core/api/parameterize-core.klib.api index 7551728..7f7d950 100644 --- a/parameterize-core/api/parameterize-core.klib.api +++ b/parameterize-core/api/parameterize-core.klib.api @@ -14,28 +14,6 @@ open annotation class com.benwoodworth.parameterize/ParameterizeDsl : kotlin/Ann constructor () // com.benwoodworth.parameterize/ParameterizeDsl.|(){}[0] } -abstract interface com.benwoodworth.parameterize/ParameterizeScope { // com.benwoodworth.parameterize/ParameterizeScope|null[0] - abstract fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1>).getValue(kotlin/Any?, kotlin.reflect/KProperty<*>): #A1 // com.benwoodworth.parameterize/ParameterizeScope.getValue|getValue@com.benwoodworth.parameterize.ParameterizeScope.DeclaredParameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§}[0] - abstract fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A1>).provideDelegate(kotlin/Any?, kotlin.reflect/KProperty<*>): com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1> // com.benwoodworth.parameterize/ParameterizeScope.provideDelegate|provideDelegate@com.benwoodworth.parameterize.ParameterizeScope.Parameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§}[0] - - final class <#A1: kotlin/Any?> ParameterDelegate // com.benwoodworth.parameterize/ParameterizeScope.ParameterDelegate|null[0] - - final class <#A1: out kotlin/Any?> DeclaredParameter { // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter|null[0] - final fun toString(): kotlin/String // com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter.toString|toString(){}[0] - } - - final value class <#A1: out kotlin/Any?> Parameter { // com.benwoodworth.parameterize/ParameterizeScope.Parameter|null[0] - constructor (kotlin.sequences/Sequence<#A1>) // com.benwoodworth.parameterize/ParameterizeScope.Parameter.|(kotlin.sequences.Sequence<1:0>){}[0] - - final val arguments // com.benwoodworth.parameterize/ParameterizeScope.Parameter.arguments|{}arguments[0] - final fun (): kotlin.sequences/Sequence<#A1> // com.benwoodworth.parameterize/ParameterizeScope.Parameter.arguments.|(){}[0] - - final fun equals(kotlin/Any?): kotlin/Boolean // com.benwoodworth.parameterize/ParameterizeScope.Parameter.equals|equals(kotlin.Any?){}[0] - final fun hashCode(): kotlin/Int // com.benwoodworth.parameterize/ParameterizeScope.Parameter.hashCode|hashCode(){}[0] - final fun toString(): kotlin/String // com.benwoodworth.parameterize/ParameterizeScope.Parameter.toString|toString(){}[0] - } -} - final class com.benwoodworth.parameterize/ParameterizeConfiguration { // com.benwoodworth.parameterize/ParameterizeConfiguration|null[0] final val decorator // com.benwoodworth.parameterize/ParameterizeConfiguration.decorator|{}decorator[0] final fun (): kotlin.coroutines/SuspendFunction2, kotlin/Unit> // com.benwoodworth.parameterize/ParameterizeConfiguration.decorator.|(){}[0] @@ -141,19 +119,5 @@ final class com.benwoodworth.parameterize/ParameterizeIterator { // com.benwoodw final fun nextIteration(): com.benwoodworth.parameterize/ParameterizeScope? // com.benwoodworth.parameterize/ParameterizeIterator.nextIteration|nextIteration(){}[0] } -final value class com.benwoodworth.parameterize/LazyParameterScope { // com.benwoodworth.parameterize/LazyParameterScope|null[0] - constructor (com.benwoodworth.parameterize/ParameterizeScope) // com.benwoodworth.parameterize/LazyParameterScope.|(com.benwoodworth.parameterize.ParameterizeScope){}[0] - - final fun <#A1: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A1>).provideDelegate(kotlin/Any?, kotlin.reflect/KProperty<*>): com.benwoodworth.parameterize/ParameterizeScope.DeclaredParameter<#A1> // com.benwoodworth.parameterize/LazyParameterScope.provideDelegate|provideDelegate@com.benwoodworth.parameterize.ParameterizeScope.Parameter<0:0>(kotlin.Any?;kotlin.reflect.KProperty<*>){0§}[0] - final fun equals(kotlin/Any?): kotlin/Boolean // com.benwoodworth.parameterize/LazyParameterScope.equals|equals(kotlin.Any?){}[0] - final fun hashCode(): kotlin/Int // com.benwoodworth.parameterize/LazyParameterScope.hashCode|hashCode(){}[0] - final fun toString(): kotlin/String // com.benwoodworth.parameterize/LazyParameterScope.toString|toString(){}[0] -} - -final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(kotlin.collections/Iterable<#A>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.collections.Iterable<0:0>){0§}[0] -final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(kotlin.sequences/Sequence<#A>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.sequences.Sequence<0:0>){0§}[0] -final fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameterOf(kotlin/Array...): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameterOf|parameterOf@com.benwoodworth.parameterize.ParameterizeScope(kotlin.Array...){0§}[0] -final inline fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(crossinline kotlin/Function1>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.Function1>){0§}[0] -final inline fun <#A: kotlin/Any?> (com.benwoodworth.parameterize/ParameterizeScope).com.benwoodworth.parameterize/parameter(crossinline kotlin/Function1>): com.benwoodworth.parameterize/ParameterizeScope.Parameter<#A> // com.benwoodworth.parameterize/parameter|parameter@com.benwoodworth.parameterize.ParameterizeScope(kotlin.Function1>){0§}[0] final inline fun com.benwoodworth.parameterize/parameterize(com.benwoodworth.parameterize/ParameterizeConfiguration = ..., kotlin/Function1) // com.benwoodworth.parameterize/parameterize|parameterize(com.benwoodworth.parameterize.ParameterizeConfiguration;kotlin.Function1){}[0] final inline fun com.benwoodworth.parameterize/parameterize(com.benwoodworth.parameterize/ParameterizeConfiguration = ..., noinline kotlin.coroutines/SuspendFunction2, kotlin/Unit> = ..., noinline kotlin/Function2 = ..., noinline kotlin/Function1 = ..., kotlin/Function1) // com.benwoodworth.parameterize/parameterize|parameterize(com.benwoodworth.parameterize.ParameterizeConfiguration;kotlin.coroutines.SuspendFunction2,kotlin.Unit>;kotlin.Function2;kotlin.Function1;kotlin.Function1){}[0] diff --git a/parameterize-core/build.gradle.kts b/parameterize-core/build.gradle.kts index c5034e0..9d8078d 100644 --- a/parameterize-core/build.gradle.kts +++ b/parameterize-core/build.gradle.kts @@ -30,6 +30,17 @@ repositories { kotlin { sourceSets { + configureEach { + languageSettings { + optIn("com.benwoodworth.parameterize.internal.ParameterizeApiFriendModuleApi") + } + } + + val commonMain by getting { + dependencies { + api(project(":parameterize-api")) + } + } val jvmMain by getting { dependencies { implementation(libs.opentest4j) diff --git a/settings.gradle.kts b/settings.gradle.kts index 80f3a57..fd0fb10 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -16,4 +16,5 @@ rootProject.name = "parameterize" +include(":parameterize-api") include(":parameterize-core")