This message was deleted.
# community-support
s
This message was deleted.
z
how can I indicate to gradle that to assemble a sourceSet (
sourceDebugJar
task), it is dependant on the
generateBuildConfigConstantTask
above? without being explicitly dependent on that task?
e
what is
SourceJarTask
, the one from AGP?
z
yeah think so
e
it's just not set up for that now
👍 1
v
Wasn't in Android projects the way to register generated sources differently than in Java? There is some property or method with
generated
in the name iirc that should be used to get proper task dependencies.
z
@Vampire it worked! I just had to do this:
Copy code
android
    .sourceSets.getByName(sourceSetName)
    .java {
        srcDir(
            generateBuildConfigConstantTask
                .map { it.output }
        )
    }
extensions.androidComponents {
    onVariants(
        selector()
            .withName(sourceSetName)
    ) { variant ->
        variant.sources.kotlin!!.addGeneratedSourceDirectory(
            generateBuildConfigConstantTask
        ) { task ->
            task.output
        }
    }
}
👌 1