From a10e7e35dc381f2367d929701ced6f6c8310dd7c Mon Sep 17 00:00:00 2001 From: weisj Date: Sat, 7 Mar 2020 20:12:05 +0100 Subject: [PATCH] Fixed skipping of cpp publishing tasks. Generate pom.xml for use with github dependency tree. --- build.gradle.kts | 29 +++++++++------ core/gradle.properties | 1 + core/pom.xml | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 core/gradle.properties create mode 100644 core/pom.xml diff --git a/build.gradle.kts b/build.gradle.kts index 849e0411..4ac779d7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -73,17 +73,20 @@ allprojects { } plugins.withId("cpp-library") { - tasks.withType() - .matching { - it.name.startsWith("publishMain") || - it.name.startsWith("signMain") || - it.name.startsWith("generatePomFileForMain") || - it.name.startsWith("generateMetadataFileForMain") + listOf(AbstractPublishToMaven::class, GenerateMavenPom::class, GenerateModuleMetadata::class) + .forEach { type -> + tasks.withType(type) + .matching { + it.name.startsWith("publishMain") || + it.name.startsWith("signMain") || + it.name.startsWith("generatePomFileForMain") || + it.name.startsWith("generateMetadataFileForMain") + } + .configureEach { + // We don't need to publish CPP artifacts (e.g. header files) + enabled = false + } } - .configureEach { - // We don't need to publish CPP artifacts (e.g. header files) - enabled = false - } } if (!enableGradleMetadata) { @@ -103,6 +106,7 @@ allprojects { } apply(plugin = "maven-publish") + val generatePomFile by props() tasks { withType().configureEach { @@ -177,7 +181,7 @@ allprojects { artifactId = project.name version = rootProject.version.toString() description = project.description - from(project.components.get("java")) + from(project.components["java"]) } withType { // Use the resolved versions in pom.xml @@ -207,6 +211,9 @@ allprojects { ) sb.setLength(0) sb.append(s) + if (generatePomFile && !version.endsWith("SNAPSHOT")) { + file("$projectDir/pom.xml").writeText(sb.toString()) + } // Re-format the XML asNode() } diff --git a/core/gradle.properties b/core/gradle.properties new file mode 100644 index 00000000..5af255f0 --- /dev/null +++ b/core/gradle.properties @@ -0,0 +1 @@ +generatePomFile = true diff --git a/core/pom.xml b/core/pom.xml new file mode 100644 index 00000000..ee743916 --- /dev/null +++ b/core/pom.xml @@ -0,0 +1,82 @@ + + + 4.0.0 + com.github.weisj + darklaf-core + 1.4.0.3-SNAPSHOT + Darklaf core + A themeable Look and Feel for java swing + https://github.com/weisJ/darklaf + + com.github.weisj + https://github.com/weisj + + + + MIT + https://github.com/weisJ/darklaf/blob/master/LICENSE + repo + + + + + Jannis Weis + + + + scm:git:git://github.com/weisJ/darklaf.git + scm:git:ssh://git@github.com:weisj/darklaf.git + https://github.com/weisJ/darklaf + + + GitHub + https://github.com/weisJ/darklaf/issues + + + + + com.github.weisj + darklaf-native-utils + 1.4.0.3-SNAPSHOT + runtime + + + com.github.weisj + darklaf-utils + 1.4.0.3-SNAPSHOT + runtime + + + com.github.weisj + darklaf-decorations-base + 1.4.0.3-SNAPSHOT + runtime + + + com.github.weisj + darklaf-windows + 1.4.0.3-SNAPSHOT + runtime + + + com.github.weisj + darklaf-macos + 1.4.0.3-SNAPSHOT + runtime + + + com.github.weisj + darklaf-property-loader + 1.4.0.3-SNAPSHOT + runtime + + + org.swinglabs + jxlayer + 3.0.4 + runtime + + +