Dependencyを確認する/キャッシュを削除する

Sun Nov 10, 2013

Dependencyを確認する

ビルドしたらNoClassDefFoundErrorと言われた。 $ gradle :MyProject:dependencies でパッケージに対象ライブラリが含まれてるか確認できる。

$ gradle :Rebuild:dependencies
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
:Rebuild:dependencies

------------------------------------------------------------
Project :Rebuild
------------------------------------------------------------

_DebugApk
+--- com.android.support:appcompat-v7:18.0.0
|    \--- com.android.support:support-v4:18.0.0
+--- org.roboguice:roboguice:2.0
|    \--- com.google.inject:guice:3.0
|         +--- javax.inject:javax.inject:1
|         +--- aopalliance:aopalliance:1.0
|         \--- org.sonatype.sisu.inject:cglib:2.2.1-v20090111
|              \--- asm:asm:3.1
+--- rejasupotaro:async-rss-client:0.0.3
|    \--- com.loopj.android:android-async-http:1.4.4
\--- com.squareup:otto:1.3.2

_DebugCompile
+--- com.android.support:appcompat-v7:18.0.0
|    \--- com.android.support:support-v4:18.0.0
+--- org.roboguice:roboguice:2.0
|    \--- com.google.inject:guice:3.0
|         +--- javax.inject:javax.inject:1
|         +--- aopalliance:aopalliance:1.0
|         \--- org.sonatype.sisu.inject:cglib:2.2.1-v20090111
|              \--- asm:asm:3.1
+--- rejasupotaro:async-rss-client:0.0.3
|    \--- com.loopj.android:android-async-http:1.4.4
\--- com.squareup:otto:1.3.2

_ReleaseApk
+--- com.android.support:appcompat-v7:18.0.0
|    \--- com.android.support:support-v4:18.0.0
+--- org.roboguice:roboguice:2.0
|    \--- com.google.inject:guice:3.0
|         +--- javax.inject:javax.inject:1
|         +--- aopalliance:aopalliance:1.0
|         \--- org.sonatype.sisu.inject:cglib:2.2.1-v20090111
|              \--- asm:asm:3.1
+--- rejasupotaro:async-rss-client:0.0.3
|    \--- com.loopj.android:android-async-http:1.4.4
\--- com.squareup:otto:1.3.2

_ReleaseCompile
+--- com.android.support:appcompat-v7:18.0.0
|    \--- com.android.support:support-v4:18.0.0
+--- org.roboguice:roboguice:2.0
|    \--- com.google.inject:guice:3.0
|         +--- javax.inject:javax.inject:1
|         +--- aopalliance:aopalliance:1.0
|         \--- org.sonatype.sisu.inject:cglib:2.2.1-v20090111
|              \--- asm:asm:3.1
+--- rejasupotaro:async-rss-client:0.0.3
|    \--- com.loopj.android:android-async-http:1.4.4
\--- com.squareup:otto:1.3.2

_TestApk
+--- com.squareup:fest-android:1.0.7
|    \--- org.easytesting:fest-assert-core:2.0M10
|         \--- org.easytesting:fest-util:1.2.5
\--- rejasupotaro:robotgirl:0.0.3
     \--- com.android.support:support-v4:18.0.0

_TestCompile
+--- com.squareup:fest-android:1.0.7
|    \--- org.easytesting:fest-assert-core:2.0M10
|         \--- org.easytesting:fest-util:1.2.5
\--- rejasupotaro:robotgirl:0.0.3
     \--- com.android.support:support-v4:18.0.0

apk - Classpath packaged with the compiled main classes.
+--- com.android.support:appcompat-v7:18.0.0
|    \--- com.android.support:support-v4:18.0.0
+--- org.roboguice:roboguice:2.0
|    \--- com.google.inject:guice:3.0
|         +--- javax.inject:javax.inject:1
|         +--- aopalliance:aopalliance:1.0
|         \--- org.sonatype.sisu.inject:cglib:2.2.1-v20090111
|              \--- asm:asm:3.1
+--- rejasupotaro:async-rss-client:0.0.3
|    \--- com.loopj.android:android-async-http:1.4.4
\--- com.squareup:otto:1.3.2

archives - Configuration for archive artifacts.
No dependencies

compile - Classpath for compiling the main sources.
+--- com.android.support:appcompat-v7:18.0.0
|    \--- com.android.support:support-v4:18.0.0
+--- org.roboguice:roboguice:2.0
|    \--- com.google.inject:guice:3.0
|         +--- javax.inject:javax.inject:1
|         +--- aopalliance:aopalliance:1.0
|         \--- org.sonatype.sisu.inject:cglib:2.2.1-v20090111
|              \--- asm:asm:3.1
+--- rejasupotaro:async-rss-client:0.0.3
|    \--- com.loopj.android:android-async-http:1.4.4
\--- com.squareup:otto:1.3.2

debugApk - Classpath packaged with the compiled debug classes.
No dependencies

debugCompile - Classpath for compiling the debug sources.
No dependencies

default - Configuration for default artifacts.
No dependencies

instrumentTestApk - Classpath packaged with the compiled instrumentTest classes.
+--- com.squareup:fest-android:1.0.7
|    \--- org.easytesting:fest-assert-core:2.0M10
|         \--- org.easytesting:fest-util:1.2.5
\--- rejasupotaro:robotgirl:0.0.3
     \--- com.android.support:support-v4:18.0.0

instrumentTestCompile - Classpath for compiling the instrumentTest sources.
+--- com.squareup:fest-android:1.0.7
|    \--- org.easytesting:fest-assert-core:2.0M10
|         \--- org.easytesting:fest-util:1.2.5
\--- rejasupotaro:robotgirl:0.0.3
     \--- com.android.support:support-v4:18.0.0

releaseApk - Classpath packaged with the compiled release classes.
No dependencies

releaseCompile - Classpath for compiling the release sources.
No dependencies

BUILD SUCCESSFUL

Total time: 7.674 secs

Dependencyのキャッシュを削除する

正確には常にre-downloadするという表現が正しい。 build.gradle に以下を追加する。

configurations.all {
    // check for updates every build
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}


  « Previous: Next: »