LoginSignup
2
1

More than 3 years have passed since last update.

GradleのArtifactとはなんぞや

Last updated at Posted at 2020-05-27

毎回忘れるのでメモ。

Artifactとはなんぞや

該当プロジェクトが、一意に参照できるようにするためのもの。
プロジェクトの名前やライブラリの名前になることが多いと思う。

javaのライブラリ管理はドメイン名と Artifact で行われており、それぞれをつなげたのものファイル名にする。
そのため、example.com というドメインを所持している会社の foo-library というライブラリを配布する場合、

com/
└── example
    └── foo-library

といった形になる。
また、Gradleの設定ファイルであるbuild.gradleには、ドメイン部分の

group = 'com.example'

が記載される。

じゃあNameってなんなん

Gradleでは、複数のプロジェクトを1つのプロジェクトファイルにまとめることができる。
その際に使用するalias。
なので、単一プロジェクトではArtifactと同じで良いと思う。

参考

Artifactについて

Artifact
A file or directory produced by a build, such as a JAR, a ZIP distribution, or a native executable.

Artifacts are typically designed to be used or consumed by users or other projects, or deployed to hosting systems. In such cases, the artifact is a single file. Directories are common in the case of inter-project dependencies to avoid the cost of producing the publishable artifact.
https://docs.gradle.org/current/userguide/dependency_management_terminology.html#sub:terminology_artifact

複数プロジェクトをまとめる方法について

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