BAEL-4516: Task for config and srcset info

This commit is contained in:
Sorin Zamfir 2020-08-16 22:39:00 +03:00
parent 04fe338707
commit 6b75e0cbed
1 changed files with 32 additions and 15 deletions

View File

@ -1,35 +1,52 @@
apply plugin: "eclipse"
apply plugin: "java"
description = "Source Sets example"
task printConfigurations(){
task printSourceSetInformation(){
doLast{
configurations.each {
println it.name
sourceSets.each { srcSet ->
println "["+srcSet.name+"]"
print "-->Source directories: "+srcSet.allJava.srcDirs+"\n"
print "-->Output directories: "+srcSet.output.classesDirs.files+"\n"
print "-->Compile classpath:\n"
srcSet.compileClasspath.files.each {
print " "+it.path+"\n"
}
println ""
}
}
}
sourceSets{
itest {
java {
task printConfigurationInformation(){
doLast{
configurations.each { config ->
println "["+config.name+"]"
}
}
}
// sourceSets{
// itest {
// java {
// }
// }
// }
dependencies {
implementation('org.apache.httpcomponents:httpclient:4.5.12')
testImplementation('junit:junit:4.12')
itestImplementation('com.google.guava:guava:29.0-jre')
// itestImplementation('com.google.guava:guava:29.0-jre')
}
configurations {
itestImplementation.extendsFrom(testImplementation)
}
// configurations {
// itestImplementation.extendsFrom(testImplementation)
// }
eclipse {
classpath {
plusConfigurations+=[configurations.itestCompileClasspath]
}
}
// eclipse {
// classpath {
// plusConfigurations+=[configurations.itestCompileClasspath]
// }
// }