LoginSignup
2
3

More than 3 years have passed since last update.

Gradle で依存ライブラリをまるっとダウンロードする方法

Posted at

以下のサイトの方法で行けました。

自分のケース

com.microsoft.identity.client:msal:1.6.0 の依存ライブラリをまるっとダウンロードしたかったです。
com.microsoft.device.display は exclude する必要があったので、最終的には以下の gradle ファイルで行けました。

build.gradle
apply plugin: 'java'

repositories {
    google()
    mavenCentral()
}

dependencies {
    compile ("com.microsoft.identity.client:msal:1.6.0") { 
        exclude group: 'com.microsoft.device.display' 
    }
}

task copyDeps(type: Copy) {
    from (configurations.compile + configurations.testCompile)
    into "lib" 
}

実行は以下のコマンドで

$ gradle copyDeps

実行すると lib フォルダーに欲しいものがまとめて入ってます。

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          2020/07/31    14:16          30035 accessors-smart-1.2.jar
-a---          2020/07/31    14:16          25378 annotation-1.0.0.jar   
-a---          2020/07/31    14:16        1077153 appcompat-1.0.2.aar    
-a---          2020/07/31    14:16          53297 asm-5.0.4.jar
-a---          2020/07/31    14:16           7826 asynclayoutinflater-1.0.0.aar
-a---          2020/07/31    14:16          62313 browser-1.0.0.aar
-a---          2020/07/31    14:16          41692 collection-1.0.0.jar
-a---          2020/07/31    14:16         728460 common-2.0.15.aar
-a---          2020/07/31    14:16          64301 constraintlayout-1.1.3.aar
-a---          2020/07/31    14:16         121203 constraintlayout-solver-1.1.3.jar
-a---          2020/07/31    14:16          44222 coordinatorlayout-1.0.0.aar
-a---          2020/07/31    14:16         633019 core-1.0.1.aar
-a---          2020/07/31    14:16          11249 core-common-2.0.0.jar
-a---          2020/07/31    14:16           5475 core-runtime-2.0.0.aar
-a---          2020/07/31    14:16          10591 cursoradapter-1.0.0.aar
-a---          2020/07/31    14:16          33238 customview-1.0.0.aar
-a---          2020/07/31    14:16          11221 documentfile-1.0.0.aar
-a---          2020/07/31    14:16          32470 drawerlayout-1.0.0.aar
-a---          2020/07/31    14:16         156450 fragment-1.0.0.aar
-a---          2020/07/31    14:16         241622 gson-2.8.5.jar
-a---          2020/07/31    14:16           7669 interpolator-1.0.0.aar
-a---          2020/07/31    14:16           4722 jcip-annotations-1.0-1.jar
-a---          2020/07/31    14:16         120316 json-smart-2.3.jar
-a---          2020/07/31    14:16          11309 legacy-support-core-ui-1.0.0.aar
-a---          2020/07/31    14:16           4104 legacy-support-core-utils-1.0.0.aar       
-a---          2020/07/31    14:16          20306 lifecycle-common-2.0.0.jar
-a---          2020/07/31    14:16           9431 lifecycle-livedata-2.0.0.aar
-a---          2020/07/31    14:16           8372 lifecycle-livedata-core-2.0.0.aar
-a---          2020/07/31    14:16           9164 lifecycle-runtime-2.0.0.aar
-a---          2020/07/31    14:16           6759 lifecycle-viewmodel-2.0.0.aar
-a---          2020/07/31    14:16          33445 loader-1.0.0.aar
-a---          2020/07/31    14:16           6808 localbroadcastmanager-1.0.0.aar
-a---          2020/07/31    14:16         244892 msal-1.6.0.aar
-a---          2020/07/31    14:16         342465 nimbus-jose-jwt-8.2.jar
-a---          2020/07/31    14:16          15782 print-1.0.0.aar
-a---          2020/07/31    14:16          23503 slidingpanelayout-1.0.0.aar
-a---          2020/07/31    14:16          32883 swiperefreshlayout-1.0.0.aar
-a---          2020/07/31    14:16          32789 vectordrawable-1.0.1.aar
-a---          2020/07/31    14:16          34398 vectordrawable-animated-1.0.0.aar
-a---          2020/07/31    14:16          27250 versionedparcelable-1.0.0.aar
-a---          2020/07/31    14:16          53513 viewpager-1.0.0.aar
2
3
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
3