diff --git a/build.gradle.kts b/build.gradle.kts index 9a87431..35dbef6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2025, OpenSavvy and contributors. + * + * 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. + */ + import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockMismatchReport import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension @@ -30,6 +46,7 @@ dependencies { dokka(projects.state) dokka(projects.stateCoroutines) dokka(projects.weak) + dokka(projects.enumset) kover(projects.backbone) kover(projects.cache) @@ -38,6 +55,7 @@ dependencies { kover(projects.progressCoroutines) kover(projects.state) kover(projects.stateCoroutines) + kover(projects.enumset) } // region Check the users of the project didn't forget to rename the group diff --git a/enumset/README.md b/enumset/README.md new file mode 100644 index 0000000..826563e --- /dev/null +++ b/enumset/README.md @@ -0,0 +1,9 @@ +# Module EnumSet + +Efficient `BitSet` and `EnumSet` implementations for Kotlin Multiplatform. + + + + + +# Package opensavvy.enumset diff --git a/enumset/build.gradle.kts b/enumset/build.gradle.kts new file mode 100644 index 0000000..5307714 --- /dev/null +++ b/enumset/build.gradle.kts @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2025, OpenSavvy and contributors. + * + * 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 { + alias(opensavvyConventions.plugins.base) + alias(opensavvyConventions.plugins.kotlin.library) +} + +kotlin { + jvm() + js(IR) { + browser() + nodejs() + } + iosSimulatorArm64() + iosArm64() + iosX64() + linuxX64() + + sourceSets.commonTest.dependencies { + implementation(libs.bundles.prepared) + } +} + +library { + name.set("EnumSet") + description.set("Efficient bitfield-based collections") + homeUrl.set("https://opensavvy.gitlab.io/groundwork/pedestal/api-docs/enumset/index.html") + + license.set { + name.set("Apache 2.0") + url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") + } + + coverage.set(85) +} diff --git a/enumset/src/commonMain/kotlin/EnumSet.kt b/enumset/src/commonMain/kotlin/EnumSet.kt new file mode 100644 index 0000000..a2f0da7 --- /dev/null +++ b/enumset/src/commonMain/kotlin/EnumSet.kt @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025, OpenSavvy and contributors. + * + * 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 opensavvy.enumset diff --git a/enumset/src/commonMain/kotlin/ExperimentalEnumSetApi.kt b/enumset/src/commonMain/kotlin/ExperimentalEnumSetApi.kt new file mode 100644 index 0000000..a43fc7f --- /dev/null +++ b/enumset/src/commonMain/kotlin/ExperimentalEnumSetApi.kt @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025, OpenSavvy and contributors. + * + * 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 opensavvy.enumset + +@RequiresOptIn("This API is currently experimental. It may become incompatible or change without warnings in future versions.") +annotation class ExperimentalEnumSetApi diff --git a/settings.gradle.kts b/settings.gradle.kts index 733dfaf..b9b7a6f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2025, OpenSavvy and contributors. + * + * 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. + */ + /* * This file was generated by the Gradle 'init' task. * @@ -70,5 +86,7 @@ include( "weak", + "enumset", + "logger" )