gradle configuration extendedFrom another configuration and dependencies -
i'll jump straight issue. have following 2 sourcesets defined:
sourcesets { 'a' { java.srcdir 'a/packages' jarname='a' javadoc=true } 'b' { java.srcdir 'b/packages' jarname='b' javadoc=true } }
so far good. have following configurations defined:
configurations { builda { description='build a...' transitive=true // test visible=true } buildb { description='build b...' extendsfrom builda transitive=true visible=false } }
the main idea: application has 2 jar files. 1 called 'a' contains common functionality , 'b' that's application itself. 'b' dependent on 'a' , has dependency it. did setup dependencies follows:
dependencies { acompile group: 'g', name: 'n', version: 'v', configuration: 'c' (1) ... bcompile group: ... bcompile sourcesets.a.output (*) }
the dependencies 'a' (common) there. main 'b' set dependencies 'b' using , found asnwer on stackoverflow (*). 'b' can "see" 'a' there problem dependency (g:n:v) <- (1).
gradle dependencies --configuration builda
(g:n)'s version (v) wonderful i've set in dependencies.
gradle dependencies --configuration buildb
(g:n)'s version not (v) older version doesn't contain functionality i'm using , results in compile error.
how possible? naively assumed gradle better ivy when created build.gradle dependency management greater mess of ivy's first look. version comes in 'b' if explicitly requested version 'v' dependency (g:n). tried forcing same issue.
thanks tips :).
Comments
Post a Comment