1
1

More than 3 years have passed since last update.

MavenプロジェクトをGradleプロジェクトに変換

Last updated at Posted at 2021-09-15

環境

  • OS: Windows 10 Home
  • Gradle 7.0.2

前提

MavenプロジェクトをGradleプロジェクトに変換

  • コマンドプロンプトを開き、Mavenプロジェクトのフォルダに移動

  • gradle init を実行

    • 実行例
gradle init

Found a Maven build. Generate a Gradle build from this? (default: yes) [yes, no]

Select build script DSL:
  1: Groovy
  2: Kotlin
Enter selection (default: Groovy) [1..2]


> Task :init
Maven to Gradle conversion is an incubating feature.
Get more help with your project: https://docs.gradle.org/7.0.2/userguide/migrating_from_maven.html

BUILD SUCCESSFUL in 51s
2 actionable tasks: 2 executed

変換後の後処理

  • .gitignore にGradle用の設定を追加
.gradle
bin/
build/
  • Maven用の不要なファイルを削除
    • pom.xml
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1