diff --git a/build.gradle.kts b/build.gradle.kts index 758b7bc5..96276a7d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -56,16 +56,17 @@ tasks.create("v") { } } -val fireplaceModules = subprojects.filter { it.name != projects.fireplaceApp.name } +val fireplaceModules = subprojects - project(":fireplace-app") - project(":fireplace-swt-experiment") configure(fireplaceModules) { apply(plugin = "java-library") // needed to get the java component apply(plugin = "maven-publish") apply(plugin = "signing") apply(plugin = "biz.aQute.bnd.builder") - // configure { - // withSourcesJar() - // } + configure { + withJavadocJar() + withSourcesJar() + } repositories { mavenCentral() @@ -84,15 +85,6 @@ configure(fireplaceModules) { metaInf.with(licenseSpec) } - // todo replace by java.withSourcesJar() - val sourcesJar by registering(Jar::class) { - archiveClassifier.set("sources") - from( - // take extension from project instance - project.the().named("main").get().allJava - ) - } - val jar = named("jar") { bundle { val version by archiveVersion @@ -138,9 +130,7 @@ configure(fireplaceModules) { publications { create("mavenJava") { from(components["java"]) - artifact(tasks["sourcesJar"]) - groupId = project.group.toString() - artifactId = project.name + // OSSRH enforces the `-SNAPSHOT` suffix on snapshot repository // https://central.sonatype.org/faq/400-error/#question version = when { @@ -149,12 +139,9 @@ configure(fireplaceModules) { } project.extra["publishingVersion"] = version - afterEvaluate { - description = project.description - } - val gitRepo = "https://github.com/bric3/fireplace" pom { + name.set(project.name) url.set(gitRepo) scm { @@ -162,6 +149,7 @@ configure(fireplaceModules) { developerConnection.set("scm:git:${gitRepo}.git") url.set(gitRepo) } + issueManagement { system.set("GitHub") url.set("https://github.com/spring-projects/spring-framework/issues") @@ -174,7 +162,23 @@ configure(fireplaceModules) { url.set("https://www.mozilla.org/en-US/MPL/2.0/") } } + + developers { + developer { + id.set("bric3") + name.set("Brice Dutheil") + email.set("brice.dutheil@gmail.com") + } + } + } + // subprojects properties (like description) will be available + // after they have been configured + afterEvaluate { + pom { + description.set(project.description) + } } + } } repositories { @@ -195,7 +199,6 @@ configure(fireplaceModules) { url = uri("${rootProject.buildDir}/publishing-repository") } project.extra["publishingRepositoryUrl"] = url - } } } diff --git a/fireplace-app/build.gradle.kts b/fireplace-app/build.gradle.kts index 2533f408..34a9012d 100644 --- a/fireplace-app/build.gradle.kts +++ b/fireplace-app/build.gradle.kts @@ -10,6 +10,8 @@ fun properties(key: String) = project.findProperty(key).toString() +description = "Swing app that uses fireplace-swing" + plugins { id("application") id("com.github.johnrengelman.shadow") version "7.1.2" diff --git a/fireplace-swing-animation/build.gradle.kts b/fireplace-swing-animation/build.gradle.kts index 998b95f1..b3bd210c 100644 --- a/fireplace-swing-animation/build.gradle.kts +++ b/fireplace-swing-animation/build.gradle.kts @@ -7,6 +7,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +description = "Animate zoom transitions of a flamegraph or iciclegraph swing component" + dependencies { implementation(projects.fireplaceSwing) implementation(libs.radiance.animation) diff --git a/fireplace-swing/build.gradle.kts b/fireplace-swing/build.gradle.kts index 1bb9e00b..a62877d2 100644 --- a/fireplace-swing/build.gradle.kts +++ b/fireplace-swing/build.gradle.kts @@ -7,6 +7,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +description = "Flamegraph or iciclegraph swing component" + plugins { `jvm-test-suite` } diff --git a/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphImage.java b/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphImage.java index 6c10fa44..62fc80fc 100644 --- a/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphImage.java +++ b/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphImage.java @@ -41,7 +41,6 @@ * * ImageIO.write(image, "png", new File("flamegraph.png")); * - *

* * @param The type of the node data. * @see FlamegraphView @@ -61,7 +60,6 @@ public class FlamegraphImage { * like the type of events, their number, etc. *
  • The frame background and foreground colors
  • * - *

    * * @param frameTextsProvider The function to display label in frames. * @param frameColorProvider The frame to background color function. @@ -132,11 +130,11 @@ public RenderedImage generate(FrameModel frameModel, FlamegraphView.Mode mode * And finally, the renderer will use the graphics handle to draw the graph. *

    * - * @param frameModel The frame model to render. - * @param mode The display mode of the graph. - * @param width The wanted width of the image, the height is computed from this width. - * @param g2 The graphics context to render to. - * @param onHeightComputed Callback when the height has been computed. + * @param frameModel The frame model to render. + * @param mode The display mode of the graph. + * @param width The wanted width of the image, the height is computed from this width. + * @param g2 The graphics context to render to. + * @param onHeightComputed Callback when the height has been computed. */ public void generate( FrameModel frameModel, diff --git a/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphView.java b/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphView.java index ff8fd7a1..f6e9d912 100644 --- a/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphView.java +++ b/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FlamegraphView.java @@ -66,7 +66,7 @@ * ) * ) * - *

    + * *

    * The created and final {@code component} is a composite that is based * on a {@link JScrollPane}. @@ -290,6 +290,8 @@ public void setBackground(Color bg) { /** * Experimental configuration hook for the underlying canvas. + * + * @param canvasConfigurer The configurer for the canvas. */ public void configureCanvas(Consumer canvasConfigurer) { Objects.requireNonNull(canvasConfigurer).accept(canvas); @@ -490,7 +492,7 @@ public void setSelectedFrameConsumer(BiConsumer, MouseEvent> consume public void setHoverListener(HoverListener hoverListener) { scrollPaneListener.setHoverListener(hoverListener); } - + /** * Sets the {@link FrameModel}. * diff --git a/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FrameModel.java b/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FrameModel.java index 020016b7..5c78b3fc 100644 --- a/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FrameModel.java +++ b/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FrameModel.java @@ -58,6 +58,7 @@ public FrameModel(List> frames) { * which is referred to as node. *

    . * + * @param title The title of the flamegraph, used in the root frame. * @param frameEquality Custom equality code for the actual node object {@code T}. * @param frames The list of {@code FrameBox} objects. */ diff --git a/fireplace-swt-experiment/build.gradle.kts b/fireplace-swt-experiment/build.gradle.kts index 32e8f40d..68ac5098 100644 --- a/fireplace-swt-experiment/build.gradle.kts +++ b/fireplace-swt-experiment/build.gradle.kts @@ -12,6 +12,8 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform fun properties(key: String) = project.findProperty(key).toString() +description = "SWT app that uses fireplace-swing" + plugins { id("application") }