BAEL-4516: Task for config and srcset info
This commit is contained in:
parent
04fe338707
commit
6b75e0cbed
|
@ -1,35 +1,52 @@
|
||||||
|
|
||||||
apply plugin: "eclipse"
|
apply plugin: "eclipse"
|
||||||
|
apply plugin: "java"
|
||||||
|
|
||||||
description = "Source Sets example"
|
description = "Source Sets example"
|
||||||
|
|
||||||
task printConfigurations(){
|
task printSourceSetInformation(){
|
||||||
doLast{
|
doLast{
|
||||||
configurations.each {
|
sourceSets.each { srcSet ->
|
||||||
println it.name
|
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{
|
task printConfigurationInformation(){
|
||||||
itest {
|
doLast{
|
||||||
java {
|
configurations.each { config ->
|
||||||
|
println "["+config.name+"]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sourceSets{
|
||||||
|
|
||||||
|
// itest {
|
||||||
|
// java {
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation('org.apache.httpcomponents:httpclient:4.5.12')
|
implementation('org.apache.httpcomponents:httpclient:4.5.12')
|
||||||
testImplementation('junit:junit:4.12')
|
testImplementation('junit:junit:4.12')
|
||||||
itestImplementation('com.google.guava:guava:29.0-jre')
|
// itestImplementation('com.google.guava:guava:29.0-jre')
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
// configurations {
|
||||||
itestImplementation.extendsFrom(testImplementation)
|
// itestImplementation.extendsFrom(testImplementation)
|
||||||
}
|
// }
|
||||||
|
|
||||||
eclipse {
|
// eclipse {
|
||||||
classpath {
|
// classpath {
|
||||||
plusConfigurations+=[configurations.itestCompileClasspath]
|
// plusConfigurations+=[configurations.itestCompileClasspath]
|
||||||
}
|
// }
|
||||||
}
|
// }
|
Loading…
Reference in New Issue