Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Use Kotlin's documented Maven setup to compile Kotlin before Java

オープン
#881 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, kotlin
領域
build-system

調査の方向性

Read the Maven configuration for kotlin-maven-plugin and maven-compiler-plugin, including default-testCompile and the java17-tests profile. Compare it with the Kotlin Maven guide's second setup option, then check how module-info.java and the release profile's source and javadoc jars depend on the current executions. Done means Kotlin and Java compile in the required order across these configurations with no behavior change.

索引モデルが issue の本文から書いたものです。

説明

We get Kotlin compiled before javac by binding the Kotlin executions to earlier phases: compile runs at process-sources, and since #879 test-compile runs at process-test-sources. #879 needed that so ResolverMethodsTest.java could call the Kotlin assertEveryFieldResolves helper. Without it, javac compiled the Java tests before any Kotlin test class existed.

It works, but it isn't how Kotlin's docs say to do it. The Maven guide has two options:

  • <extensions>true</extensions> on kotlin-maven-plugin, declared before maven-compiler-plugin. It adds the Kotlin executions itself, and the docs say not to configure the compiler plugin's executions with it.
  • Keep the Kotlin executions at compile / test-compile, set default-compile and default-testCompile to <phase>none</phase>, and add java-compile / java-test-compile executions after Kotlin.

The second one probably fits better, since we already configure default-testCompile (useModulePath=false, with a TODO for 15.0.0) and the java17-tests profile adds its own java17-test-compile execution. Both have to keep working, along with module-info.java and the release profile's source and javadoc jars.

No behaviour change, it's build cleanup only.

主要言語
Kotlin
スター
824
フォーク
175
平均マージ
2日 5時間
マージ済み PR(30日)
52

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

graphql-java-kickstart/graphql-java-tools のほかの issue

graphql-java-kickstart/graphql-java-tools の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。