devlog-kotlin
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>dev.hermannm</groupId> <artifactId>devlog-kotlin</artifactId> <version>0.4.0</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>dev.hermannm</groupId> <artifactId>devlog-kotlin</artifactId> <version>0.4.0</version> <packaging>jar</packaging> <name>devlog-kotlin</name> <description> Logging library for Kotlin JVM, that thinly wraps SLF4J and Logback to provide a more ergonomic API. </description> <url>https://hermannm.dev/devlog</url> <licenses> <license> <name>MIT</name> <url>https://github.com/hermannm/devlog-kotlin/blob/main/LICENSE</url> <distribution>repo</distribution> </license> </licenses> <developers> <developer> <id>hermannm</id> <name>Hermann Mørkrid</name> <url>https://hermannm.dev</url> <email>hermann.morkrid@gmail.com</email> </developer> </developers> <scm> <connection>scm:git:https://github.com/hermannm/devlog-kotlin.git</connection> <developerConnection>scm:git:https://github.com/hermannm/devlog-kotlin.git</developerConnection> <url>https://github.com/hermannm/devlog-kotlin</url> </scm> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <kotlin.version>2.1.20</kotlin.version> <!-- Logging --> <slf4j.version>2.0.17</slf4j.version> <logback.version>1.5.18</logback.version> <logstash-logback-encoder.version>8.0</logstash-logback-encoder.version> <!-- Serialization --> <kotlinx-serialization.version>1.8.0</kotlinx-serialization.version> <jackson.version>2.18.3</jackson.version> <!-- Testing --> <junit.version>5.12.1</junit.version> <kotest.version>5.9.1</kotest.version> <!-- Maven plugins --> <spotless-maven-plugin.version>2.44.3</spotless-maven-plugin.version> <ktfmt.version>0.53</ktfmt.version> <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version> <maven-install-plugin.version>3.1.4</maven-install-plugin.version> <maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version> <exec-maven-plugin.version>3.5.0</exec-maven-plugin.version> <maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version> <required-maven-version>3.6.3</required-maven-version> <versions-maven-plugin.version>2.18.0</versions-maven-plugin.version> <maven-source-plugin.version>3.3.1</maven-source-plugin.version> <dokka-maven-plugin.version>2.0.0</dokka-maven-plugin.version> <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version> <central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-bom</artifactId> <version>${kotlin.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- Kotlin --> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib</artifactId> <version>${kotlin.version}</version> </dependency> <!-- Logging --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>${logback.version}</version> <!-- This library works for any SLF4J logger implementation, but makes some optimizations for Logback. If the user chooses Logback as their logger implementation, we can apply these optimizations, but if they don't, then we don't want to load Logback, as that can interfere with other SLF4J logger implementations on the classpath. --> <optional>true</optional> </dependency> <dependency> <groupId>net.logstash.logback</groupId> <artifactId>logstash-logback-encoder</artifactId> <version>${logstash-logback-encoder.version}</version> <!-- Optional - we only need this if the user: - Has chosen Logback as their logger implementation - Uses logstash-logback-encoder for encoding logs as JSON - Wants to use our LoggingContextJsonFieldWriter --> <optional>true</optional> </dependency> <!-- Serialization --> <dependency> <groupId>org.jetbrains.kotlinx</groupId> <artifactId>kotlinx-serialization-json</artifactId> <version>${kotlinx-serialization.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency> <!-- Testing --> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-params</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>io.kotest</groupId> <artifactId>kotest-assertions-core-jvm</artifactId> <version>${kotest.version}</version> <scope>test</scope> </dependency> </dependencies> <build> <sourceDirectory>src/main/kotlin</sourceDirectory> <testSourceDirectory>src/test/kotlin</testSourceDirectory> <!-- Include license under META-INF in output JAR (this is de-facto standard for Java libraries) --> <resources> <resource> <directory>${project.basedir}</directory> <includes> <include>LICENSE</include> </includes> <targetPath>META-INF</targetPath> </resource> </resources> <plugins> <!-- Kotlin compilation and kotlinx.serialization codegen --> <plugin> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-plugin</artifactId> <version>${kotlin.version}</version> <configuration> <args> <!-- Require explicit public modifiers, to avoid accidentally publishing internal APIs --> <arg>-Xexplicit-api=strict</arg> </args> <compilerPlugins> <plugin>kotlinx-serialization</plugin> </compilerPlugins> </configuration> <dependencies> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-serialization</artifactId> <version>${kotlin.version}</version> </dependency> </dependencies> <executions> <execution> <id>compile</id> <goals> <goal>compile</goal> </goals> <phase>compile</phase> </execution> <execution> <id>test-compile</id> <goals> <goal>test-compile</goal> </goals> <phase>test-compile</phase> </execution> </executions> </plugin> <!-- Formatting with ktfmt --> <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> <version>${spotless-maven-plugin.version}</version> <configuration> <kotlin> <toggleOffOn/> <ktfmt> <version>${ktfmt.version}</version> <style>META</style> </ktfmt> </kotlin> </configuration> <executions> <execution> <goals> <goal>check</goal> </goals> <phase>validate</phase> </execution> </executions> </plugin> <!-- Testing --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven-surefire-plugin.version}</version> </plugin> <!-- Install JAR in integration-tests/local-maven-repo, so integration tests can use it. See integration-tests/README.md for more on how integration tests are set up here. --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>${maven-install-plugin.version}</version> <executions> <execution> <phase>pre-integration-test</phase> <goals> <goal>install-file</goal> </goals> <configuration> <file>./target/devlog-kotlin-${project.version}.jar</file> <sources>./target/devlog-kotlin-${project.version}-sources.jar</sources> <javadoc>./target/devlog-kotlin-${project.version}-javadoc.jar</javadoc> <groupId>${project.groupId}</groupId> <artifactId>${project.artifactId}</artifactId> <version>${project.version}-SNAPSHOT</version> <packaging>${project.packaging}</packaging> <localRepositoryPath>./integration-tests/local-maven-repo</localRepositoryPath> </configuration> </execution> </executions> </plugin> <!-- Purge devlog-kotlin from cache, to make sure we use newest snapshot in integration tests--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>${maven-dependency-plugin.version}</version> <executions> <execution> <phase>clean</phase> <goals> <goal>purge-local-repository</goal> </goals> <configuration> <manualIncludes> <include>dev.hermannm:devlog-kotlin</include> </manualIncludes> <snapshotsOnly>true</snapshotsOnly> <reResolve>false</reResolve> <actTransitively>false</actTransitively> </configuration> </execution> </executions> </plugin> <!-- Run integration tests from integration-tests subdirectory. See integration-tests/README.md for more on how integration tests are set up here. --> <plugin> <artifactId>exec-maven-plugin</artifactId> <groupId>org.codehaus.mojo</groupId> <version>${exec-maven-plugin.version}</version> <executions> <execution> <id>integration-tests</id> <phase>integration-test</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>mvn</executable> <arguments> <argument>clean</argument> <argument>test</argument> <argument>-f=./integration-tests</argument> <argument>-Dstyle.color=always</argument> </arguments> </configuration> </execution> </executions> </plugin> <!-- Plugin for enforcing proper dependency management --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>${maven-enforcer-plugin.version}</version> <executions> <execution> <id>enforce</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireMavenVersion> <version>${required-maven-version}</version> </requireMavenVersion> <banDuplicatePomDependencyVersions/> <dependencyConvergence/> <requireUpperBoundDeps/> <banDynamicVersions/> </rules> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> <version>${versions-maven-plugin.version}</version> <configuration> <rulesUri>file:///${project.basedir}/rules.xml</rulesUri> </configuration> <executions> <execution> <phase>compile</phase> <goals> <goal>display-dependency-updates</goal> <goal>display-plugin-updates</goal> </goals> </execution> </executions> </plugin> <!-- Generates source file JARs, required for publishing to Maven Central --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <!-- Generates Javadoc JAR, required for publishing to Maven Central --> <plugin> <groupId>org.jetbrains.dokka</groupId> <artifactId>dokka-maven-plugin</artifactId> <version>${dokka-maven-plugin.version}</version> <executions> <execution> <phase>prepare-package</phase> <goals> <goal>javadocJar</goal> </goals> </execution> </executions> <configuration> <sourceLinks> <link> <path>src</path> <url>https://github.com/hermannm/devlog-kotlin/tree/main/src</url> <lineSuffix>#L</lineSuffix> </link> </sourceLinks> </configuration> </plugin> <!-- Signs built artifacts with GPG, required for publishing to Maven Central --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <version>${maven-gpg-plugin.version}</version> <executions> <execution> <id>sign-artifacts</id> <phase>verify</phase> <goals> <goal>sign</goal> </goals> <configuration> <bestPractices>true</bestPractices> <keyname>${gpg.keyname}</keyname> </configuration> </execution> </executions> </plugin> <!-- Publishes to Maven Central --> <plugin> <groupId>org.sonatype.central</groupId> <artifactId>central-publishing-maven-plugin</artifactId> <version>${central-publishing-maven-plugin.version}</version> <extensions>true</extensions> <configuration> <publishingServerId>central</publishingServerId> <deploymentName>${project.artifactId} v${project.version}</deploymentName> <excludeArtifacts> devlog-kotlin-integration-tests,devlog-kotlin-integration-test-jul,devlog-kotlin-integration-test-log4j,devlog-kotlin-integration-test-logback </excludeArtifacts> </configuration> </plugin> </plugins> </build> </project>