mirror of
				https://github.com/InsanusMokrassar/KotlinMultiplatformProjectTemplate.git
				synced 2025-10-30 19:50:22 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			renovate/d
			...
			ffb54f3397
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | ffb54f3397 | ||
|  | b706e53bb1 | 
| @@ -4,5 +4,5 @@ plugins { | |||||||
|     id "com.android.library" |     id "com.android.library" | ||||||
| } | } | ||||||
|  |  | ||||||
| apply from: "$mppAndroidProject" | apply from: "$mppAndroidProjectPresetPath" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3,5 +3,5 @@ plugins { | |||||||
|     id "org.jetbrains.kotlin.plugin.serialization" |     id "org.jetbrains.kotlin.plugin.serialization" | ||||||
| } | } | ||||||
|  |  | ||||||
| apply from: "$mppJavaProject" | apply from: "$mppJavaProjectPresetPath" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3,5 +3,5 @@ plugins { | |||||||
|     id "org.jetbrains.kotlin.plugin.serialization" |     id "org.jetbrains.kotlin.plugin.serialization" | ||||||
| } | } | ||||||
|  |  | ||||||
| apply from: "$mppJsProject" | apply from: "$mppJsProjectPresetPath" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -4,5 +4,5 @@ plugins { | |||||||
|     id "com.android.library" |     id "com.android.library" | ||||||
| } | } | ||||||
|  |  | ||||||
| apply from: "$mppProjectWithSerialization" | apply from: "$mppProjectWithSerializationPresetPath" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -4,13 +4,14 @@ android { | |||||||
|     compileSdkVersion libs.versions.android.compileSdk.get().toInteger() |     compileSdkVersion libs.versions.android.compileSdk.get().toInteger() | ||||||
|     buildToolsVersion libs.versions.android.buildTools.get() |     buildToolsVersion libs.versions.android.buildTools.get() | ||||||
| 
 | 
 | ||||||
|  |     namespace "${group}.${project.name}" | ||||||
|  | 
 | ||||||
|     defaultConfig { |     defaultConfig { | ||||||
|         minSdkVersion libs.versions.android.minSdk.get().toInteger() |         minSdkVersion libs.versions.android.minSdk.get().toInteger() | ||||||
|         compileSdkVersion libs.versions.android.compileSdk.get().toInteger() |         compileSdkVersion libs.versions.android.compileSdk.get().toInteger() | ||||||
|         targetSdkVersion libs.versions.android.compileSdk.get().toInteger() |         targetSdkVersion libs.versions.android.compileSdk.get().toInteger() | ||||||
|         versionCode "${android_code_version}".toInteger() |         versionCode "${android_code_version}".toInteger() | ||||||
|         versionName "$version" |         versionName "$version" | ||||||
|         namespace "${project.group}.${project.name}" |  | ||||||
|     } |     } | ||||||
|     buildTypes { |     buildTypes { | ||||||
|         release { |         release { | ||||||
| @@ -31,4 +32,9 @@ android { | |||||||
|         sourceCompatibility JavaVersion.VERSION_17 |         sourceCompatibility JavaVersion.VERSION_17 | ||||||
|         targetCompatibility JavaVersion.VERSION_17 |         targetCompatibility JavaVersion.VERSION_17 | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     sourceSets { | ||||||
|  |         String sep = File.separator | ||||||
|  |         main.java.srcDirs += "src${sep}main${sep}kotlin" | ||||||
|  |     } | ||||||
| } | } | ||||||
| @@ -1,14 +1,6 @@ | |||||||
| File templatesFolder = new File("$rootProject.projectDir.absolutePath${File.separatorChar}gradle${File.separatorChar}templates") | allprojects { | ||||||
|  |     ext { | ||||||
| Map properties = new HashMap<String, String>() |         projectByName = { String name -> | ||||||
|  |  | ||||||
| if (templatesFolder.exists() && templatesFolder.isDirectory()) { |  | ||||||
|     templatesFolder.listFiles().each { |  | ||||||
|         properties[it.name - ".gradle"] = it.absolutePath |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| properties["projectByName"] = { name -> |  | ||||||
|             for (subproject in rootProject.subprojects) { |             for (subproject in rootProject.subprojects) { | ||||||
|                 if (subproject.name == name) { |                 if (subproject.name == name) { | ||||||
|                     return subproject |                     return subproject | ||||||
| @@ -17,16 +9,17 @@ properties["projectByName"] = { name -> | |||||||
|             return null |             return null | ||||||
|         } |         } | ||||||
|  |  | ||||||
| properties["internalProject"] = { name -> |         internalProject = { String name -> | ||||||
|     projectByName("$name") |             projectByName(name) | ||||||
|         } |         } | ||||||
|  |  | ||||||
| allprojects { |         mppProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerialization.gradle" | ||||||
|     ext { |         mppJavaProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJavaProject.gradle" | ||||||
|         releaseMode = (project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true" |         mppJsProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJsProject.gradle" | ||||||
|  |         mppAndroidProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppAndroidProject.gradle" | ||||||
|  |  | ||||||
|         properties.forEach { k, v -> |         defaultAndroidSettingsPresetPath = "${rootProject.projectDir.absolutePath}/defaultAndroidSettings.gradle" | ||||||
|             it[k] = v |  | ||||||
|         } |         // publishGradlePath = "${rootProject.projectDir.absolutePath}/publish.gradle" | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,17 +1,16 @@ | |||||||
| [versions] | [versions] | ||||||
|  |  | ||||||
| kotlin = "2.1.20" | kotlin = "2.0.20" | ||||||
| kotlin-serialization = "1.8.1" | kotlin-serialization = "1.7.2" | ||||||
| kotlin-coroutines = "1.10.2" |  | ||||||
|  |  | ||||||
| dokka = "2.1.0" | dokka = "1.9.20" | ||||||
|  |  | ||||||
| dexcount = "4.0.0" | dexcount = "4.0.0" | ||||||
| junit_version = "4.12" | junit_version = "4.12" | ||||||
| test_ext_junit_version = "1.2.1" | test_ext_junit_version = "1.2.1" | ||||||
| espresso_core = "3.6.1" | espresso_core = "3.6.1" | ||||||
|  |  | ||||||
| android-gradle-plugin = "8.7.2" | android-gradle-plugin = "8.6.0" | ||||||
| android-minSdk = "21" | android-minSdk = "21" | ||||||
| android-compileSdk = "35" | android-compileSdk = "35" | ||||||
| android-buildTools = "35.0.0" | android-buildTools = "35.0.0" | ||||||
| @@ -20,14 +19,12 @@ android-buildTools = "35.0.0" | |||||||
|  |  | ||||||
| kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } | kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } | ||||||
| kotlin-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlin-serialization" } | kotlin-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlin-serialization" } | ||||||
| kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" } |  | ||||||
| kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlin-coroutines" } |  | ||||||
| kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" } | kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" } | ||||||
| kotlin-test-annotations-common = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlin" } | kotlin-test-annotations-common = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlin" } | ||||||
| kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } | kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } | ||||||
| kotlin-test-js = { module = "org.jetbrains.kotlin:kotlin-test-js", version.ref = "kotlin" } | kotlin-test-js = { module = "org.jetbrains.kotlin:kotlin-test-js", version.ref = "kotlin" } | ||||||
| android-test-junit = { module = "androidx.test.ext:junit", version.ref = "test_ext_junit_version" } | android-test-junit = { module = "androidx.test.ext:junit", version.ref = "test_ext_junit_version" } | ||||||
| android-test-espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso_core" } | android-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso_core" } | ||||||
|  |  | ||||||
| # buildscript classpaths | # buildscript classpaths | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,24 +0,0 @@ | |||||||
| project.version = "$version" |  | ||||||
| project.group = "$group" |  | ||||||
|  |  | ||||||
| kotlin { |  | ||||||
|     sourceSets { |  | ||||||
|         commonMain { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('stdlib') |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         commonTest { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('test-common') |  | ||||||
|                 implementation kotlin('test-annotations-common') |  | ||||||
|                 implementation libs.kotlin.coroutines.test |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| java { |  | ||||||
|     sourceCompatibility = JavaVersion.VERSION_17 |  | ||||||
|     targetCompatibility = JavaVersion.VERSION_17 |  | ||||||
| } |  | ||||||
| @@ -1,25 +0,0 @@ | |||||||
| project.version = "$version" |  | ||||||
| project.group = "$group" |  | ||||||
|  |  | ||||||
| kotlin { |  | ||||||
|     sourceSets { |  | ||||||
|         commonMain { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('stdlib') |  | ||||||
|                 api libs.kotlin.serialization |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         commonTest { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('test-common') |  | ||||||
|                 implementation kotlin('test-annotations-common') |  | ||||||
|                 implementation libs.kotlin.coroutines.test |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| java { |  | ||||||
|     sourceCompatibility = JavaVersion.VERSION_17 |  | ||||||
|     targetCompatibility = JavaVersion.VERSION_17 |  | ||||||
| } |  | ||||||
| @@ -1,31 +0,0 @@ | |||||||
| kotlin { |  | ||||||
|     androidTarget { |  | ||||||
|         publishAllLibraryVariants() |  | ||||||
|         compilations.all { |  | ||||||
|             kotlinOptions { |  | ||||||
|                 jvmTarget = "17" |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     sourceSets { |  | ||||||
|         androidUnitTest { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('test-junit') |  | ||||||
|                 implementation libs.android.test.junit |  | ||||||
|                 implementation libs.android.test.espresso |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         androidInstrumentedTest { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('test-junit') |  | ||||||
|                 implementation libs.android.test.junit |  | ||||||
|                 implementation libs.android.test.espresso |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         androidMain.dependsOn jvmMain |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| apply from: "$defaultAndroidSettings" |  | ||||||
| @@ -1,30 +0,0 @@ | |||||||
| kotlin { |  | ||||||
|     js (IR) { |  | ||||||
|         browser { |  | ||||||
|             testTask { |  | ||||||
|                 useMocha { |  | ||||||
|                     timeout = "240000" |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         nodejs { |  | ||||||
|             testTask { |  | ||||||
|                 useMocha { |  | ||||||
|                     timeout = "240000" |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     sourceSets { |  | ||||||
|         jsMain { |  | ||||||
|             dependencies { |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         jsTest { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('test-js') |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -1,21 +0,0 @@ | |||||||
| kotlin { |  | ||||||
|     jvm { |  | ||||||
|         compilations.main { |  | ||||||
|             kotlinOptions { |  | ||||||
|                 jvmTarget = "17" |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     sourceSets { |  | ||||||
|         jvmMain { |  | ||||||
|             dependencies { |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         jvmTest { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('test-junit') |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -1,8 +0,0 @@ | |||||||
| kotlin { |  | ||||||
|     linuxArm64() |  | ||||||
|  |  | ||||||
|     sourceSets { |  | ||||||
|         nativeMain.dependsOn commonMain |  | ||||||
|         linuxArm64Main.dependsOn nativeMain |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| kotlin { |  | ||||||
|     linuxX64() |  | ||||||
|     mingwX64() |  | ||||||
|  |  | ||||||
|     sourceSets { |  | ||||||
|         nativeMain.dependsOn commonMain |  | ||||||
|         linuxX64Main.dependsOn nativeMain |  | ||||||
|         mingwX64Main.dependsOn nativeMain |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -1,27 +0,0 @@ | |||||||
| kotlin { |  | ||||||
|     wasmJs { |  | ||||||
|         browser { |  | ||||||
|             testTask { |  | ||||||
|                 useKarma { |  | ||||||
|                     useChromeHeadless() |  | ||||||
|                     useConfigDirectory(rootProject.relativeProjectPath("gradle/karma.config.d")) |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         nodejs { |  | ||||||
|             testTask { |  | ||||||
|                 timeout = Duration.ofSeconds(240) |  | ||||||
|                 nodeJsArgs.add("--unhandled-rejections=warn") |  | ||||||
|                 nodeJsArgs.add("--trace-warnings") |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     sourceSets { |  | ||||||
|         wasmJsTest { |  | ||||||
|             dependencies { |  | ||||||
|                 implementation kotlin('test-wasm-js') |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -1,5 +0,0 @@ | |||||||
| apply from: "$defaultProject" |  | ||||||
| apply from: "$enableMPPJvm" |  | ||||||
| apply from: "$enableMPPJs" |  | ||||||
| apply from: "$enableMPPWasmJs" |  | ||||||
| apply from: "$enableMPPAndroid" |  | ||||||
| @@ -1,2 +0,0 @@ | |||||||
| apply from: "$defaultProject" |  | ||||||
| apply from: "$enableMPPJvm" |  | ||||||
| @@ -1,2 +0,0 @@ | |||||||
| apply from: "$defaultProject" |  | ||||||
| apply from: "$enableMPPJs" |  | ||||||
| @@ -1,5 +0,0 @@ | |||||||
| apply from: "$defaultProjectWithSerialization" |  | ||||||
| apply from: "$enableMPPJvm" |  | ||||||
| apply from: "$enableMPPJs" |  | ||||||
| apply from: "$enableMPPWasmJs" |  | ||||||
| apply from: "$enableMPPAndroid" |  | ||||||
							
								
								
									
										2
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
								
							| @@ -1,5 +1,5 @@ | |||||||
| distributionBase=GRADLE_USER_HOME | distributionBase=GRADLE_USER_HOME | ||||||
| distributionPath=wrapper/dists | distributionPath=wrapper/dists | ||||||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||||||
| zipStoreBase=GRADLE_USER_HOME | zipStoreBase=GRADLE_USER_HOME | ||||||
| zipStorePath=wrapper/dists | zipStorePath=wrapper/dists | ||||||
|   | |||||||
| @@ -4,5 +4,5 @@ plugins { | |||||||
|     id "com.android.library" |     id "com.android.library" | ||||||
| } | } | ||||||
|  |  | ||||||
| apply from: "$mppProjectWithSerialization" | apply from: "$mppProjectWithSerializationPresetPath" | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										39
									
								
								mppAndroidProject.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								mppAndroidProject.gradle
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | project.version = "$version" | ||||||
|  | project.group = "$group" | ||||||
|  |  | ||||||
|  | // apply from: "$publishGradlePath" | ||||||
|  |  | ||||||
|  | kotlin { | ||||||
|  |     androidTarget { | ||||||
|  |         publishAllLibraryVariants() | ||||||
|  |         compilations.all { | ||||||
|  |             kotlinOptions { | ||||||
|  |                 jvmTarget = "17" | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     sourceSets { | ||||||
|  |         commonMain { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin | ||||||
|  |                 api libs.kotlin.serialization | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         commonTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.common | ||||||
|  |                 implementation libs.kotlin.test.annotations.common | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         androidUnitTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.junit | ||||||
|  |                 implementation libs.android.test.junit | ||||||
|  |                 implementation libs.android.test.espresso.core | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | apply from: "$defaultAndroidSettingsPresetPath" | ||||||
							
								
								
									
										39
									
								
								mppJavaProject.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								mppJavaProject.gradle
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | project.version = "$version" | ||||||
|  | project.group = "$group" | ||||||
|  |  | ||||||
|  | // apply from: "$publishGradlePath" | ||||||
|  |  | ||||||
|  | kotlin { | ||||||
|  |     jvm { | ||||||
|  |         compilations.main { | ||||||
|  |             kotlinOptions { | ||||||
|  |                 jvmTarget = "17" | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     sourceSets { | ||||||
|  |         commonMain { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin | ||||||
|  |                 api libs.kotlin.serialization | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         commonTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.common | ||||||
|  |                 implementation libs.kotlin.test.annotations.common | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         jvmTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.junit | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | java { | ||||||
|  |     sourceCompatibility = JavaVersion.VERSION_17 | ||||||
|  |     targetCompatibility = JavaVersion.VERSION_17 | ||||||
|  | } | ||||||
							
								
								
									
										31
									
								
								mppJsProject.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								mppJsProject.gradle
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | |||||||
|  | project.version = "$version" | ||||||
|  | project.group = "$group" | ||||||
|  |  | ||||||
|  | // apply from: "$publishGradlePath" | ||||||
|  |  | ||||||
|  | kotlin { | ||||||
|  |     js (IR) { | ||||||
|  |         browser() | ||||||
|  |         nodejs() | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     sourceSets { | ||||||
|  |         commonMain { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin | ||||||
|  |                 api libs.kotlin.serialization | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         commonTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.common | ||||||
|  |                 implementation libs.kotlin.test.annotations.common | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         jsTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.js | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										65
									
								
								mppProjectWithSerialization.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								mppProjectWithSerialization.gradle
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | |||||||
|  | project.version = "$version" | ||||||
|  | project.group = "$group" | ||||||
|  |  | ||||||
|  | // apply from: "$publishGradlePath" | ||||||
|  |  | ||||||
|  | kotlin { | ||||||
|  |     jvm { | ||||||
|  |         compilations.main { | ||||||
|  |             kotlinOptions { | ||||||
|  |                 jvmTarget = "17" | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     js (IR) { | ||||||
|  |         browser() | ||||||
|  |         nodejs() | ||||||
|  |     } | ||||||
|  |     androidTarget { | ||||||
|  |         publishAllLibraryVariants() | ||||||
|  |         compilations.all { | ||||||
|  |             kotlinOptions { | ||||||
|  |                 jvmTarget = "17" | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     sourceSets { | ||||||
|  |         commonMain { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin | ||||||
|  |                 api libs.kotlin.serialization | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         commonTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.common | ||||||
|  |                 implementation libs.kotlin.test.annotations.common | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         jvmTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.junit | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         jsTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.js | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         androidUnitTest { | ||||||
|  |             dependencies { | ||||||
|  |                 implementation libs.kotlin.test.junit | ||||||
|  |                 implementation libs.android.test.junit | ||||||
|  |                 implementation libs.android.test.espresso.core | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | java { | ||||||
|  |     sourceCompatibility = JavaVersion.VERSION_17 | ||||||
|  |     targetCompatibility = JavaVersion.VERSION_17 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | apply from: "$defaultAndroidSettingsPresetPath" | ||||||
		Reference in New Issue
	
	Block a user