-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Thanks to @lukaszkalnik we found out that the aar output file is renamed in a specific combination of the AGP and Gradle version.
They renamed the file from XY-buildType to XY-version.
I found out this happend with the AGP 3.3.1 and Gradle 5.1+.
Therefore this is not guaranteed anymore and break the build.
Anyway. Depending on a hardcoded output path is not recommended by Gradle anyway.
This code
AndroidArtifacts/src/main/kotlin/guru/stefma/androidartifacts/MavenPublication.kt
Line 18 in ed04801
| artifact("${project.buildDir}/outputs/aar/${variantName.aarFileName(project.name)}") { |
Because the output is not named
xy-release.aar anymore but xy-1.0.0.aar.But I found out that the
bundleReleaseAar has declared the output path:
afterEvaluate {
println(tasks.getByName("bundleReleaseAar").outputs.hasOutput)
tasks.getByName("bundleReleaseAar").outputs.files.forEach {
println(it)
}
}
true
/private/tmp/[aproject]/[aproject]/build/outputs/aar/blewifiprov-0.1.0.aar
That means we could add the artifact from this output instead of adding a hardcoded string...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels