Skip to content

Commit d1a1c76

Browse files
committed
initial commit
1 parent 2db3d70 commit d1a1c76

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
target
3+
*.iml

pom.xml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>mu</groupId>
8+
<artifactId>kotlin-logging-example-maven</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<properties>
11+
<kotlin.version>1.0.3</kotlin.version>
12+
</properties>
13+
<build>
14+
<!-- taken from here: https://kotlinlang.org/docs/reference/using-maven.html -->
15+
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
16+
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
17+
18+
<plugins>
19+
<plugin>
20+
<artifactId>kotlin-maven-plugin</artifactId>
21+
<groupId>org.jetbrains.kotlin</groupId>
22+
<version>${kotlin.version}</version>
23+
24+
<executions>
25+
<execution>
26+
<id>compile</id>
27+
<goals>
28+
<goal>compile</goal>
29+
</goals>
30+
</execution>
31+
32+
<execution>
33+
<id>test-compile</id>
34+
<goals>
35+
<goal>test-compile</goal>
36+
</goals>
37+
</execution>
38+
</executions>
39+
</plugin>
40+
</plugins>
41+
42+
43+
</build>
44+
45+
<dependencies>
46+
47+
<dependency>
48+
<groupId>microutils</groupId>
49+
<artifactId>kotlin.logging</artifactId>
50+
<version>1.2</version>
51+
</dependency>
52+
<dependency>
53+
<groupId>org.slf4j</groupId>
54+
<artifactId>slf4j-simple</artifactId>
55+
<version>1.7.5</version>
56+
</dependency>
57+
58+
<dependency>
59+
<groupId>org.jetbrains.kotlin</groupId>
60+
<artifactId>kotlin-stdlib</artifactId>
61+
<version>${kotlin.version}</version>
62+
</dependency>
63+
64+
65+
</dependencies>
66+
67+
68+
</project>

src/main/kotlin/mu/Example.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package mu
2+
3+
4+
fun main(args : Array<String>) {
5+
Example().bar()
6+
}
7+
8+
class Example {
9+
companion object: KLogging()
10+
fun bar() {
11+
val world = "world"
12+
logger.info { "hello $world" }
13+
}
14+
}

0 commit comments

Comments
 (0)