Skip to content

Commit 0936b8f

Browse files
authored
feat: new tutorials (#5117)
1 parent 94c0307 commit 0936b8f

File tree

15 files changed

+841
-504
lines changed

15 files changed

+841
-504
lines changed
42 KB
Loading
-9.86 KB
Loading
Binary file not shown.
171 KB
Loading
Binary file not shown.
Binary file not shown.

docs/kr.tree

Lines changed: 330 additions & 330 deletions
Large diffs are not rendered by default.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>org.jetbrains.kotlin</groupId>
7+
<artifactId>kotlin-junit-complete</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
10+
<name>kotlin-junit-complete</name>
11+
<url>https://kotlinlang.org/docs/jvm-test-using-junit.htm</url>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<maven.compiler.release>17</maven.compiler.release>
16+
<jexer.version>1.6.0</jexer.version>
17+
<kotlin.version>%kotlinVersion%</kotlin.version>
18+
</properties>
19+
20+
<dependencyManagement>
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.junit</groupId>
24+
<artifactId>junit-bom</artifactId>
25+
<version>5.11.0</version>
26+
<type>pom</type>
27+
<scope>import</scope>
28+
</dependency>
29+
</dependencies>
30+
</dependencyManagement>
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>org.junit.jupiter</groupId>
35+
<artifactId>junit-jupiter-api</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
<!-- Add JUnit Jupiter engine for test runtime -->
39+
<dependency>
40+
<groupId>org.junit.jupiter</groupId>
41+
<artifactId>junit-jupiter-engine</artifactId>
42+
<scope>test</scope>
43+
</dependency>
44+
<!-- Optionally: parameterized tests support -->
45+
<dependency>
46+
<groupId>org.junit.jupiter</groupId>
47+
<artifactId>junit-jupiter-params</artifactId>
48+
<scope>test</scope>
49+
</dependency>
50+
<!-- Add Kotlin standard library to compile and run Kotlin tests -->
51+
<dependency>
52+
<groupId>org.jetbrains.kotlin</groupId>
53+
<artifactId>kotlin-stdlib</artifactId>
54+
<version>${kotlin.version}</version>
55+
<scope>test</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>com.gitlab.klamonte</groupId>
59+
<artifactId>jexer</artifactId>
60+
<version>${jexer.version}</version>
61+
</dependency>
62+
</dependencies>
63+
64+
<build>
65+
<pluginManagement><!-- Lock down plugin versions to avoid using Maven defaults (can be moved to a parent pom file) -->
66+
<plugins>
67+
<!-- Clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
68+
<plugin>
69+
<artifactId>maven-clean-plugin</artifactId>
70+
<version>3.4.0</version>
71+
</plugin>
72+
<!-- Default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
73+
<plugin>
74+
<artifactId>maven-resources-plugin</artifactId>
75+
<version>3.3.1</version>
76+
</plugin>
77+
<plugin>
78+
<artifactId>maven-surefire-plugin</artifactId>
79+
<version>3.3.0</version>
80+
</plugin>
81+
<plugin>
82+
<artifactId>maven-jar-plugin</artifactId>
83+
<version>3.4.2</version>
84+
</plugin>
85+
<plugin>
86+
<artifactId>maven-install-plugin</artifactId>
87+
<version>3.1.2</version>
88+
</plugin>
89+
<plugin>
90+
<artifactId>maven-deploy-plugin</artifactId>
91+
<version>3.1.2</version>
92+
</plugin>
93+
<!-- Site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
94+
<plugin>
95+
<artifactId>maven-site-plugin</artifactId>
96+
<version>3.12.1</version>
97+
</plugin>
98+
<plugin>
99+
<artifactId>maven-project-info-reports-plugin</artifactId>
100+
<version>3.6.1</version>
101+
</plugin>
102+
<!-- No maven-compiler-plugin needed with Kotlin extensions -->
103+
</plugins>
104+
</pluginManagement>
105+
<plugins>
106+
<!-- Activate Kotlin Maven plugin for main and test sources -->
107+
<plugin>
108+
<groupId>org.jetbrains.kotlin</groupId>
109+
<artifactId>kotlin-maven-plugin</artifactId>
110+
<version>${kotlin.version}</version>
111+
<extensions>true</extensions>
112+
<executions>
113+
<execution>
114+
<id>default-compile</id>
115+
<phase>compile</phase>
116+
<configuration>
117+
<sourceDirs>
118+
<sourceDir>src/main/kotlin</sourceDir>
119+
<!-- Ensure Kotlin code can reference Java code -->
120+
<sourceDir>src/main/java</sourceDir>
121+
</sourceDirs>
122+
</configuration>
123+
</execution>
124+
<execution>
125+
<id>default-test-compile</id>
126+
<phase>test-compile</phase>
127+
<configuration>
128+
<sourceDirs>
129+
<sourceDir>src/test/kotlin</sourceDir>
130+
<sourceDir>src/test/java</sourceDir>
131+
</sourceDirs>
132+
</configuration>
133+
</execution>
134+
</executions>
135+
</plugin>
136+
</plugins>
137+
</build>
138+
</project>

docs/topics/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ the ability to write expressive code as well as facilitating creation of DSL.
3636
Yes. Kotlin is 100% interoperable with the Java programming language, and major emphasis has been placed on making sure
3737
that your existing codebase can interact properly with Kotlin. You can easily [call Kotlin code from Java](java-to-kotlin-interop.md) and [Java code
3838
from Kotlin](java-interop.md). This makes adoption much easier and lower-risk. There's also an automated [Java-to-Kotlin converter built
39-
into the IDE](mixing-java-kotlin-intellij.md#converting-an-existing-java-file-to-kotlin-with-j2k) that simplifies migration of existing code.
39+
into the IDE](mixing-java-kotlin-intellij.md#convert-java-files-to-kotlin) that simplifies migration of existing code.
4040

4141
### What can I use Kotlin for?
4242

docs/topics/getting-started.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ Here you'll learn how to develop a console application and create unit tests wit
3535

3636
Here you'll learn how to develop a backend application with Kotlin server-side.
3737

38-
1. **Create your first backend application:**
38+
* **Introduce Kotlin to your Java project:**
3939

40-
* [Create a RESTful web service with Spring Boot](jvm-get-started-spring-boot.md)
41-
* [Create HTTP APIs with Ktor](https://ktor.io/docs/creating-http-apis.html)
40+
* [Configure a Java project to work with Kotlin](mixing-java-kotlin-intellij.md)
41+
* [Add Kotlin tests to your Java Maven project](jvm-test-using-junit.md)
4242

43-
2. **[Learn how to mix Kotlin and Java code in your application](mixing-java-kotlin-intellij.md).**
43+
* **Create a backend app from scratch with Kotlin:**
44+
45+
* [Create a RESTful web service with Spring Boot](jvm-get-started-spring-boot.md)
46+
* [Create HTTP APIs with Ktor](https://ktor.io/docs/creating-http-apis.html)
4447

4548
</tab>
4649

0 commit comments

Comments
 (0)