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
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
dependencies { | |
compile fileTree(dir: 'lib', include: '*.jar') | |
} |
この例では、プロジェクトのlibフォルダ直下に存在するjarファイルへの依存関係をflatDirを使って指定している(5行目)。jarファイルごとに依存関係を指定する必要がないので、gradleで管理されていない既存のプロジェクトで、依存関係のあるjarがすべてlibフォルダに含まれている場合は、この方法が手っ取り早そう。
関連リンク
- Gradle本家ユーザガイド
- Chapter 45. Dependency Management
- 45.4.4. File dependenciesを参照
- Chapter 45. Dependency Management
0 件のコメント:
コメントを投稿