After upgrading Gradle to 5.1.1, I found that I\'m unable to add bundleReleaseAar
as an artifact to my MavenPublication. Here\'s the relevant snippet of my buil
I solved it by calling the artifact function into the afterEvaluate closure, the issue is that the artifact function does not handle all the configuration lazily
publishing {
publications {
aar(MavenPublication) {
groupId libraryGroupId
version libraryVersion
artifactId libraryArtifactId
afterEvaluate {
artifact bundleReleaseAar
//artifact sourcesJar
//artifact packageJavadoc
}
}
}
}
Reference https://github.com/moberwasserlechner/capacitor-oauth2/issues/10