Skip to content

Commit

Permalink
Fix issue with incorrect metadata file name (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbro112 authored May 23, 2024
1 parent 57bc04a commit df7e49a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class EmergePlugin : Plugin<Project> {
it.artifactDir.set(variant.artifacts.get(SingleArtifact.APK))
it.testArtifactDir.set(androidTest.artifacts.get(SingleArtifact.APK))
it.outputDirectory.set(appProject.layout.buildDirectory.dir("${BUILD_OUTPUT_DIR_NAME}/snapshots/artifacts"))
it.artifactMetadataPath.set(appProject.layout.buildDirectory.file("${BUILD_OUTPUT_DIR_NAME}/snapshots/artifacts/$ArtifactMetadata.JSON_FILE_NAME"))
it.artifactMetadataPath.set(appProject.layout.buildDirectory.file("${BUILD_OUTPUT_DIR_NAME}/snapshots/artifacts/${ArtifactMetadata.JSON_FILE_NAME}"))
it.agpVersion.set(AgpVersions.CURRENT.toString())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ abstract class LocalSnapshots : DefaultTask() {
val artifactMetadataFiles = packageDir.asFileTree.matching {
it.include(ArtifactMetadata.JSON_FILE_NAME)
}
check(artifactMetadataFiles.files.size > 0) { "No artifact metadata files found" }
check(artifactMetadataFiles.files.size < 2) { "Multiple artifact metadata files found" }
val artifactMetadataFile = artifactMetadataFiles.singleFile

Expand Down

0 comments on commit df7e49a

Please sign in to comment.