LoginSignup
0
0

More than 5 years have passed since last update.

Gradle TIPS集 (自分用)

Last updated at Posted at 2017-09-17

実行系

マルチプロジェクト構成で、サブプロジェクトのタスクを実行する方法
# gradle :<subproject名>:<タスク名>
$ ./gradlew :doxer-core:clean :doxer-core:build :doxer-core:install 

設定系

依存関係バージョンを範囲指定/最新指定
dependencies {
  compile 'aaa:bbb:1.4+' // 1.4 以上
  compile 'ccc:ddd:latest.integration' // 最新バージョン
  compile 'eee:fff:latest.milestone' // マイルストーンバージョン
  compile 'ggg:hhh:latest.release' // リリースバージョン
}
依存バージョン競合が起きた場合はエラーとする設定/依存バージョンを強制固定する設定
configurations.compile {
  resolutionStrategy {
    failOnVersionConflict()
    force 'aaa:bbb:1.4'
  }
}

Java

実行時にシステムプロパティを設定する(applicationプラグイン)
applicationDefaultJvmArgs = ["-Djava.library.path=./hoge"]

参考

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