LoginSignup
1
0

More than 5 years have passed since last update.

build.gradle 日本語訳

Posted at

build.gradle に記載されているコメントの日本語訳。

build.gradle

本ビルドファイルは gradle init タスクによって生成されたファイルである。

本ファイルは Java プロジェクトの見本をコメントアウトしたものだ。
詳細は Gradle user guide の Java Quickstart を参照。

apply plugin

Java サポートを追加するプラグインを適用する。

apply plugin: 'java'

repositories

本セクションではプロジェクトの依存ライブラリの取得元を宣言する。

jcenter から依存ライブラリを取得する。
Maven/Ivy/file リポジトリを宣言することができる。

repositories {
   jcenter()
}

本セクションではプロダクションとテストコードの依存ライブラリを宣言する。

dependencies {
   compile 'org.slf4j:slf4j-api:1.7.25'
   testCompile 'junit:junit:4.12'
}

compile

プロダクションコードのコンパイル時に SLF4J logging API を使用する。

testCompile

テストに使用するテストフレームワークを宣言する。 gradle test タスクでは
TestNG もサポートしている。
testCompile の依存情報を testCompile 'org.testng:testng:6.8.1' へ変更し、
test.useTestNG() をビルドスクリプトへ追加するだけで適用することができる。

1
0
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
0