-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #81 Migrate ExportContext to Kotlin. Use dokka plugin instead o…
…f maven-javadoc-plugin to support Kotlin classes and not fail.
- Loading branch information
1 parent
fbd0e59
commit 70b2799
Showing
5 changed files
with
125 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/ExportContext.java
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/ExportContext.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package ru.klavogonki.statistics.export | ||
|
||
import ru.klavogonki.statistics.Config | ||
import ru.klavogonki.statistics.util.DateUtils | ||
import java.time.LocalDateTime | ||
|
||
// todo: probably we don't require this class, all fields are already present in Config | ||
// todo: remove @JvmField annotations after moving all the using classes to Kotlin | ||
data class ExportContext( | ||
@JvmField val webRootDir: String, | ||
@JvmField val minPlayerId: Int, | ||
@JvmField val maxPlayerId: Int, | ||
@JvmField val dataDownloadStartDate: LocalDateTime, | ||
@JvmField val dataDownloadEndDate: LocalDateTime | ||
) { | ||
constructor(config: Config): this( | ||
// we can use property-access from a Java class when there is an explicit geter | ||
// but the lombok-generated getters do NOT work | ||
|
||
webRootDir = config.statisticsPagesRootDir, | ||
minPlayerId = config.minPlayerId, | ||
maxPlayerId = config.maxPlayerId, | ||
|
||
// todo: think about UTC timeZone | ||
// todo: also change to OffsetDateTime | ||
dataDownloadStartDate = DateUtils.convertToUtcLocalDateTime(config.dataDownloadStartDate), | ||
|
||
// todo: think about UTC timeZone | ||
// todo: also change to OffsetDateTime | ||
dataDownloadEndDate = DateUtils.convertToUtcLocalDateTime(config.dataDownloadEndDate) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters