Gradle report generation


(Brian Croniser) #1

I am looking to generate a dependency report similar to what maven site does. I have looked into gradle dependency report but it does not include the local jar files [compile file(‘some.jar’)]. I am able to generate a list of all the jars using a separate task. I need to get it into something publishable so that dependency versions can be easily checked for latest versions. Below is the relevant gradle configuration that I am working with.

//Prints to screen the information that I need in a dependency type report
task listJars {
doLast {
configurations.compile.each { File file -> println file.name }
}
}

//Works for aar but not for jars
dependencyReport {
projects = project.allprojects
}

//Current dependency list
dependencies {
compile 'com.android.support:support-v4:24.2.1’
compile files(‘libs/arcgis-android-api.jar’)
compile files(‘libs/arcgis-android-app-toolkit.jar’)
compile files(‘libs/commons-net-3.3.jar’)
compile files(‘libs/smack-android-4.1.4.jar’)
compile files(‘libs/smack-android-extensions-4.1.4.jar’)
compile files(‘libs/smack-im-4.1.4.jar’)
compile files(‘libs/smack-core-4.1.4.jar’)
compile files(‘libs/smack-tcp-4.1.4.jar’)
compile files(‘libs/smack-experimental-4.1.4.jar’)
compile files(‘libs/smack-extensions-4.1.4.jar’)
compile files(‘libs/smack-sasl-provided-4.1.4.jar’)
compile files(‘libs/jxmpp-core-0.4.1.jar’)
compile files(‘libs/jxmpp-util-cache-0.4.1.jar’)
compile files(‘libs/minidns-0.1.7.jar’)
compile files(‘libs/acra-4.6.1.jar’)
compile files(‘libs/PiwikAndroidSdk.jar’)
compile files(‘libs/jackson-core-1.9.5.jar’)
compile files(‘libs/jackson-mapper-1.9.5.jar’)
compile files(‘libs/jcifs-1.3.17.jar’)
compile files(‘libs/gdal.jar’)
compile files(‘libs/gdaldata.jar’)
compile files(‘libs/gdalext.jar’)
}