diff --git a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt index 3dd646e..e93887a 100644 --- a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt +++ b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ +import io.matthewnelson.kmp.configuration.ExperimentalKmpConfigurationApi import io.matthewnelson.kmp.configuration.extension.KmpConfigurationExtension import io.matthewnelson.kmp.configuration.extension.container.target.KmpConfigurationContainerDsl import org.gradle.api.Action @@ -20,17 +21,19 @@ import org.gradle.api.JavaVersion import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl fun KmpConfigurationExtension.configureShared( + java9ModuleName: String? = null, publish: Boolean = false, explicitApi: Boolean = true, action: Action ) { configure { jvm { - target { withJava() } - kotlinJvmTarget = JavaVersion.VERSION_1_8 compileSourceCompatibility = JavaVersion.VERSION_1_8 compileTargetCompatibility = JavaVersion.VERSION_1_8 + + @OptIn(ExperimentalKmpConfigurationApi::class) + java9MultiReleaseModuleInfo(java9ModuleName) } js() diff --git a/library/endians/build.gradle.kts b/library/endians/build.gradle.kts index d3a1968..ec75b57 100644 --- a/library/endians/build.gradle.kts +++ b/library/endians/build.gradle.kts @@ -18,5 +18,5 @@ plugins { } kmpConfiguration { - configureShared(publish = true) {} + configureShared(java9ModuleName = "org.kotlincrypto.endians", publish = true) {} } diff --git a/library/endians/src/jvmMain/java9/module-info.java b/library/endians/src/jvmMain/java9/module-info.java new file mode 100644 index 0000000..5d596f9 --- /dev/null +++ b/library/endians/src/jvmMain/java9/module-info.java @@ -0,0 +1,5 @@ +module org.kotlincrypto.endians { + requires kotlin.stdlib; + + exports org.kotlincrypto.endians; +}