diff --git a/cache/admins/common/build.gradle b/cache/admins/common/build.gradle index 05af6c2..ab046fd 100644 --- a/cache/admins/common/build.gradle +++ b/cache/admins/common/build.gradle @@ -1,10 +1,9 @@ plugins { id "org.jetbrains.kotlin.multiplatform" id "org.jetbrains.kotlin.plugin.serialization" - id "com.android.library" } -apply from: "$mppProjectWithSerializationPresetPath" +apply from: "$mppJavaWithJsProjectPath" kotlin { sourceSets { diff --git a/cache/admins/micro_utils/build.gradle b/cache/admins/micro_utils/build.gradle index d5e74fc..0c1a0a5 100644 --- a/cache/admins/micro_utils/build.gradle +++ b/cache/admins/micro_utils/build.gradle @@ -1,10 +1,9 @@ plugins { id "org.jetbrains.kotlin.multiplatform" id "org.jetbrains.kotlin.plugin.serialization" - id "com.android.library" } -apply from: "$mppProjectWithSerializationPresetPath" +apply from: "$mppJavaWithJsProjectPath" kotlin { sourceSets { diff --git a/cache/admins/plagubot/build.gradle b/cache/admins/plagubot/build.gradle index a00b9ab..80378d7 100644 --- a/cache/admins/plagubot/build.gradle +++ b/cache/admins/plagubot/build.gradle @@ -1,10 +1,9 @@ plugins { id "org.jetbrains.kotlin.multiplatform" id "org.jetbrains.kotlin.plugin.serialization" - id "com.android.library" } -apply from: "$mppProjectWithSerializationPresetPath" +apply from: "$mppJavaWithJsProjectPath" kotlin { sourceSets { diff --git a/cache/content/common/build.gradle b/cache/content/common/build.gradle index 1c05fde..9a85f4f 100644 --- a/cache/content/common/build.gradle +++ b/cache/content/common/build.gradle @@ -1,10 +1,9 @@ plugins { id "org.jetbrains.kotlin.multiplatform" id "org.jetbrains.kotlin.plugin.serialization" - id "com.android.library" } -apply from: "$mppProjectWithSerializationPresetPath" +apply from: "$mppJavaWithJsProjectPath" kotlin { sourceSets { diff --git a/cache/content/micro_utils/build.gradle b/cache/content/micro_utils/build.gradle index 0dcdc86..36e632d 100644 --- a/cache/content/micro_utils/build.gradle +++ b/cache/content/micro_utils/build.gradle @@ -1,10 +1,9 @@ plugins { id "org.jetbrains.kotlin.multiplatform" id "org.jetbrains.kotlin.plugin.serialization" - id "com.android.library" } -apply from: "$mppProjectWithSerializationPresetPath" +apply from: "$mppJavaWithJsProjectPath" kotlin { sourceSets { diff --git a/extensions.gradle b/extensions.gradle index f686575..a01b906 100644 --- a/extensions.gradle +++ b/extensions.gradle @@ -13,9 +13,10 @@ allprojects { projectByName(name) } - mppProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerialization.gradle" + mppJavaWithJsProjectPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerialization.gradle" mppJavaProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJavaProject.gradle" mppAndroidProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppAndroidProject.gradle" + mppJavaWithJsProjectPath = "${rootProject.projectDir.absolutePath}/mppJavaWithJsProject.gradle" defaultAndroidSettingsPresetPath = "${rootProject.projectDir.absolutePath}/defaultAndroidSettings.gradle" diff --git a/gradle.properties b/gradle.properties index dd9057a..777dab7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ +org.gradle.jvmargs=-Xmx512m kotlin.code.style=official org.gradle.parallel=true kotlin.js.generate.externals=true @@ -6,6 +7,7 @@ kotlin.incremental.js=true android.useAndroidX=true android.enableJetifier=true + kotlin_version=1.7.20 kotlin_serialisation_core_version=1.4.1 diff --git a/mppJavaWithJsProject.gradle b/mppJavaWithJsProject.gradle new file mode 100644 index 0000000..92790b8 --- /dev/null +++ b/mppJavaWithJsProject.gradle @@ -0,0 +1,49 @@ +project.version = "$version" +project.group = "$group" + +apply from: "$publishGradlePath" + +kotlin { + jvm { + compilations.main { + kotlinOptions { + jvmTarget = "1.8" + } + } + } + js (IR) { + browser() + nodejs() + } + + sourceSets { + commonMain { + dependencies { + implementation kotlin('stdlib') + api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_core_version" + } + } + commonTest { + dependencies { + implementation kotlin('test-common') + implementation kotlin('test-annotations-common') + } + } + jvmTest { + dependencies { + implementation kotlin('test-junit') + } + } + jsTest { + dependencies { + implementation kotlin('test-js') + implementation kotlin('test-junit') + } + } + } +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +}