0.15.8-kotlin-2.1.0 #51

Merged
altavir merged 54 commits from dev into master 2024-12-09 09:49:38 +03:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit a62503ac41 - Show all commits

View File

@ -7,9 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Added ### Added
- Add development mode for fullstack.
### Changed ### Changed
- All publishing is enabled by default. Introduce `publishing.targets` variable to regulate what is added to the module. - All publishing targets are enabled by default. Introduce `publishing.targets` variable to regulate what is added to the module.
### Deprecated ### Deprecated

View File

@ -425,7 +425,7 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
@OptIn(ExperimentalWasmDsl::class) @OptIn(ExperimentalWasmDsl::class)
public fun wasm(block: KotlinWasmTargetDsl.() -> Unit = {}) { public fun wasm(block: KotlinWasmTargetDsl.() -> Unit = {}) {
if(project.requestPropertyOrNull("kscience.wasm.disabled") == "true"){ if (project.requestPropertyOrNull("kscience.wasm.disabled") == "true") {
project.logger.warn("Wasm target is disabled with 'kscience.wasm.disabled' property") project.logger.warn("Wasm target is disabled with 'kscience.wasm.disabled' property")
return return
} }
@ -465,6 +465,7 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
*/ */
public fun fullStack( public fun fullStack(
bundleName: String = "js/bundle.js", bundleName: String = "js/bundle.js",
development: Boolean = false,
jvmConfig: KotlinJvmTarget.() -> Unit = {}, jvmConfig: KotlinJvmTarget.() -> Unit = {},
jsConfig: KotlinJsTargetDsl.() -> Unit = {}, jsConfig: KotlinJsTargetDsl.() -> Unit = {},
browserConfig: KotlinJsBrowserDsl.() -> Unit = {}, browserConfig: KotlinJsBrowserDsl.() -> Unit = {},
@ -483,7 +484,10 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro
val processResourcesTaskName = val processResourcesTaskName =
compilations[KotlinCompilation.MAIN_COMPILATION_NAME].processResourcesTaskName compilations[KotlinCompilation.MAIN_COMPILATION_NAME].processResourcesTaskName
val jsBrowserDistribution = project.tasks.getByName("jsBrowserDistribution")
val jsBrowserDistribution = project.tasks.getByName(
if (development) "jsBrowserDevelopmentExecutableDistribution" else "jsBrowserDistribution"
)
project.tasks.getByName<ProcessResources>(processResourcesTaskName) { project.tasks.getByName<ProcessResources>(processResourcesTaskName) {
duplicatesStrategy = DuplicatesStrategy.WARN duplicatesStrategy = DuplicatesStrategy.WARN