Skip to content

Commit

Permalink
#153 [root] Add dokka plugin to generate javadocs for kotlin files
Browse files Browse the repository at this point in the history
  • Loading branch information
reinert committed Apr 2, 2023
1 parent d3d6aaa commit ff44b39
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 35 deletions.
43 changes: 43 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
<javapoet.version>1.13.0</javapoet.version>
<checkstyle.version>7.8.2</checkstyle.version>

<!-- Kotlin -->
<kotlin.version>1.8.10</kotlin.version>
<kotlinx-coroutines.version>1.6.4</kotlinx-coroutines.version>

<!-- Testing -->
<junit.version>4.13.2</junit.version>
<compile-testing.version>0.19</compile-testing.version>
Expand Down Expand Up @@ -243,6 +247,45 @@
</configuration>
</plugin>

<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<configuration>
<outputDir>${project.basedir}/target/javadoc</outputDir>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down
37 changes: 2 additions & 35 deletions requestor/ext/requestor-kotlin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@

<artifactId>requestor-kotlin</artifactId>

<properties>
<kotlin.version>1.8.10</kotlin.version>
<kotlinx-coroutines.version>1.6.4</kotlinx-coroutines.version>
</properties>

<dependencies>
<!-- Kotlin dependencies -->
<dependency>
Expand Down Expand Up @@ -84,38 +79,10 @@
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-Xlint:-processing</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,19 @@ import kotlinx.coroutines.channels.Channel

import io.reinert.requestor.core.AsyncRunner

/**
* AsyncRunner bound to a coroutine scope.
*
* @author Danilo Reinert
*/
class CoroutineAsyncRunner(private val scope: CoroutineScope,
private val dispatcher: CoroutineDispatcher? = null) : AsyncRunner {

/**
* Lock implementation based on kotlin channels.
*
* @author Danilo Reinert
*/
class Lock(private val scope: CoroutineScope) : AsyncRunner.Lock {

private var channel: Channel<Unit>? = null
Expand Down

0 comments on commit ff44b39

Please sign in to comment.