File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
source/AndroidResolver/src Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ private static bool CopySrcAars(ICollection<Dependency> dependencies) {
95
95
// Copy each .srcaar file to .aar while configuring the plugin importer to ignore the
96
96
// file.
97
97
foreach ( var aar in LocalMavenRepository . FindAarsInLocalRepos ( dependencies ) ) {
98
+ // Only need to copy for .srcaar
99
+ if ( Path . GetExtension ( aar ) . CompareTo ( ".srcaar" ) != 0 ) {
100
+ continue ;
101
+ }
102
+
98
103
var aarPath = aar ;
99
104
if ( FileUtils . IsUnderPackageDirectory ( aar ) ) {
100
105
var logicalPackagePath = FileUtils . GetPackageDirectory ( aar ,
Original file line number Diff line number Diff line change @@ -2000,10 +2000,17 @@ internal static IList<string> GradleMavenReposLines(ICollection<Dependency> depe
2000
2000
foreach ( var repoAndSources in GetRepos ( dependencies : dependencies ) ) {
2001
2001
string repoUri ;
2002
2002
if ( repoAndSources . Key . StartsWith ( projectFileUri ) ) {
2003
- var repoPath = repoAndSources . Key . Substring ( projectFileUri . Length + 1 ) ;
2004
- repoPath = FileUtils . PosixPathSeparators (
2003
+ var relativePath = repoAndSources . Key . Substring ( projectFileUri . Length + 1 ) ;
2004
+ // Convert "Assets", "Packages/packageid", or
2005
+ // "Library/PackageCache/packageid@version" prefix to local maven repo
2006
+ // path. Note that local maven repo path only exists if the original repo
2007
+ // path contains .srcaar.
2008
+ var repoPath = FileUtils . PosixPathSeparators (
2005
2009
FileUtils . ReplaceBaseAssetsOrPackagesFolder (
2006
- repoPath , GooglePlayServices . SettingsDialog . LocalMavenRepoDir ) ) ;
2010
+ relativePath , GooglePlayServices . SettingsDialog . LocalMavenRepoDir ) ) ;
2011
+ if ( ! Directory . Exists ( repoPath ) ) {
2012
+ repoPath = relativePath ;
2013
+ }
2007
2014
2008
2015
// If "Export Gradle Project" setting is enabled, gradle project expects
2009
2016
// absolute path.
You can’t perform that action at this time.
0 commit comments