Browse Source

Fixed skipping of cpp publishing tasks.

Generate pom.xml for use with github dependency tree.
pull/75/head
weisj 5 years ago
parent
commit
a10e7e35dc
  1. 11
      build.gradle.kts
  2. 1
      core/gradle.properties
  3. 82
      core/pom.xml

11
build.gradle.kts

@ -73,7 +73,9 @@ allprojects {
} }
plugins.withId("cpp-library") { plugins.withId("cpp-library") {
tasks.withType<PublishToMavenRepository>() listOf(AbstractPublishToMaven::class, GenerateMavenPom::class, GenerateModuleMetadata::class)
.forEach { type ->
tasks.withType(type)
.matching { .matching {
it.name.startsWith("publishMain") || it.name.startsWith("publishMain") ||
it.name.startsWith("signMain") || it.name.startsWith("signMain") ||
@ -85,6 +87,7 @@ allprojects {
enabled = false enabled = false
} }
} }
}
if (!enableGradleMetadata) { if (!enableGradleMetadata) {
tasks.withType<GenerateModuleMetadata> { tasks.withType<GenerateModuleMetadata> {
@ -103,6 +106,7 @@ allprojects {
} }
apply(plugin = "maven-publish") apply(plugin = "maven-publish")
val generatePomFile by props()
tasks { tasks {
withType<JavaCompile>().configureEach { withType<JavaCompile>().configureEach {
@ -177,7 +181,7 @@ allprojects {
artifactId = project.name artifactId = project.name
version = rootProject.version.toString() version = rootProject.version.toString()
description = project.description description = project.description
from(project.components.get("java")) from(project.components["java"])
} }
withType<MavenPublication> { withType<MavenPublication> {
// Use the resolved versions in pom.xml // Use the resolved versions in pom.xml
@ -207,6 +211,9 @@ allprojects {
) )
sb.setLength(0) sb.setLength(0)
sb.append(s) sb.append(s)
if (generatePomFile && !version.endsWith("SNAPSHOT")) {
file("$projectDir/pom.xml").writeText(sb.toString())
}
// Re-format the XML // Re-format the XML
asNode() asNode()
} }

1
core/gradle.properties

@ -0,0 +1 @@
generatePomFile = true

82
core/pom.xml

@ -0,0 +1,82 @@
<?xml version="1.0"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.weisj</groupId>
<artifactId>darklaf-core</artifactId>
<version>1.4.0.3-SNAPSHOT</version>
<name>Darklaf core</name>
<description>A themeable Look and Feel for java swing</description>
<url>https://github.com/weisJ/darklaf</url>
<organization>
<name>com.github.weisj</name>
<url>https://github.com/weisj</url>
</organization>
<licenses>
<license>
<name>MIT</name>
<url>https://github.com/weisJ/darklaf/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Jannis Weis</name>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/weisJ/darklaf.git</connection>
<developerConnection>scm:git:ssh://git@github.com:weisj/darklaf.git</developerConnection>
<url>https://github.com/weisJ/darklaf</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/weisJ/darklaf/issues</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>com.github.weisj</groupId>
<artifactId>darklaf-native-utils</artifactId>
<version>1.4.0.3-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.github.weisj</groupId>
<artifactId>darklaf-utils</artifactId>
<version>1.4.0.3-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.github.weisj</groupId>
<artifactId>darklaf-decorations-base</artifactId>
<version>1.4.0.3-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.github.weisj</groupId>
<artifactId>darklaf-windows</artifactId>
<version>1.4.0.3-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.github.weisj</groupId>
<artifactId>darklaf-macos</artifactId>
<version>1.4.0.3-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.github.weisj</groupId>
<artifactId>darklaf-property-loader</artifactId>
<version>1.4.0.3-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>jxlayer</artifactId>
<version>3.0.4</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
Loading…
Cancel
Save