From 8d43b449a8dddeac52027d78b390f4a6178f5e6e Mon Sep 17 00:00:00 2001 From: Valentin Dovidaytis Date: Wed, 25 Dec 2024 13:29:57 +0100 Subject: [PATCH 1/4] Switch 'platf' modules to JVM plugin --- build.gradle.kts | 108 ++++++++++++------ platf-awt/build.gradle.kts | 42 ++----- .../awt/canvas/AwtAnimationTimerPeer.kt | 0 .../letsPlot/awt/canvas/AwtCanvas.kt | 0 .../letsPlot/awt/canvas/AwtCanvasControl.kt | 0 .../letsPlot/awt/canvas/AwtContext2d.kt | 0 .../awt/canvas/AwtMouseEventMapper.kt | 0 .../letsPlot/awt/canvas/CanvasComponent.kt | 0 .../awt/canvas/CanvasContainerPanel.kt | 0 .../letsPlot/awt/plot/AwtLiveMapPanel.kt | 0 .../letsPlot/awt/plot/DisposableJPanel.kt | 0 .../letsPlot/awt/plot/FigureModel.kt | 0 .../letsPlot/awt/plot/FigureToAwt.kt | 0 .../letsPlot/awt/plot/MonolithicAwt.kt | 0 .../letsPlot/awt/plot/PlotSvgExport.kt | 0 .../awt/plot/component/ApplicationContext.kt | 0 .../component/DefaultErrorMessageComponent.kt | 0 .../plot/component/DefaultPlotContentPane.kt | 0 .../plot/component/PlotComponentProvider.kt | 0 .../letsPlot/awt/plot/component/PlotPanel.kt | 0 .../plot/component/PlotPanelFigureModel.kt | 0 .../component/PlotSpecComponentProvider.kt | 0 .../plot/component/PlotViewerWindowBase.kt | 0 .../letsPlot/awt/plot/component/ResizeHook.kt | 0 .../letsPlot/awt/util/AwtContainerDisposer.kt | 0 .../letsPlot/awt/util/AwtEventUtil.kt | 0 .../letsPlot/awt/util/RGBEncoderAwt.kt | 0 .../letsPlot/awt/util/RgbToDataUrl.kt | 0 platf-batik/build.gradle.kts | 59 +++------- .../batik/mapping/svg/BatikTargetPeer.kt | 0 .../batik/mapping/svg/SvgBatikPeer.kt | 0 .../batik/mapping/svg/SvgElementMapper.kt | 0 .../batik/mapping/svg/SvgNodeMapper.kt | 0 .../batik/mapping/svg/SvgNodeMapperFactory.kt | 0 .../mapping/svg/SvgRootDocumentMapper.kt | 0 .../batik/mapping/svg/SvgTextNodeMapper.kt | 0 .../letsPlot/batik/mapping/svg/Utils.kt | 0 .../DefaultPlotComponentProviderBatik.kt | 0 .../plot/component/DefaultPlotPanelBatik.kt | 0 .../component/DefaultSwingContextBatik.kt | 0 .../plot/component/PlotViewerWindowBatik.kt | 0 .../plot/util/BatikGraphicsNodeRenderer.kt | 0 .../batik/plot/util/BatikMapperComponent.kt | 0 .../plot/util/BatikMapperComponentHelper.kt | 0 .../BatikMapperComponentRepaintManager.kt | 0 .../batik/plot/util/BatikMessageCallback.kt | 0 .../plot/util/GraphicsNodeInitializer.kt | 0 .../batik/plot/util/ServiceLoaderHelper.kt | 0 .../batik/mapping/svg/SvgAwtPeerTest.kt | 0 .../batik/plot/util/BatikPlotComponentTest.kt | 0 platf-jfx-swing/build.gradle.kts | 77 ------------- 51 files changed, 102 insertions(+), 184 deletions(-) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtAnimationTimerPeer.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvas.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvasControl.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtContext2d.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtMouseEventMapper.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasComponent.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasContainerPanel.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/AwtLiveMapPanel.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/DisposableJPanel.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/FigureModel.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/FigureToAwt.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/MonolithicAwt.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExport.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/ApplicationContext.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultErrorMessageComponent.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultPlotContentPane.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotComponentProvider.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanel.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanelFigureModel.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotSpecComponentProvider.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotViewerWindowBase.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/plot/component/ResizeHook.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/util/AwtContainerDisposer.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/util/AwtEventUtil.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/util/RGBEncoderAwt.kt (100%) rename platf-awt/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/awt/util/RgbToDataUrl.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/BatikTargetPeer.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgBatikPeer.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgElementMapper.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapper.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapperFactory.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgRootDocumentMapper.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgTextNodeMapper.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/Utils.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotComponentProviderBatik.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotPanelBatik.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultSwingContextBatik.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/component/PlotViewerWindowBatik.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikGraphicsNodeRenderer.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponent.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentHelper.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentRepaintManager.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMessageCallback.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/util/GraphicsNodeInitializer.kt (100%) rename platf-batik/src/{jvmMain => main}/kotlin/org/jetbrains/letsPlot/batik/plot/util/ServiceLoaderHelper.kt (100%) rename platf-batik/src/{jvmTest => test}/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgAwtPeerTest.kt (100%) rename platf-batik/src/{jvmTest => test}/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikPlotComponentTest.kt (100%) diff --git a/build.gradle.kts b/build.gradle.kts index 863073f6aed..f7870b69c15 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -161,14 +161,10 @@ nexusPublishing { // Publish some sub-projects as Kotlin Multi-project libraries. val publishLetsPlotCoreModulesToMavenLocalRepository by tasks.registering { group=letsPlotTaskGroup - // Add platf-jfx-swing JVM publish task: - dependsOn("platf-jfx-swing:publishPlatfJfxSwingJvmPublicationToMavenLocalRepository") } val publishLetsPlotCoreModulesToMavenRepository by tasks.registering { group=letsPlotTaskGroup - // Add platf-jfx-swing JVM publish task: - dependsOn("platf-jfx-swing:publishPlatfJfxSwingJvmPublicationToMavenRepository") } // Generating JavaDoc task for each publication task. @@ -186,7 +182,7 @@ fun getJarJavaDocsTask(distributeName:String): TaskProvider { } } - +// Configure native targets for python-extension dependencies. subprojects { val pythonExtensionModules = listOf( "commons", @@ -226,39 +222,85 @@ subprojects { } } } +} - val coreModulesForPublish = listOf( - "commons", - "datamodel", - "canvas", - "gis", - "livemap", - "plot-base", - "plot-builder", - "plot-stem", - "plot-livemap", - "platf-awt", - "platf-batik", - "deprecated-in-v4" - ) +// Configure Lets-Plot Core multiplatform modules. +val multiPlatformCoreModulesForPublish = listOf( + "commons", + "datamodel", + "canvas", + "gis", + "livemap", + "plot-base", + "plot-builder", + "plot-stem", + "plot-livemap", + "deprecated-in-v4" +) - if (name in coreModulesForPublish) { +subprojects { + if (name in multiPlatformCoreModulesForPublish) { apply(plugin = "org.jetbrains.kotlin.multiplatform") - apply(plugin = "maven-publish") - apply(plugin = "signing") - // For `jvmSourcesJar` task: configure { jvm() } + } +} + +// Configure Lets-Plot Core JVM modules. +val jvmCoreModulesForPublish = listOf( + "platf-awt", + "platf-batik", + "platf-jfx-swing" +) +subprojects { + if(name in jvmCoreModulesForPublish) { + apply(plugin = "org.jetbrains.kotlin.jvm") + apply(plugin = "maven-publish") + + fun getJarSourcesTask(distributeName:String): TaskProvider { + return tasks.register("${distributeName}Sources") { + archiveClassifier.set("sources") + from(project.extensions.getByType().sourceSets.getByName("main").kotlin.srcDirs) + } + } + + configure { + publications { + register("$name-jvm", MavenPublication::class) { + groupId = project.group as String + artifactId = name + version = project.version as String + + artifact(tasks["jar"]) + artifact(getJarSourcesTask(name)) + } + } + } + } +} + +// Configure Maven publication for Lets-Plot Core modules. +subprojects { + if(name in multiPlatformCoreModulesForPublish + jvmCoreModulesForPublish) { + apply(plugin = "maven-publish") + apply(plugin = "signing") // Do not publish 'native' targets: - val publicationsToPublish = listOf("jvm", "js", "kotlinMultiplatform", "metadata") + val targetsToPublish = listOf( + "platf-awt-jvm", + "platf-batik-jvm", + "platf-jfx-swing-jvm", + "jvm", + "js", + "kotlinMultiplatform", + "metadata") configure { publications { withType(MavenPublication::class) { - if (name in publicationsToPublish) { + if (name in targetsToPublish) { // Configure this publication. artifact(getJarJavaDocsTask("${name}-${project.name}")) @@ -293,22 +335,24 @@ subprojects { } } } - afterEvaluate { // Add LICENSE file to the META-INF folder inside published JAR files. - tasks.named("jvmJar") { - metaInf { - from("$rootDir") { - include("LICENSE") + tasks.filterIsInstance() + .forEach { + if (it.name == "jvmJar" || it.name == "jar") { // "jar" for 'org.jetbrains.kotlin.jvm' plugin + it.metaInf { + from("$rootDir") { + include("LICENSE") + } + } } } - } // Configure artifacts signing process for release versions. val publicationsToSign = mutableListOf() for (task in tasks.withType(PublishToMavenRepository::class)) { - if (task.publication.name in publicationsToPublish) { + if (task.publication.name in targetsToPublish) { val repoName = task.repository.name if (repoName == "MavenLocal") { diff --git a/platf-awt/build.gradle.kts b/platf-awt/build.gradle.kts index 3583504926e..8c04c4a9083 100644 --- a/platf-awt/build.gradle.kts +++ b/platf-awt/build.gradle.kts @@ -3,36 +3,14 @@ * Use of this source code is governed by the MIT license that can be found in the LICENSE file. */ -plugins { - kotlin("multiplatform") -} - -kotlin { - jvm() - - sourceSets { - commonMain { - dependencies { - compileOnly(project(":commons")) - compileOnly(project(":datamodel")) - compileOnly(project(":plot-livemap")) - compileOnly(project(":canvas")) - compileOnly(project(":plot-base")) - compileOnly(project(":plot-builder")) - compileOnly(project(":plot-stem")) - } - } - - commonTest { - dependencies { - implementation(project(":demo-and-test-shared")) - } - } - - jvmTest { - dependencies { - implementation(kotlin("test-junit")) - } - } - } +dependencies { + compileOnly(project(":commons")) + compileOnly(project(":datamodel")) + compileOnly(project(":plot-livemap")) + compileOnly(project(":canvas")) + compileOnly(project(":plot-base")) + compileOnly(project(":plot-builder")) + compileOnly(project(":plot-stem")) + testImplementation(project(":demo-and-test-shared")) + testImplementation(kotlin("test-junit")) } \ No newline at end of file diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtAnimationTimerPeer.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtAnimationTimerPeer.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtAnimationTimerPeer.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtAnimationTimerPeer.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvas.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvas.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvas.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvas.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvasControl.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvasControl.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvasControl.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtCanvasControl.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtContext2d.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtContext2d.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtContext2d.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtContext2d.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtMouseEventMapper.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtMouseEventMapper.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtMouseEventMapper.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/AwtMouseEventMapper.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasComponent.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasComponent.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasComponent.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasComponent.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasContainerPanel.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasContainerPanel.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasContainerPanel.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/canvas/CanvasContainerPanel.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/AwtLiveMapPanel.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/AwtLiveMapPanel.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/AwtLiveMapPanel.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/AwtLiveMapPanel.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/DisposableJPanel.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/DisposableJPanel.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/DisposableJPanel.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/DisposableJPanel.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/FigureModel.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/FigureModel.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/FigureModel.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/FigureModel.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/FigureToAwt.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/FigureToAwt.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/FigureToAwt.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/FigureToAwt.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/MonolithicAwt.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/MonolithicAwt.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/MonolithicAwt.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/MonolithicAwt.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExport.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExport.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExport.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExport.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/ApplicationContext.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/ApplicationContext.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/ApplicationContext.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/ApplicationContext.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultErrorMessageComponent.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultErrorMessageComponent.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultErrorMessageComponent.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultErrorMessageComponent.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultPlotContentPane.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultPlotContentPane.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultPlotContentPane.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/DefaultPlotContentPane.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotComponentProvider.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotComponentProvider.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotComponentProvider.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotComponentProvider.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanel.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanel.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanel.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanel.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanelFigureModel.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanelFigureModel.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanelFigureModel.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotPanelFigureModel.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotSpecComponentProvider.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotSpecComponentProvider.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotSpecComponentProvider.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotSpecComponentProvider.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotViewerWindowBase.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotViewerWindowBase.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotViewerWindowBase.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/PlotViewerWindowBase.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/ResizeHook.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/ResizeHook.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/plot/component/ResizeHook.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/plot/component/ResizeHook.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/AwtContainerDisposer.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/AwtContainerDisposer.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/AwtContainerDisposer.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/AwtContainerDisposer.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/AwtEventUtil.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/AwtEventUtil.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/AwtEventUtil.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/AwtEventUtil.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/RGBEncoderAwt.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/RGBEncoderAwt.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/RGBEncoderAwt.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/RGBEncoderAwt.kt diff --git a/platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/RgbToDataUrl.kt b/platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/RgbToDataUrl.kt similarity index 100% rename from platf-awt/src/jvmMain/kotlin/org/jetbrains/letsPlot/awt/util/RgbToDataUrl.kt rename to platf-awt/src/main/kotlin/org/jetbrains/letsPlot/awt/util/RgbToDataUrl.kt diff --git a/platf-batik/build.gradle.kts b/platf-batik/build.gradle.kts index 906c83c99cc..51ddb7c2f23 100644 --- a/platf-batik/build.gradle.kts +++ b/platf-batik/build.gradle.kts @@ -3,49 +3,22 @@ * Use of this source code is governed by the MIT license that can be found in the LICENSE file. */ -plugins { - kotlin("multiplatform") -} - val batikVersion = project.extra["batik_version"] as String -kotlin { - jvm() - - sourceSets { - commonMain { - dependencies { - compileOnly(project(":commons")) - compileOnly(project(":datamodel")) - compileOnly(project(":plot-stem")) - } - } - - commonTest { - dependencies { - implementation(project(":commons")) - implementation(project(":datamodel")) - implementation(project(":plot-base")) - implementation(project(":plot-builder")) - implementation(project(":plot-stem")) - implementation(project(":demo-and-test-shared")) - } - } - - jvmMain { - dependencies { - compileOnly(project(":platf-awt")) - compileOnly("org.apache.xmlgraphics:batik-codec:$batikVersion") - } - } - - jvmTest { - dependencies { - implementation(kotlin("test")) - implementation(kotlin("test-junit")) - implementation("org.apache.xmlgraphics:batik-codec:$batikVersion") - implementation(project(":platf-awt")) - } - } - } +dependencies { + compileOnly(project(":commons")) + compileOnly(project(":datamodel")) + compileOnly(project(":plot-stem")) + compileOnly(project(":platf-awt")) + compileOnly("org.apache.xmlgraphics:batik-codec:$batikVersion") + testImplementation(project(":commons")) + testImplementation(project(":datamodel")) + testImplementation(project(":plot-base")) + testImplementation(project(":plot-builder")) + testImplementation(project(":plot-stem")) + testImplementation(project(":demo-and-test-shared")) + testImplementation(kotlin("test")) + testImplementation(kotlin("test-junit")) + testImplementation("org.apache.xmlgraphics:batik-codec:$batikVersion") + testImplementation(project(":platf-awt")) } \ No newline at end of file diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/BatikTargetPeer.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/BatikTargetPeer.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/BatikTargetPeer.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/BatikTargetPeer.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgBatikPeer.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgBatikPeer.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgBatikPeer.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgBatikPeer.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgElementMapper.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgElementMapper.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgElementMapper.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgElementMapper.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapper.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapper.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapper.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapper.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapperFactory.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapperFactory.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapperFactory.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgNodeMapperFactory.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgRootDocumentMapper.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgRootDocumentMapper.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgRootDocumentMapper.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgRootDocumentMapper.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgTextNodeMapper.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgTextNodeMapper.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgTextNodeMapper.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgTextNodeMapper.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/Utils.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/Utils.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/Utils.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/Utils.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotComponentProviderBatik.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotComponentProviderBatik.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotComponentProviderBatik.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotComponentProviderBatik.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotPanelBatik.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotPanelBatik.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotPanelBatik.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultPlotPanelBatik.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultSwingContextBatik.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultSwingContextBatik.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultSwingContextBatik.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/DefaultSwingContextBatik.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/PlotViewerWindowBatik.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/PlotViewerWindowBatik.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/component/PlotViewerWindowBatik.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/component/PlotViewerWindowBatik.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikGraphicsNodeRenderer.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikGraphicsNodeRenderer.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikGraphicsNodeRenderer.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikGraphicsNodeRenderer.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponent.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponent.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponent.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponent.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentHelper.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentHelper.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentHelper.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentHelper.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentRepaintManager.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentRepaintManager.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentRepaintManager.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMapperComponentRepaintManager.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMessageCallback.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMessageCallback.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMessageCallback.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikMessageCallback.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/GraphicsNodeInitializer.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/GraphicsNodeInitializer.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/GraphicsNodeInitializer.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/GraphicsNodeInitializer.kt diff --git a/platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/ServiceLoaderHelper.kt b/platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/ServiceLoaderHelper.kt similarity index 100% rename from platf-batik/src/jvmMain/kotlin/org/jetbrains/letsPlot/batik/plot/util/ServiceLoaderHelper.kt rename to platf-batik/src/main/kotlin/org/jetbrains/letsPlot/batik/plot/util/ServiceLoaderHelper.kt diff --git a/platf-batik/src/jvmTest/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgAwtPeerTest.kt b/platf-batik/src/test/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgAwtPeerTest.kt similarity index 100% rename from platf-batik/src/jvmTest/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgAwtPeerTest.kt rename to platf-batik/src/test/kotlin/org/jetbrains/letsPlot/batik/mapping/svg/SvgAwtPeerTest.kt diff --git a/platf-batik/src/jvmTest/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikPlotComponentTest.kt b/platf-batik/src/test/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikPlotComponentTest.kt similarity index 100% rename from platf-batik/src/jvmTest/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikPlotComponentTest.kt rename to platf-batik/src/test/kotlin/org/jetbrains/letsPlot/batik/plot/util/BatikPlotComponentTest.kt diff --git a/platf-jfx-swing/build.gradle.kts b/platf-jfx-swing/build.gradle.kts index 643a92b7b2d..c5fb792f19d 100644 --- a/platf-jfx-swing/build.gradle.kts +++ b/platf-jfx-swing/build.gradle.kts @@ -5,18 +5,8 @@ import org.gradle.jvm.tasks.Jar * Use of this source code is governed by the MIT license that can be found in the LICENSE file. */ -plugins { - kotlin("jvm") - `maven-publish` - signing -} - -val artifactBaseName = "platf-jfx-swing-jvm" -val artifactGroupId = project.group as String -val artifactVersion = project.version as String val jfxVersion = project.extra["jfx_version"] as String val jfxPlatform = project.extra["jfxPlatformResolved"] as String -val mavenLocalPath = rootProject.project.extra["localMavenRepository"] dependencies { compileOnly(project("::platf-awt")) @@ -24,13 +14,10 @@ dependencies { compileOnly(project(":datamodel")) compileOnly(project(":canvas")) compileOnly(project(":plot-stem")) - compileOnly("org.openjfx:javafx-base:$jfxVersion:$jfxPlatform") compileOnly("org.openjfx:javafx-graphics:$jfxVersion:$jfxPlatform") compileOnly("org.openjfx:javafx-swing:$jfxVersion:$jfxPlatform") - compileOnly(project(":platf-awt")) - testImplementation(project(":demo-and-test-shared")) testImplementation(project(":platf-awt")) testImplementation(kotlin("test")) @@ -39,67 +26,3 @@ dependencies { testImplementation("org.openjfx:javafx-graphics:$jfxVersion:$jfxPlatform") testImplementation("org.openjfx:javafx-swing:$jfxVersion:$jfxPlatform") } - -tasks { - jar { - from(rootProject.file("LICENSE")) { - into("META-INF") - } - } - val platfJfxSwingJvmSourcesJar by creating(Jar::class) { - archiveClassifier.set("sources") - from(sourceSets["main"].allSource) - } - val platfJfxSwingJvmJavadocJar by creating(Jar::class) { - archiveClassifier.set("javadoc") - from("$rootDir/README.md") - } -} - -publishing { - publications { - register("platfJfxSwingJvm", MavenPublication::class) { - - groupId = artifactGroupId - artifactId = artifactBaseName - version = artifactVersion - - artifact(tasks["jar"]) - artifact(tasks["platfJfxSwingJvmSourcesJar"]) - artifact(tasks["platfJfxSwingJvmJavadocJar"]) - - pom { - name = "Lets-Plot core artifact" - description = "A part of the Lets-Plot library." - - url = "https://github.com/JetBrains/lets-plot" - licenses { - license { - name = "MIT" - url = "https://raw.githubusercontent.com/JetBrains/lets-plot/master/LICENSE" - } - } - developers { - developer { - id = "jetbrains" - name = "JetBrains" - email = "lets-plot@jetbrains.com" - } - } - scm { - url = "https://github.com/JetBrains/lets-plot" - } - } - } - } - repositories { - mavenLocal { - url = uri("$mavenLocalPath") - } - } -} -signing { - if (!project.version.toString().contains("SNAPSHOT")) { - sign(publishing.publications["platfJfxSwingJvm"]) - } -} From ce6673b5628d8aeabb3c794cac7cbd8302e29ecb Mon Sep 17 00:00:00 2001 From: Valentin Dovidaytis Date: Wed, 25 Dec 2024 16:41:48 +0100 Subject: [PATCH 2/4] Replace function call to direct task call --- build.gradle.kts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f7870b69c15..fcbb7fdd317 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -260,10 +260,10 @@ subprojects { apply(plugin = "org.jetbrains.kotlin.jvm") apply(plugin = "maven-publish") - fun getJarSourcesTask(distributeName:String): TaskProvider { - return tasks.register("${distributeName}Sources") { + configure { + tasks.register("${name}-jvm-sources") { archiveClassifier.set("sources") - from(project.extensions.getByType().sourceSets.getByName("main").kotlin.srcDirs) + from(sourceSets.getByName("main").kotlin.srcDirs) } } @@ -275,7 +275,7 @@ subprojects { version = project.version as String artifact(tasks["jar"]) - artifact(getJarSourcesTask(name)) + artifact(tasks["${name}-sources"]) } } } From 428f1fdc72dc31dff04a71356d9f5f1e4750733f Mon Sep 17 00:00:00 2001 From: Valentin Dovidaytis Date: Wed, 25 Dec 2024 19:51:17 +0100 Subject: [PATCH 3/4] Fix dependencies --- .../kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExportTest.kt | 0 plot-image-export/build.gradle.kts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename platf-awt/src/{jvmTest => test}/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExportTest.kt (100%) diff --git a/platf-awt/src/jvmTest/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExportTest.kt b/platf-awt/src/test/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExportTest.kt similarity index 100% rename from platf-awt/src/jvmTest/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExportTest.kt rename to platf-awt/src/test/kotlin/org/jetbrains/letsPlot/awt/plot/PlotSvgExportTest.kt diff --git a/plot-image-export/build.gradle.kts b/plot-image-export/build.gradle.kts index db504fb8e06..4391a7f1a5e 100644 --- a/plot-image-export/build.gradle.kts +++ b/plot-image-export/build.gradle.kts @@ -155,7 +155,7 @@ publishing { dep = deps.appendNode("dependency") dep.appendNode("groupId", project.group) - dep.appendNode("artifactId", "platf-awt") + dep.appendNode("artifactId", "platf-awt-jvm") dep.appendNode("version", project.version) } From 9678938f01909da4d9f7c7eafddc404f7acef8bc Mon Sep 17 00:00:00 2001 From: Valentin Dovidaytis Date: Wed, 25 Dec 2024 20:06:47 +0100 Subject: [PATCH 4/4] Add import --- build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index fcbb7fdd317..d32587452f0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,7 @@ import org.gradle.internal.os.OperatingSystem import org.gradle.jvm.tasks.Jar import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions import org.jetbrains.kotlin.gradle.dsl.KotlinJvmExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import java.io.ByteArrayOutputStream import java.io.FileNotFoundException @@ -260,7 +261,7 @@ subprojects { apply(plugin = "org.jetbrains.kotlin.jvm") apply(plugin = "maven-publish") - configure { + configure { tasks.register("${name}-jvm-sources") { archiveClassifier.set("sources") from(sourceSets.getByName("main").kotlin.srcDirs)