Colton Idle
11/20/2025, 4:53 PMTrevJonez
11/20/2025, 5:04 PMandroid {
publishing {
multipleVariants {
allVariants()
withSourcesJar()
}
}
}TrevJonez
11/20/2025, 5:05 PMColton Idle
11/20/2025, 6:02 PMTrevJonez
11/20/2025, 6:03 PMTrevJonez
11/20/2025, 6:07 PMcom.aetna.ah.analytics:impl:2025.11.20 artifact. then the module file has all the variant attributes in it so gradle can auto select the right variant from maven automatically just like when you would be doing a project(":analytics:impl")pablozki
11/20/2025, 6:09 PMTrevJonez
11/20/2025, 6:30 PMColton Idle
11/21/2025, 4:33 AM-variant in the nameColton Idle
11/21/2025, 4:33 AMColton Idle
11/21/2025, 4:34 AMColton Idle
11/21/2025, 6:54 AMColton Idle
11/22/2025, 8:35 AMpublishing {
publications {
register<MavenPublication>("release") {
groupId = "com.my-company"
artifactId = "my-library"
version = "1.0"
afterEvaluate {
from(components["release"])
}
}
}
}
meanwhile it says
"In the preceding example, the name of the component (components.release) is based on the name that was given to either singleVariant() or multipleVariants()."
how would i write the afterEvaluate with your example snippet
android {
publishing {
multipleVariants {
allVariants()
withSourcesJar()
}
}
}TrevJonez
11/24/2025, 3:07 PMpublishing.publications {
register<MavenPublication>("aar") {
project.components.configureEach {
if (name == "default") {
from(this)
}
}
suppressAllPomMetadataWarnings()
}
}Colton Idle
11/24/2025, 6:06 PMTrevJonez
11/24/2025, 6:20 PMColton Idle
11/24/2025, 6:47 PMTrevJonez
11/24/2025, 6:53 PM