Skip to content

Commit eecbbb5

Browse files
committed
Fix GradleMavenReposLinesFromDependencies() for plugins and packages whose "m2repository" isn't a top level folder (a regression introduced in #709).
1 parent 6eee661 commit eecbbb5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

source/AndroidResolver/src/GradleTemplateResolver.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,12 @@ internal static IList<string> GradleMavenReposLinesFromDependencies(
730730
// repo path contains .srcaar.
731731
var repoPath = FileUtils.ReplaceBaseAssetsOrPackagesFolder(
732732
relativePath, GooglePlayServices.SettingsDialog.LocalMavenRepoDir);
733-
// We also want to just convert any prefixes before a directory/m2repository, since
734-
// they are copied to the LocalMavenRepoDir as well.
735-
repoPath = ReplaceLocalFolderBasedOnM2repo(repoPath);
733+
734+
if (!repoPath.StartsWith(GooglePlayServices.SettingsDialog.LocalMavenRepoDir)) {
735+
// same replacement logic as in CopySrcAars()
736+
repoPath = ReplaceLocalFolderBasedOnM2repo(repoPath);
737+
}
738+
736739
if (!Directory.Exists(repoPath)) {
737740
repoPath = relativePath;
738741
}

0 commit comments

Comments
 (0)